aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-07-16 23:28:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-16 23:28:42 -0400
commitca12a1a443a51298afcca627ad0bcbd8ad1dcddc (patch)
tree9eebfe3f3b5812ea524d0b32223fb622a8d12bc8
parent5c52ba170f8167511bdb65b981f4582100c40675 (diff)
inet: prepare net on the stack for NET accounting macros
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/dccp/ipv6.c3
-rw-r--r--net/ipv4/arp.c3
-rw-r--r--net/ipv6/tcp_ipv6.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index eec3c4717890..83cc9bbc6208 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -93,8 +93,9 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
93 struct sock *sk; 93 struct sock *sk;
94 int err; 94 int err;
95 __u64 seq; 95 __u64 seq;
96 struct net *net = dev_net(skb->dev);
96 97
97 sk = inet6_lookup(dev_net(skb->dev), &dccp_hashinfo, 98 sk = inet6_lookup(net, &dccp_hashinfo,
98 &hdr->daddr, dh->dccph_dport, 99 &hdr->daddr, dh->dccph_dport,
99 &hdr->saddr, dh->dccph_sport, inet6_iif(skb)); 100 &hdr->saddr, dh->dccph_sport, inet6_iif(skb));
100 101
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 29df75a6bcc7..aab98b8a9945 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -421,8 +421,9 @@ static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)
421 struct rtable *rt; 421 struct rtable *rt;
422 int flag = 0; 422 int flag = 0;
423 /*unsigned long now; */ 423 /*unsigned long now; */
424 struct net *net = dev_net(dev);
424 425
425 if (ip_route_output_key(dev_net(dev), &rt, &fl) < 0) 426 if (ip_route_output_key(net, &rt, &fl) < 0)
426 return 1; 427 return 1;
427 if (rt->u.dst.dev != dev) { 428 if (rt->u.dst.dev != dev) {
428 NET_INC_STATS_BH(LINUX_MIB_ARPFILTER); 429 NET_INC_STATS_BH(LINUX_MIB_ARPFILTER);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 3895d91ea9fa..d58b83ac06fb 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -323,8 +323,9 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
323 int err; 323 int err;
324 struct tcp_sock *tp; 324 struct tcp_sock *tp;
325 __u32 seq; 325 __u32 seq;
326 struct net *net = dev_net(skb->dev);
326 327
327 sk = inet6_lookup(dev_net(skb->dev), &tcp_hashinfo, &hdr->daddr, 328 sk = inet6_lookup(net, &tcp_hashinfo, &hdr->daddr,
328 th->dest, &hdr->saddr, th->source, skb->dev->ifindex); 329 th->dest, &hdr->saddr, th->source, skb->dev->ifindex);
329 330
330 if (sk == NULL) { 331 if (sk == NULL) {