Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca12a1a4 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by David S. Miller
Browse files

inet: prepare net on the stack for NET accounting macros

parent 5c52ba17
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -93,8 +93,9 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
	struct sock *sk;
	int err;
	__u64 seq;
	struct net *net = dev_net(skb->dev);

	sk = inet6_lookup(dev_net(skb->dev), &dccp_hashinfo,
	sk = inet6_lookup(net, &dccp_hashinfo,
			&hdr->daddr, dh->dccph_dport,
			&hdr->saddr, dh->dccph_sport, inet6_iif(skb));

+2 −1
Original line number Diff line number Diff line
@@ -421,8 +421,9 @@ static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)
	struct rtable *rt;
	int flag = 0;
	/*unsigned long now; */
	struct net *net = dev_net(dev);

	if (ip_route_output_key(dev_net(dev), &rt, &fl) < 0)
	if (ip_route_output_key(net, &rt, &fl) < 0)
		return 1;
	if (rt->u.dst.dev != dev) {
		NET_INC_STATS_BH(LINUX_MIB_ARPFILTER);
+2 −1
Original line number Diff line number Diff line
@@ -323,8 +323,9 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
	int err;
	struct tcp_sock *tp;
	__u32 seq;
	struct net *net = dev_net(skb->dev);

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

	if (sk == NULL) {