summaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 21:47:49 +0900
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-26 04:39:53 +0900
commitc346dca10840a874240c78efe3f39acf4312a1f2 (patch)
treec04cff20124eba5cc337cc5ec260ad2513eeb065 /net/ipv6/icmp.c
parent7cbca67c073263c179f605bdbbdc565ab29d801d (diff)
downloadkernel-crypto-c346dca10840a874240c78efe3f39acf4312a1f2.tar.gz
kernel-crypto-c346dca10840a874240c78efe3f39acf4312a1f2.tar.xz
kernel-crypto-c346dca10840a874240c78efe3f39acf4312a1f2.zip
[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 86332417b40..50857662e6b 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) {}
void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
struct net_device *dev)
{
- struct net *net = skb->dev->nd_net;
+ struct net *net = dev_net(skb->dev);
struct inet6_dev *idev = NULL;
struct ipv6hdr *hdr = ipv6_hdr(skb);
struct sock *sk;
@@ -507,7 +507,7 @@ EXPORT_SYMBOL(icmpv6_send);
static void icmpv6_echo_reply(struct sk_buff *skb)
{
- struct net *net = skb->dev->nd_net;
+ struct net *net = dev_net(skb->dev);
struct sock *sk;
struct inet6_dev *idev;
struct ipv6_pinfo *np;