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

ipv6: Merge ip6_local_out and ip6_local_out_sk



Stop hidding the sk parameter with an inline helper function and make
all of the callers pass it, so that it is clear what the function is
doing.

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f8955cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -401,7 +401,7 @@ static int ipvlan_process_v6_outbound(struct sk_buff *skb)
	}
	skb_dst_drop(skb);
	skb_dst_set(skb, dst);
	err = ip6_local_out(skb);
	err = ip6_local_out(skb->sk, skb);
	if (unlikely(net_xmit_eval(err)))
		dev->stats.tx_errors++;
	else
+1 −1
Original line number 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;

	pkt_len = skb->len - skb_inner_network_offset(skb);
	err = ip6_local_out_sk(sk, skb);
	err = ip6_local_out(sk, skb);

	if (net_xmit_eval(err) == 0) {
		struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats);
+1 −2
Original line number Diff line number Diff line
@@ -866,8 +866,7 @@ int ip6_input(struct sk_buff *skb);
int ip6_mc_input(struct sk_buff *skb);

int __ip6_local_out(struct sock *sk, struct sk_buff *skb);
int ip6_local_out_sk(struct sock *sk, struct sk_buff *skb);
int ip6_local_out(struct sk_buff *skb);
int ip6_local_out(struct sock *sk, struct sk_buff *skb);

/*
 *	Extension header (options) processing
+1 −1
Original line number Diff line number Diff line
@@ -1692,7 +1692,7 @@ int ip6_send_skb(struct sk_buff *skb)
	struct rt6_info *rt = (struct rt6_info *)skb_dst(skb);
	int err;

	err = ip6_local_out(skb);
	err = ip6_local_out(skb->sk, skb);
	if (err) {
		if (err > 0)
			err = net_xmit_errno(err);
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ synproxy_send_tcp(const struct synproxy_net *snet,
		nf_conntrack_get(nfct);
	}

	ip6_local_out(nskb);
	ip6_local_out(nskb->sk, nskb);
	return;

free_nskb:
Loading