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

Commit 33224b16 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller
Browse files

ipv4, ipv6: Pass net into ip_local_out and ip6_local_out

parent cf91a99d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -365,7 +365,7 @@ static int ipvlan_process_v4_outbound(struct sk_buff *skb)
	}
	}
	skb_dst_drop(skb);
	skb_dst_drop(skb);
	skb_dst_set(skb, &rt->dst);
	skb_dst_set(skb, &rt->dst);
	err = ip_local_out(skb->sk, skb);
	err = ip_local_out(net, skb->sk, skb);
	if (unlikely(net_xmit_eval(err)))
	if (unlikely(net_xmit_eval(err)))
		dev->stats.tx_errors++;
		dev->stats.tx_errors++;
	else
	else
@@ -403,7 +403,7 @@ static int ipvlan_process_v6_outbound(struct sk_buff *skb)
	}
	}
	skb_dst_drop(skb);
	skb_dst_drop(skb);
	skb_dst_set(skb, dst);
	skb_dst_set(skb, dst);
	err = ip6_local_out(skb->sk, skb);
	err = ip6_local_out(net, skb->sk, skb);
	if (unlikely(net_xmit_eval(err)))
	if (unlikely(net_xmit_eval(err)))
		dev->stats.tx_errors++;
		dev->stats.tx_errors++;
	else
	else
+1 −1
Original line number Original line Diff line number Diff line
@@ -283,7 +283,7 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
	ip_select_ident(net, skb, NULL);
	ip_select_ident(net, skb, NULL);
	ip_send_check(iph);
	ip_send_check(iph);


	ip_local_out(skb->sk, skb);
	ip_local_out(net, skb->sk, skb);
	return 1;
	return 1;


tx_error:
tx_error:
+2 −2
Original line number Original line Diff line number Diff line
@@ -76,7 +76,7 @@ static struct dst_entry *vrf_ip_check(struct dst_entry *dst, u32 cookie)


static int vrf_ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb)
static int vrf_ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb)
{
{
	return ip_local_out(sk, skb);
	return ip_local_out(net, sk, skb);
}
}


static unsigned int vrf_v4_mtu(const struct dst_entry *dst)
static unsigned int vrf_v4_mtu(const struct dst_entry *dst)
@@ -222,7 +222,7 @@ static netdev_tx_t vrf_process_v4_outbound(struct sk_buff *skb,
					       RT_SCOPE_LINK);
					       RT_SCOPE_LINK);
	}
	}


	ret = ip_local_out(skb->sk, skb);
	ret = ip_local_out(dev_net(skb_dst(skb)->dev), skb->sk, skb);
	if (unlikely(net_xmit_eval(ret)))
	if (unlikely(net_xmit_eval(ret)))
		vrf_dev->stats.tx_errors++;
		vrf_dev->stats.tx_errors++;
	else
	else
+1 −1
Original line number Original line Diff line number Diff line
@@ -113,7 +113,7 @@ int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
		   int (*output)(struct net *, struct sock *, struct sk_buff *));
		   int (*output)(struct net *, struct sock *, struct sk_buff *));
void ip_send_check(struct iphdr *ip);
void ip_send_check(struct iphdr *ip);
int __ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
int __ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
int ip_local_out(struct sock *sk, struct sk_buff *skb);
int ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);


int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
void ip_init(void);
void ip_init(void);
+1 −1
Original line number Original line Diff line number Diff line
@@ -87,7 +87,7 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
	int pkt_len, err;
	int pkt_len, err;


	pkt_len = skb->len - skb_inner_network_offset(skb);
	pkt_len = skb->len - skb_inner_network_offset(skb);
	err = ip6_local_out(sk, skb);
	err = ip6_local_out(dev_net(skb_dst(skb)->dev), sk, skb);


	if (net_xmit_eval(err) == 0) {
	if (net_xmit_eval(err) == 0) {
		struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats);
		struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats);
Loading