diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 08:47:49 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 15:39:53 -0400 |
commit | c346dca10840a874240c78efe3f39acf4312a1f2 (patch) | |
tree | c04cff20124eba5cc337cc5ec260ad2513eeb065 /net/ipv6/udp.c | |
parent | 7cbca67c073263c179f605bdbbdc565ab29d801d (diff) |
[NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.
Introduce per-net_device inlines: dev_net(), dev_net_set().
Without CONFIG_NET_NS, no namespace other than &init_net exists.
Let's explicitly define them to help compiler optimizations.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 593d3efadaf9..6683c04b427e 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -235,7 +235,7 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
235 | struct sock *sk; | 235 | struct sock *sk; |
236 | int err; | 236 | int err; |
237 | 237 | ||
238 | sk = __udp6_lib_lookup(skb->dev->nd_net, daddr, uh->dest, | 238 | sk = __udp6_lib_lookup(dev_net(skb->dev), daddr, uh->dest, |
239 | saddr, uh->source, inet6_iif(skb), udptable); | 239 | saddr, uh->source, inet6_iif(skb), udptable); |
240 | if (sk == NULL) | 240 | if (sk == NULL) |
241 | return; | 241 | return; |
@@ -483,7 +483,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], | |||
483 | * check socket cache ... must talk to Alan about his plans | 483 | * check socket cache ... must talk to Alan about his plans |
484 | * for sock caches... i'll skip this for now. | 484 | * for sock caches... i'll skip this for now. |
485 | */ | 485 | */ |
486 | sk = __udp6_lib_lookup(skb->dev->nd_net, saddr, uh->source, | 486 | sk = __udp6_lib_lookup(dev_net(skb->dev), saddr, uh->source, |
487 | daddr, uh->dest, inet6_iif(skb), udptable); | 487 | daddr, uh->dest, inet6_iif(skb), udptable); |
488 | 488 | ||
489 | if (sk == NULL) { | 489 | if (sk == NULL) { |