* [PATCH] Restore PPP filtering
@ 2004-08-07 12:41 Paul Mackerras
2004-08-07 13:26 ` Karsten Keil
0 siblings, 1 reply; 2+ messages in thread
From: Paul Mackerras @ 2004-08-07 12:41 UTC (permalink / raw)
To: akpm; +Cc: kkeil, linux-kernel
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.
Please apply.
Signed-off-by: Paul Mackerras <paulus@samba.org>
diff -urN linux-2.5/drivers/net/ppp_generic.c pmac-2.5/drivers/net/ppp_generic.c
--- linux-2.5/drivers/net/ppp_generic.c 2004-07-28 01:06:02.000000000 +1000
+++ pmac-2.5/drivers/net/ppp_generic.c 2004-08-07 21:07:09.018980776 +1000
@@ -1026,11 +1026,7 @@
/* check if we should pass this packet */
/* the filter instructions are constructed assuming
a four-byte PPP header on each packet */
- {
- u_int16_t *p = (u_int16_t *) skb_push(skb, 2);
-
- *p = htons(4); /* indicate outbound in DLT_LINUX_SLL */;
- }
+ *skb_push(skb, 2) = 1;
if (ppp->pass_filter
&& sk_run_filter(skb, ppp->pass_filter,
ppp->pass_len) == 0) {
@@ -1573,11 +1569,7 @@
/* check if the packet passes the pass and active filters */
/* the filter instructions are constructed assuming
a four-byte PPP header on each packet */
- {
- u_int16_t *p = (u_int16_t *) skb_push(skb, 2);
-
- *p = 0; /* indicate inbound in DLT_LINUX_SLL */
- }
+ *skb_push(skb, 2) = 0;
if (ppp->pass_filter
&& sk_run_filter(skb, ppp->pass_filter,
ppp->pass_len) == 0) {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Restore PPP filtering
2004-08-07 12:41 [PATCH] Restore PPP filtering Paul Mackerras
@ 2004-08-07 13:26 ` Karsten Keil
0 siblings, 0 replies; 2+ messages in thread
From: Karsten Keil @ 2004-08-07 13:26 UTC (permalink / raw)
To: Paul Mackerras; +Cc: akpm, linux-kernel
On Sat, Aug 07, 2004 at 10:41:05PM +1000, Paul Mackerras wrote:
> 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.
>
> Please apply.
I agree with Paul.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
>
> diff -urN linux-2.5/drivers/net/ppp_generic.c pmac-2.5/drivers/net/ppp_generic.c
> --- linux-2.5/drivers/net/ppp_generic.c 2004-07-28 01:06:02.000000000 +1000
> +++ pmac-2.5/drivers/net/ppp_generic.c 2004-08-07 21:07:09.018980776 +1000
> @@ -1026,11 +1026,7 @@
> /* check if we should pass this packet */
> /* the filter instructions are constructed assuming
> a four-byte PPP header on each packet */
> - {
> - u_int16_t *p = (u_int16_t *) skb_push(skb, 2);
> -
> - *p = htons(4); /* indicate outbound in DLT_LINUX_SLL */;
> - }
> + *skb_push(skb, 2) = 1;
> if (ppp->pass_filter
> && sk_run_filter(skb, ppp->pass_filter,
> ppp->pass_len) == 0) {
> @@ -1573,11 +1569,7 @@
> /* check if the packet passes the pass and active filters */
> /* the filter instructions are constructed assuming
> a four-byte PPP header on each packet */
> - {
> - u_int16_t *p = (u_int16_t *) skb_push(skb, 2);
> -
> - *p = 0; /* indicate inbound in DLT_LINUX_SLL */
> - }
> + *skb_push(skb, 2) = 0;
> if (ppp->pass_filter
> && sk_run_filter(skb, ppp->pass_filter,
> ppp->pass_len) == 0) {
--
Karsten Keil
SuSE Labs
ISDN development
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-07 13:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-07 12:41 [PATCH] Restore PPP filtering Paul Mackerras
2004-08-07 13:26 ` Karsten Keil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®