diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-23 02:55:47 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-23 02:55:47 -0500 |
commit | ca9eed76133c00e7f4b1eeb4c1a6cb800cd2654c (patch) | |
tree | 5f011f4bd00c921e41605b1915c227aeaf411a0d /net/ipv4/udp.c | |
parent | 8652cb4b0d87accbe78725fd2a13be2787059649 (diff) | |
parent | 13d428afc007fcfcd6deeb215618f54cf9c0cae6 (diff) |
Merge commit 'v2.6.28-rc6' into x86/debug
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 2095abc3caba..98c1fd09be88 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -284,7 +284,7 @@ struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, | |||
284 | } | 284 | } |
285 | EXPORT_SYMBOL_GPL(udp4_lib_lookup); | 285 | EXPORT_SYMBOL_GPL(udp4_lib_lookup); |
286 | 286 | ||
287 | static inline struct sock *udp_v4_mcast_next(struct sock *sk, | 287 | static inline struct sock *udp_v4_mcast_next(struct net *net, struct sock *sk, |
288 | __be16 loc_port, __be32 loc_addr, | 288 | __be16 loc_port, __be32 loc_addr, |
289 | __be16 rmt_port, __be32 rmt_addr, | 289 | __be16 rmt_port, __be32 rmt_addr, |
290 | int dif) | 290 | int dif) |
@@ -296,7 +296,8 @@ static inline struct sock *udp_v4_mcast_next(struct sock *sk, | |||
296 | sk_for_each_from(s, node) { | 296 | sk_for_each_from(s, node) { |
297 | struct inet_sock *inet = inet_sk(s); | 297 | struct inet_sock *inet = inet_sk(s); |
298 | 298 | ||
299 | if (s->sk_hash != hnum || | 299 | if (!net_eq(sock_net(s), net) || |
300 | s->sk_hash != hnum || | ||
300 | (inet->daddr && inet->daddr != rmt_addr) || | 301 | (inet->daddr && inet->daddr != rmt_addr) || |
301 | (inet->dport != rmt_port && inet->dport) || | 302 | (inet->dport != rmt_port && inet->dport) || |
302 | (inet->rcv_saddr && inet->rcv_saddr != loc_addr) || | 303 | (inet->rcv_saddr && inet->rcv_saddr != loc_addr) || |
@@ -632,6 +633,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
632 | .saddr = saddr, | 633 | .saddr = saddr, |
633 | .tos = tos } }, | 634 | .tos = tos } }, |
634 | .proto = sk->sk_protocol, | 635 | .proto = sk->sk_protocol, |
636 | .flags = inet_sk_flowi_flags(sk), | ||
635 | .uli_u = { .ports = | 637 | .uli_u = { .ports = |
636 | { .sport = inet->sport, | 638 | { .sport = inet->sport, |
637 | .dport = dport } } }; | 639 | .dport = dport } } }; |
@@ -1079,15 +1081,16 @@ static int __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb, | |||
1079 | read_lock(&udp_hash_lock); | 1081 | read_lock(&udp_hash_lock); |
1080 | sk = sk_head(&udptable[udp_hashfn(net, ntohs(uh->dest))]); | 1082 | sk = sk_head(&udptable[udp_hashfn(net, ntohs(uh->dest))]); |
1081 | dif = skb->dev->ifindex; | 1083 | dif = skb->dev->ifindex; |
1082 | sk = udp_v4_mcast_next(sk, uh->dest, daddr, uh->source, saddr, dif); | 1084 | sk = udp_v4_mcast_next(net, sk, uh->dest, daddr, uh->source, saddr, dif); |
1083 | if (sk) { | 1085 | if (sk) { |
1084 | struct sock *sknext = NULL; | 1086 | struct sock *sknext = NULL; |
1085 | 1087 | ||
1086 | do { | 1088 | do { |
1087 | struct sk_buff *skb1 = skb; | 1089 | struct sk_buff *skb1 = skb; |
1088 | 1090 | ||
1089 | sknext = udp_v4_mcast_next(sk_next(sk), uh->dest, daddr, | 1091 | sknext = udp_v4_mcast_next(net, sk_next(sk), uh->dest, |
1090 | uh->source, saddr, dif); | 1092 | daddr, uh->source, saddr, |
1093 | dif); | ||
1091 | if (sknext) | 1094 | if (sknext) |
1092 | skb1 = skb_clone(skb, GFP_ATOMIC); | 1095 | skb1 = skb_clone(skb, GFP_ATOMIC); |
1093 | 1096 | ||