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: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9f8955cc46
commit
792883303c
@@ -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);
|
||||
|
@@ -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:
|
||||
|
@@ -68,7 +68,7 @@ void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum,
|
||||
}
|
||||
if (nf_dup_ipv6_route(net, skb, gw, oif)) {
|
||||
__this_cpu_write(nf_skb_duplicated, true);
|
||||
ip6_local_out(skb);
|
||||
ip6_local_out(skb->sk, skb);
|
||||
__this_cpu_write(nf_skb_duplicated, false);
|
||||
} else {
|
||||
kfree_skb(skb);
|
||||
|
@@ -206,7 +206,7 @@ void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook)
|
||||
dev_queue_xmit(nskb);
|
||||
} else
|
||||
#endif
|
||||
ip6_local_out(nskb);
|
||||
ip6_local_out(nskb->sk, nskb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nf_send_reset6);
|
||||
|
||||
|
@@ -155,7 +155,7 @@ int __ip6_local_out(struct sock *sk, struct sk_buff *skb)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__ip6_local_out);
|
||||
|
||||
int ip6_local_out_sk(struct sock *sk, struct sk_buff *skb)
|
||||
int ip6_local_out(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
struct net *net = dev_net(skb_dst(skb)->dev);
|
||||
int err;
|
||||
@@ -166,10 +166,4 @@ int ip6_local_out_sk(struct sock *sk, struct sk_buff *skb)
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ip6_local_out_sk);
|
||||
|
||||
int ip6_local_out(struct sk_buff *skb)
|
||||
{
|
||||
return ip6_local_out_sk(skb->sk, skb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ip6_local_out);
|
||||
|
Reference in New Issue
Block a user