[PATCH]: PPP_FILTER outbound only drops with debugging enables

Patrick McHardy (kaber@trash.net)
Fri, 17 Jan 2003 13:31:27 +0100


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-6491-1042806795-0001-2
Content-Type: text/plain; charset=iso-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

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

--=_courier-6491-1042806795-0001-2
Content-Type: text/plain; name="ppp_filter-outbound-fix.diff"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ppp_filter-outbound-fix.diff"

--- 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

--=_courier-6491-1042806795-0001-2--