summaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki2008-03-25 19:57:35 +0100
committerYOSHIFUJI Hideaki2008-03-25 20:40:00 +0100
commit878628fbf2589eb24357e42027d5f54b1dafd3c8 (patch)
tree30c109d8f337b3910e3b5364877c3c521dd700b5 /net/ipv6/udp.c
parent[NET] NETNS: Omit neigh_parms->net and pneigh_entry->net without CONFIG_NET_NS. (diff)
downloadkernel-qcow2-linux-878628fbf2589eb24357e42027d5f54b1dafd3c8.tar.gz
kernel-qcow2-linux-878628fbf2589eb24357e42027d5f54b1dafd3c8.tar.xz
kernel-qcow2-linux-878628fbf2589eb24357e42027d5f54b1dafd3c8.zip
[NET] NETNS: Omit namespace comparision without CONFIG_NET_NS.
Introduce an inline net_eq() to compare two namespaces. Without CONFIG_NET_NS, since no namespace other than &init_net exists, it is always 1. We do not need to convert 1) inline vs inline and 2) inline vs &init_net comparisons. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index db266ff297e5..aacbc82ecf0f 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -70,7 +70,7 @@ static struct sock *__udp6_lib_lookup(struct net *net,
sk_for_each(sk, node, &udptable[hnum & (UDP_HTABLE_SIZE - 1)]) {
struct inet_sock *inet = inet_sk(sk);
- if (sock_net(sk) == net && sk->sk_hash == hnum &&
+ if (net_eq(sock_net(sk), net) && sk->sk_hash == hnum &&
sk->sk_family == PF_INET6) {
struct ipv6_pinfo *np = inet6_sk(sk);
int score = 0;