aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 08:47:49 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 15:39:53 -0400
commitc346dca10840a874240c78efe3f39acf4312a1f2 (patch)
treec04cff20124eba5cc337cc5ec260ad2513eeb065 /net/ipv6/icmp.c
parent7cbca67c073263c179f605bdbbdc565ab29d801d (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/icmp.c')
-rw-r--r--net/ipv6/icmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 86332417b402..50857662e6b7 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -306,7 +306,7 @@ static inline void mip6_addr_swap(struct sk_buff *skb) {}
306void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, 306void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
307 struct net_device *dev) 307 struct net_device *dev)
308{ 308{
309 struct net *net = skb->dev->nd_net; 309 struct net *net = dev_net(skb->dev);
310 struct inet6_dev *idev = NULL; 310 struct inet6_dev *idev = NULL;
311 struct ipv6hdr *hdr = ipv6_hdr(skb); 311 struct ipv6hdr *hdr = ipv6_hdr(skb);
312 struct sock *sk; 312 struct sock *sk;
@@ -507,7 +507,7 @@ EXPORT_SYMBOL(icmpv6_send);
507 507
508static void icmpv6_echo_reply(struct sk_buff *skb) 508static void icmpv6_echo_reply(struct sk_buff *skb)
509{ 509{
510 struct net *net = skb->dev->nd_net; 510 struct net *net = dev_net(skb->dev);
511 struct sock *sk; 511 struct sock *sk;
512 struct inet6_dev *idev; 512 struct inet6_dev *idev;
513 struct ipv6_pinfo *np; 513 struct ipv6_pinfo *np;