summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-07-16 20:20:58 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-16 20:20:58 -0700
commita86b1e3019455283a677c2485cfeda2dc36df3eb (patch)
tree452f1ec6cba2a131d189be91a6f4ec1d50092827 /net/ipv6
parentc5346fe396f5e22bbfb3ec037c43891c3c57d3e6 (diff)
downloadop-kernel-dev-a86b1e3019455283a677c2485cfeda2dc36df3eb.zip
op-kernel-dev-a86b1e3019455283a677c2485cfeda2dc36df3eb.tar.gz
inet: prepare struct net for TCP MIB accounting
This is the same as the first patch in the set, but preparing the net for TCP_XXX_STATS - save the struct net on the stack where required and possible. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/tcp_ipv6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 30dbab7..fc5f716 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1617,6 +1617,7 @@ static int tcp_v6_rcv(struct sk_buff *skb)
struct tcphdr *th;
struct sock *sk;
int ret;
+ struct net *net = dev_net(skb->dev);
if (skb->pkt_type != PACKET_HOST)
goto discard_it;
@@ -1648,7 +1649,7 @@ static int tcp_v6_rcv(struct sk_buff *skb)
TCP_SKB_CB(skb)->flags = ipv6_get_dsfield(ipv6_hdr(skb));
TCP_SKB_CB(skb)->sacked = 0;
- sk = __inet6_lookup(dev_net(skb->dev), &tcp_hashinfo,
+ sk = __inet6_lookup(net, &tcp_hashinfo,
&ipv6_hdr(skb)->saddr, th->source,
&ipv6_hdr(skb)->daddr, ntohs(th->dest),
inet6_iif(skb));
OpenPOWER on IntegriCloud