ipv4: Merge ip_local_out and ip_local_out_sk
It is confusing and silly hiding a parameter so modify all of
the callers to pass in the appropriate socket or skb->sk if
no socket is known.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 66c627b..10366ee 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -108,7 +108,7 @@
dst_output);
}
-int ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
+int ip_local_out(struct sock *sk, struct sk_buff *skb)
{
struct net *net = dev_net(skb_dst(skb)->dev);
int err;
@@ -119,7 +119,7 @@
return err;
}
-EXPORT_SYMBOL_GPL(ip_local_out_sk);
+EXPORT_SYMBOL_GPL(ip_local_out);
static inline int ip_select_ttl(struct inet_sock *inet, struct dst_entry *dst)
{
@@ -169,7 +169,7 @@
skb->mark = sk->sk_mark;
/* Send it out. */
- return ip_local_out(skb);
+ return ip_local_out(skb->sk, skb);
}
EXPORT_SYMBOL_GPL(ip_build_and_send_pkt);
@@ -456,7 +456,7 @@
skb->priority = sk->sk_priority;
skb->mark = sk->sk_mark;
- res = ip_local_out_sk(sk, skb);
+ res = ip_local_out(sk, skb);
rcu_read_unlock();
return res;
@@ -1436,7 +1436,7 @@
{
int err;
- err = ip_local_out(skb);
+ err = ip_local_out(skb->sk, skb);
if (err) {
if (err > 0)
err = net_xmit_errno(err);