diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.12/0024-bridge-check-return-value-of-ipv6_dev_get_saddr.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.12/0024-bridge-check-return-value-of-ipv6_dev_get_saddr.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.12/0024-bridge-check-return-value-of-ipv6_dev_get_saddr.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.12/0024-bridge-check-return-value-of-ipv6_dev_get_saddr.patch new file mode 100644 index 00000000..7a05ae29 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.12/0024-bridge-check-return-value-of-ipv6_dev_get_saddr.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 384298df213387fc31905729a5e23e79bc6b8222 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ulrich Weber <ulrich.weber@sophos.com> | ||
3 | Date: Mon, 5 Mar 2012 04:52:44 +0000 | ||
4 | Subject: [PATCH 24/42] bridge: check return value of ipv6_dev_get_saddr() | ||
5 | |||
6 | [ Upstream commit d1d81d4c3dd886d5fa25a2c4fa1e39cb89613712 ] | ||
7 | |||
8 | otherwise source IPv6 address of ICMPV6_MGM_QUERY packet | ||
9 | might be random junk if IPv6 is disabled on interface or | ||
10 | link-local address is not yet ready (DAD). | ||
11 | |||
12 | Signed-off-by: Ulrich Weber <ulrich.weber@sophos.com> | ||
13 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
15 | --- | ||
16 | net/bridge/br_multicast.c | 7 +++++-- | ||
17 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c | ||
20 | index a5f4e57..8eb6b15 100644 | ||
21 | --- a/net/bridge/br_multicast.c | ||
22 | +++ b/net/bridge/br_multicast.c | ||
23 | @@ -446,8 +446,11 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, | ||
24 | ip6h->nexthdr = IPPROTO_HOPOPTS; | ||
25 | ip6h->hop_limit = 1; | ||
26 | ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1)); | ||
27 | - ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0, | ||
28 | - &ip6h->saddr); | ||
29 | + if (ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0, | ||
30 | + &ip6h->saddr)) { | ||
31 | + kfree_skb(skb); | ||
32 | + return NULL; | ||
33 | + } | ||
34 | ipv6_eth_mc_map(&ip6h->daddr, eth->h_dest); | ||
35 | |||
36 | hopopt = (u8 *)(ip6h + 1); | ||
37 | -- | ||
38 | 1.7.9.4 | ||
39 | |||