mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Karsten Keil <kkeil@suse.de>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, linus@osdl.org
Subject: fix for ISDN ippp filtering
Date: Thu, 21 Apr 2005 15:07:35 +0200	[thread overview]
Message-ID: <20050421130735.GA23653@pingi3.kke.suse.de> (raw)

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

             reply	other threads:[~2005-04-21 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21 13:07 Karsten Keil [this message]
2005-04-21 13:17 ` Patrick McHardy
2005-04-21 14:05   ` Karsten Keil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050421130735.GA23653@pingi3.kke.suse.de \
    --to=kkeil@suse.de \
    --cc=akpm@osdl.org \
    --cc=linus@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®