public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: PPP_FILTER outbound only drops with debugging enables
@ 2003-01-17 12:31 Patrick McHardy
  2003-01-17 22:20 ` Paul Mackerras
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2003-01-17 12:31 UTC (permalink / raw)
  To: paulus; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

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


[-- Attachment #2: ppp_filter-outbound-fix.diff --]
[-- Type: text/plain, Size: 598 bytes --]

--- linux-2.4.20/drivers/net/ppp_generic.c.orig	2003-01-17 13:15:32.000000000 +0100
+++ linux-2.4.20/drivers/net/ppp_generic.c	2003-01-17 13:16:23.000000000 +0100
@@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]: PPP_FILTER outbound only drops with debugging enables
  2003-01-17 12:31 [PATCH]: PPP_FILTER outbound only drops with debugging enables Patrick McHardy
@ 2003-01-17 22:20 ` Paul Mackerras
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2003-01-17 22:20 UTC (permalink / raw)
  To: davem; +Cc: Patrick McHardy, linux-kernel

Dave,

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

Paul.

Patrick McHardy writes:
> Hi.
> 
> Packets in ppp_send_frame catched by pass_filter are only dropped if 
> debuging is enabled:

[snip]

--- linux-2.4.20/drivers/net/ppp_generic.c.orig	2003-01-17 13:15:32.000000000 +0100
+++ linux-2.4.20/drivers/net/ppp_generic.c	2003-01-17 13:16:23.000000000 +0100
@@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-17 22:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-17 12:31 [PATCH]: PPP_FILTER outbound only drops with debugging enables Patrick McHardy
2003-01-17 22:20 ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox