From: Philip P. <phi...@re...> - 2012-01-03 02:01:49
|
Can these be given a prod? I'm not seeing them in linux-next... On 11/18/11 1:52 PM, chas williams - CONTRACTOR wrote: > no. the repo's on kernel.org were pulled and i havent gotten around to > it since everything has been put back. i should have some time this > weekend. > > On Fri, 18 Nov 2011 13:13:32 -0700 > Philip Prindeville <phi...@re...> wrote: > >> Did any of these patches make it upstream? I never saw an ack from David and David... >> >> -Philip >> >> On 8/17/11 12:37 AM, Pascal Hambourg wrote: >>> Use memcmp() instead of cast to u16 when checking the PAD field. >>> >>> Signed-off-by: Pascal Hambourg <pa...@pl...> >>> --- >>> net/atm/br2684.c | 5 +++-- >>> 1 file changed, 3 insertions(+), 2 deletions(-) >>> >>> diff -uprN a/net/atm/br2684.c b/net/atm/br2684.c >>> --- a/net/atm/br2684.c 2011-08-16 22:13:47.000000000 +0200 >>> +++ b/net/atm/br2684.c 2011-08-16 22:13:49.000000000 +0200 >>> @@ -53,6 +53,7 @@ static const unsigned char ethertype_ipv >>> static const unsigned char ethertype_ipv6[] = { ETHERTYPE_IPV6 }; >>> static const unsigned char llc_oui_pid_pad[] = >>> { LLC, SNAP_BRIDGED, PID_ETHERNET, PAD_BRIDGED }; >>> +static const unsigned char pad[] = { PAD_BRIDGED }; >>> static const unsigned char llc_oui_ipv4[] = { LLC, SNAP_ROUTED, ETHERTYPE_IPV4 }; >>> static const unsigned char llc_oui_ipv6[] = { LLC, SNAP_ROUTED, ETHERTYPE_IPV6 }; >>> >>> @@ -434,7 +435,7 @@ static void br2684_push(struct atm_vcc * >>> */ >>> if ((skb->len >= sizeof(llc_oui_pid_pad) + ETH_HLEN) && >>> (memcmp(skb->data, llc_oui_pid_pad, 7) == 0) && >>> - (*((u16 *) (skb->data + 8)) == 0)) { >>> + (memcmp(skb->data + 8, pad, BR2684_PAD_LEN) == 0)) { >>> if (skb->data[7] == 0x01 && >>> skb->len >= sizeof(llc_oui_pid_pad) + ETH_ZLEN + ETH_FCS_LEN) >>> __skb_trim(skb, skb->len - ETH_FCS_LEN); /* trim FCS */ >>> @@ -464,7 +465,7 @@ static void br2684_push(struct atm_vcc * >>> } else { /* p_bridged */ >>> /* first 2 chars should be 0 */ >>> if (skb->len < BR2684_PAD_LEN + ETH_HLEN || >>> - *((u16 *) (skb->data)) != 0) >>> + memcmp(skb->data, pad, BR2684_PAD_LEN) != 0) >>> goto error; >>> skb_pull(skb, BR2684_PAD_LEN); >>> skb->protocol = eth_type_trans(skb, net_dev); >>> >> |