Skip to contentSkip to conversation

: PPP_FILTER outbound only drops with debugging enables

PATCH In review Patrick McHardy 2 participants 2 messages Jan 17, 2003 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : PPP_FILTER outbound only drops with debugging enables

Hi.

Packets in ppp_send_frame catched by pass_filter are only dropped if debuging is enabled:

               if (ppp->pass_filter.filter
                   && sk_run_filter(skb, ppp->pass_filter.filter,
                                    ppp->pass_filter.len) == 0) {
                       if (ppp->debug & 1) {
                               printk(KERN_DEBUG "PPP: outbound frame 
not passed\n");
                               kfree_skb(skb);
                               return;
                       }
               }

The problem is still present in 2.5 bitkeeper tree. Attached patch fixes it. Regards,
Patrick

drivers/net/ppp_generic.c renamed from drivers/net/ppp_generic.c.orig +3 -4
@@ -965,11 +965,10 @@
 		if (ppp->pass_filter.filter
 		    && sk_run_filter(skb, ppp->pass_filter.filter,
 				     ppp->pass_filter.len) == 0) {
-			if (ppp->debug & 1) {
+			if (ppp->debug & 1)
 				printk(KERN_DEBUG "PPP: outbound frame not passed\n");
-				kfree_skb(skb);
-				return;
-			}
+			kfree_skb(skb);
+			return;
 		}
 		/* if this packet passes the active filter, record the time */
 		if (!(ppp->active_filter.filter
#1 lore raw

Dave,

This patch looks obviously correct, please send it on to Linus.

Paul.

Quoted 4 lines · Patrick McHardy

Hi.

Packets in ppp_send_frame catched by pass_filter are only dropped if debuging is enabled:

[snip]

drivers/net/ppp_generic.c renamed from drivers/net/ppp_generic.c.orig +3 -4
@@ -965,11 +965,10 @@
 		if (ppp->pass_filter.filter
 		    && sk_run_filter(skb, ppp->pass_filter.filter,
 				     ppp->pass_filter.len) == 0) {
-			if (ppp->debug & 1) {
+			if (ppp->debug & 1)
 				printk(KERN_DEBUG "PPP: outbound frame not passed\n");
-				kfree_skb(skb);
-				return;
-			}
+			kfree_skb(skb);
+			return;
 		}
 		/* if this packet passes the active filter, record the time */
 		if (!(ppp->active_filter.filter