Skip to content

Commit ca12a1a

Browse files
xemuldavem330
authored andcommitted
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>
1 parent 5c52ba1 commit ca12a1a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

net/dccp/ipv6.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
9393
struct sock *sk;
9494
int err;
9595
__u64 seq;
96+
struct net *net = dev_net(skb->dev);
9697

97-
sk = inet6_lookup(dev_net(skb->dev), &dccp_hashinfo,
98+
sk = inet6_lookup(net, &dccp_hashinfo,
9899
&hdr->daddr, dh->dccph_dport,
99100
&hdr->saddr, dh->dccph_sport, inet6_iif(skb));
100101

net/ipv4/arp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,9 @@ static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)
421421
struct rtable *rt;
422422
int flag = 0;
423423
/*unsigned long now; */
424+
struct net *net = dev_net(dev);
424425

425-
if (ip_route_output_key(dev_net(dev), &rt, &fl) < 0)
426+
if (ip_route_output_key(net, &rt, &fl) < 0)
426427
return 1;
427428
if (rt->u.dst.dev != dev) {
428429
NET_INC_STATS_BH(LINUX_MIB_ARPFILTER);

net/ipv6/tcp_ipv6.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,9 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
323323
int err;
324324
struct tcp_sock *tp;
325325
__u32 seq;
326+
struct net *net = dev_net(skb->dev);
326327

327-
sk = inet6_lookup(dev_net(skb->dev), &tcp_hashinfo, &hdr->daddr,
328+
sk = inet6_lookup(net, &tcp_hashinfo, &hdr->daddr,
328329
th->dest, &hdr->saddr, th->source, skb->dev->ifindex);
329330

330331
if (sk == NULL) {

0 commit comments

Comments
 (0)