Commit aa524be4 authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] Restore PPP filtering

Karsten Keil's patch entitled "[ISDN]: Fix kernel PPP/IPPP active/passiv
filter code" that went in back in April was an attempt to solve a real
problem - namely that the libpcap maintainers have removed useful
functionality that pppd was using - but his fix broke existing pppd
binaries and IMO didn't end up actually solving the problem.

This patch reverts the change to ppp_generic.c so that existing pppd
binaries work again.  I am going to have to work out a proper fix, which
may involve further changes to ppp_generic.c, but I will make sure existing
pppd binaries still work.
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c279ca27
...@@ -1026,11 +1026,7 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb) ...@@ -1026,11 +1026,7 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
/* check if we should pass this packet */ /* check if we should pass this packet */
/* the filter instructions are constructed assuming /* the filter instructions are constructed assuming
a four-byte PPP header on each packet */ a four-byte PPP header on each packet */
{ *skb_push(skb, 2) = 1;
u_int16_t *p = (u_int16_t *) skb_push(skb, 2);
*p = htons(4); /* indicate outbound in DLT_LINUX_SLL */;
}
if (ppp->pass_filter if (ppp->pass_filter
&& sk_run_filter(skb, ppp->pass_filter, && sk_run_filter(skb, ppp->pass_filter,
ppp->pass_len) == 0) { ppp->pass_len) == 0) {
...@@ -1573,11 +1569,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) ...@@ -1573,11 +1569,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
/* check if the packet passes the pass and active filters */ /* check if the packet passes the pass and active filters */
/* the filter instructions are constructed assuming /* the filter instructions are constructed assuming
a four-byte PPP header on each packet */ a four-byte PPP header on each packet */
{ *skb_push(skb, 2) = 0;
u_int16_t *p = (u_int16_t *) skb_push(skb, 2);
*p = 0; /* indicate inbound in DLT_LINUX_SLL */
}
if (ppp->pass_filter if (ppp->pass_filter
&& sk_run_filter(skb, ppp->pass_filter, && sk_run_filter(skb, ppp->pass_filter,
ppp->pass_len) == 0) { ppp->pass_len) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment