diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-07 01:43:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-07 01:43:03 -0500 |
commit | 9eeda9abd1faf489f3df9a1f557975f4c8650363 (patch) | |
tree | 3e0a58e25b776cfbee193195460324dccb1886c7 /net/ipv4/udp.c | |
parent | 61c9eaf90081cbe6dc4f389e0056bff76eca19ec (diff) | |
parent | 4bab0ea1d42dd1927af9df6fbf0003fc00617c50 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/ath5k/base.c
net/8021q/vlan_core.c
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 7e4d9c871153..54badc9a019d 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -320,7 +320,7 @@ struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, | |||
320 | } | 320 | } |
321 | EXPORT_SYMBOL_GPL(udp4_lib_lookup); | 321 | EXPORT_SYMBOL_GPL(udp4_lib_lookup); |
322 | 322 | ||
323 | static inline struct sock *udp_v4_mcast_next(struct sock *sk, | 323 | static inline struct sock *udp_v4_mcast_next(struct net *net, struct sock *sk, |
324 | __be16 loc_port, __be32 loc_addr, | 324 | __be16 loc_port, __be32 loc_addr, |
325 | __be16 rmt_port, __be32 rmt_addr, | 325 | __be16 rmt_port, __be32 rmt_addr, |
326 | int dif) | 326 | int dif) |
@@ -332,7 +332,8 @@ static inline struct sock *udp_v4_mcast_next(struct sock *sk, | |||
332 | sk_for_each_from(s, node) { | 332 | sk_for_each_from(s, node) { |
333 | struct inet_sock *inet = inet_sk(s); | 333 | struct inet_sock *inet = inet_sk(s); |
334 | 334 | ||
335 | if (s->sk_hash != hnum || | 335 | if (!net_eq(sock_net(s), net) || |
336 | s->sk_hash != hnum || | ||
336 | (inet->daddr && inet->daddr != rmt_addr) || | 337 | (inet->daddr && inet->daddr != rmt_addr) || |
337 | (inet->dport != rmt_port && inet->dport) || | 338 | (inet->dport != rmt_port && inet->dport) || |
338 | (inet->rcv_saddr && inet->rcv_saddr != loc_addr) || | 339 | (inet->rcv_saddr && inet->rcv_saddr != loc_addr) || |
@@ -1131,15 +1132,16 @@ static int __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb, | |||
1131 | spin_lock(&hslot->lock); | 1132 | spin_lock(&hslot->lock); |
1132 | sk = sk_head(&hslot->head); | 1133 | sk = sk_head(&hslot->head); |
1133 | dif = skb->dev->ifindex; | 1134 | dif = skb->dev->ifindex; |
1134 | sk = udp_v4_mcast_next(sk, uh->dest, daddr, uh->source, saddr, dif); | 1135 | sk = udp_v4_mcast_next(net, sk, uh->dest, daddr, uh->source, saddr, dif); |
1135 | if (sk) { | 1136 | if (sk) { |
1136 | struct sock *sknext = NULL; | 1137 | struct sock *sknext = NULL; |
1137 | 1138 | ||
1138 | do { | 1139 | do { |
1139 | struct sk_buff *skb1 = skb; | 1140 | struct sk_buff *skb1 = skb; |
1140 | 1141 | ||
1141 | sknext = udp_v4_mcast_next(sk_next(sk), uh->dest, daddr, | 1142 | sknext = udp_v4_mcast_next(net, sk_next(sk), uh->dest, |
1142 | uh->source, saddr, dif); | 1143 | daddr, uh->source, saddr, |
1144 | dif); | ||
1143 | if (sknext) | 1145 | if (sknext) |
1144 | skb1 = skb_clone(skb, GFP_ATOMIC); | 1146 | skb1 = skb_clone(skb, GFP_ATOMIC); |
1145 | 1147 | ||