aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/raw.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/ipv4/raw.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/ipv4/raw.c')
-rw-r--r--net/ipv4/raw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 3f68a937b602..8756d502a47f 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -168,7 +168,7 @@ static int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash)
168 if (hlist_empty(head)) 168 if (hlist_empty(head))
169 goto out; 169 goto out;
170 170
171 net = skb->dev->nd_net; 171 net = dev_net(skb->dev);
172 sk = __raw_v4_lookup(net, __sk_head(head), iph->protocol, 172 sk = __raw_v4_lookup(net, __sk_head(head), iph->protocol,
173 iph->saddr, iph->daddr, 173 iph->saddr, iph->daddr,
174 skb->dev->ifindex); 174 skb->dev->ifindex);
@@ -276,7 +276,7 @@ void raw_icmp_error(struct sk_buff *skb, int protocol, u32 info)
276 raw_sk = sk_head(&raw_v4_hashinfo.ht[hash]); 276 raw_sk = sk_head(&raw_v4_hashinfo.ht[hash]);
277 if (raw_sk != NULL) { 277 if (raw_sk != NULL) {
278 iph = (struct iphdr *)skb->data; 278 iph = (struct iphdr *)skb->data;
279 net = skb->dev->nd_net; 279 net = dev_net(skb->dev);
280 280
281 while ((raw_sk = __raw_v4_lookup(net, raw_sk, protocol, 281 while ((raw_sk = __raw_v4_lookup(net, raw_sk, protocol,
282 iph->daddr, iph->saddr, 282 iph->daddr, iph->saddr,