diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 05:06:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 05:06:29 -0500 |
commit | cec03afcb62fbbb0eaf943f6349ade61b89d7d40 (patch) | |
tree | cc80c13e373337d1c1dee9dd7269173da1f7c079 /net/ipv6/udp.c | |
parent | 2da53b0134ad41b91556d2d2a322cc03487a1ab7 (diff) | |
parent | 4814bdbd590e835ecec2d5e505165ec1c19796b2 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (173 commits)
[NETNS]: Lookup in FIB semantic hashes taking into account the namespace.
[NETNS]: Add a namespace mark to fib_info.
[IPV4]: fib_sync_down rework.
[NETNS]: Process interface address manipulation routines in the namespace.
[IPV4]: Small style cleanup of the error path in rtm_to_ifaddr.
[IPV4]: Fix memory leak on error path during FIB initialization.
[NETFILTER]: Ipv6-related xt_hashlimit compilation fix.
[NET_SCHED]: Add flow classifier
[NET_SCHED]: sch_sfq: make internal queues visible as classes
[NET_SCHED]: sch_sfq: add support for external classifiers
[NET_SCHED]: Constify struct tcf_ext_map
[BLUETOOTH]: Fix bugs in previous conn add/del workqueue changes.
[TCP]: Unexport sysctl_tcp_tso_win_divisor
[IPV4]: Make struct ipv4_devconf static.
[TR] net/802/tr.c: sysctl_tr_rif_timeout static
[XFRM]: Fix statistics.
[XFRM]: Remove unused exports.
[PKT_SCHED] sch_teql.c: Duplicate IFF_BROADCAST in FMASK, remove 2nd.
[BNX2]: Fix ASYM PAUSE advertisement for remote PHY.
[IPV4] route cache: Introduce rt_genid for smooth cache invalidation
...
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index bd4b9df8f614..53739de829db 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -56,7 +56,8 @@ static inline int udp_v6_get_port(struct sock *sk, unsigned short snum) | |||
56 | return udp_get_port(sk, snum, ipv6_rcv_saddr_equal); | 56 | return udp_get_port(sk, snum, ipv6_rcv_saddr_equal); |
57 | } | 57 | } |
58 | 58 | ||
59 | static struct sock *__udp6_lib_lookup(struct in6_addr *saddr, __be16 sport, | 59 | static struct sock *__udp6_lib_lookup(struct net *net, |
60 | struct in6_addr *saddr, __be16 sport, | ||
60 | struct in6_addr *daddr, __be16 dport, | 61 | struct in6_addr *daddr, __be16 dport, |
61 | int dif, struct hlist_head udptable[]) | 62 | int dif, struct hlist_head udptable[]) |
62 | { | 63 | { |
@@ -69,7 +70,8 @@ static struct sock *__udp6_lib_lookup(struct in6_addr *saddr, __be16 sport, | |||
69 | sk_for_each(sk, node, &udptable[hnum & (UDP_HTABLE_SIZE - 1)]) { | 70 | sk_for_each(sk, node, &udptable[hnum & (UDP_HTABLE_SIZE - 1)]) { |
70 | struct inet_sock *inet = inet_sk(sk); | 71 | struct inet_sock *inet = inet_sk(sk); |
71 | 72 | ||
72 | if (sk->sk_hash == hnum && sk->sk_family == PF_INET6) { | 73 | if (sk->sk_net == net && sk->sk_hash == hnum && |
74 | sk->sk_family == PF_INET6) { | ||
73 | struct ipv6_pinfo *np = inet6_sk(sk); | 75 | struct ipv6_pinfo *np = inet6_sk(sk); |
74 | int score = 0; | 76 | int score = 0; |
75 | if (inet->dport) { | 77 | if (inet->dport) { |
@@ -233,7 +235,7 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
233 | struct sock *sk; | 235 | struct sock *sk; |
234 | int err; | 236 | int err; |
235 | 237 | ||
236 | sk = __udp6_lib_lookup(daddr, uh->dest, | 238 | sk = __udp6_lib_lookup(skb->dev->nd_net, daddr, uh->dest, |
237 | saddr, uh->source, inet6_iif(skb), udptable); | 239 | saddr, uh->source, inet6_iif(skb), udptable); |
238 | if (sk == NULL) | 240 | if (sk == NULL) |
239 | return; | 241 | return; |
@@ -478,7 +480,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], | |||
478 | * check socket cache ... must talk to Alan about his plans | 480 | * check socket cache ... must talk to Alan about his plans |
479 | * for sock caches... i'll skip this for now. | 481 | * for sock caches... i'll skip this for now. |
480 | */ | 482 | */ |
481 | sk = __udp6_lib_lookup(saddr, uh->source, | 483 | sk = __udp6_lib_lookup(skb->dev->nd_net, saddr, uh->source, |
482 | daddr, uh->dest, inet6_iif(skb), udptable); | 484 | daddr, uh->dest, inet6_iif(skb), udptable); |
483 | 485 | ||
484 | if (sk == NULL) { | 486 | if (sk == NULL) { |