From: Karsten Keil Date: Thu, 21 Apr 2005 15:30:30 +0000 (-0700) Subject: [PATCH] fix for ISDN ippp filtering X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d8470b7c13e11c18cf14a7e3180f0b00e715e4f0;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] fix for ISDN ippp filtering We do not longer use DLT_LINUX_SLL for activ/pass filters but DLT_PPP_WITHDIRECTION witch need 1 as outbound flag. Signed-off-by: Karsten Keil Signed-off-by: Linus Torvalds --- diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 3c092117a8ea..260a323a96d3 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c @@ -1151,7 +1151,7 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff { 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 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev) /* 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 @@ int isdn_ppp_autodial_filter(struct sk_buff *skb, isdn_net_local *lp) * 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); }