All of lore.kernel.org
 help / color / mirror / Atom feed
* fix for ISDN ippp filtering
@ 2005-04-21 13:07 Karsten Keil
  2005-04-21 13:17 ` Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: Karsten Keil @ 2005-04-21 13:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, linus

Hi,

We do not longer use DLT_LINUX_SLL for activ/pass filters but DLT_PPP_WITHDIRECTION
witch need 1 as outbound flag.
Please apply.

Signed-off-by: Karsten Keil <kkeil@suse.de>

diff -urN linux-2.6.12-rc2.org/drivers/isdn/i4l/isdn_ppp.c linux-2.6.12-rc2/drivers/isdn/i4l/isdn_ppp.c
--- linux-2.6.12-rc2.org/drivers/isdn/i4l/isdn_ppp.c	2005-04-20 16:01:07.070809128 +0200
+++ linux-2.6.12-rc2/drivers/isdn/i4l/isdn_ppp.c	2005-04-20 18:31:28.533367073 +0200
@@ -1151,7 +1151,7 @@
 	{
 		u_int16_t *p = (u_int16_t *) skb->data;
 
-		*p = 0;	/* indicate inbound in DLT_LINUX_SLL */
+		*p = 0;	/* indicate inbound */
 	}
 
 	if (is->pass_filter
@@ -1293,12 +1293,12 @@
 	/* check if we should pass this packet
 	 * the filter instructions are constructed assuming
 	 * a four-byte PPP header on each packet */
-	skb_push(skb, 4);
+	*skb_push(skb, 4) = 1; /* indicate outbound */
 
 	{
 		u_int16_t *p = (u_int16_t *) skb->data;
 
-		*p++ = htons(4); /* indicate outbound in DLT_LINUX_SLL */
+		p++;
 		*p   = htons(proto);
 	}
 
@@ -1491,12 +1491,12 @@
 	 * temporarily remove part of the fake header stuck on
 	 * earlier.
 	 */
-	skb_pull(skb, IPPP_MAX_HEADER - 4);
+	*skb_pull(skb, IPPP_MAX_HEADER - 4) = 1; /* indicate outbound */
 
 	{
 		u_int16_t *p = (u_int16_t *) skb->data;
 
-		*p++ = htons(4);	/* indicate outbound in DLT_LINUX_SLL */
+		p++;
 		*p   = htons(proto);
 	}
 	

-- 
Karsten Keil
SuSE Labs
ISDN development

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

end of thread, other threads:[~2005-04-21 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-21 13:07 fix for ISDN ippp filtering Karsten Keil
2005-04-21 13:17 ` Patrick McHardy
2005-04-21 14:05   ` Karsten Keil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.