ipv4: Merge __ip_local_out and __ip_local_out_sk
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 7 Oct 2015 21:48:37 +0000 (16:48 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Oct 2015 11:26:57 +0000 (04:26 -0700)
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/ip_output.c
net/ipv4/route.c
net/ipv4/xfrm4_policy.c

index ea1f721f7224dc52a08b229f7e950eee2fff5b95..46272e04f3b674175d5092954bdb12806f234634 100644 (file)
@@ -112,8 +112,7 @@ int ip_mc_output(struct sock *sk, struct sk_buff *skb);
 int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
                   int (*output)(struct net *, struct sock *, struct sk_buff *));
 void ip_send_check(struct iphdr *ip);
-int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb);
-int __ip_local_out(struct sk_buff *skb);
+int __ip_local_out(struct sock *sk, struct sk_buff *skb);
 int ip_local_out_sk(struct sock *sk, struct sk_buff *skb);
 static inline int ip_local_out(struct sk_buff *skb)
 {
index c38dfd7404fbb54065c924121601177b70998fb5..66c627b85a91dcc5e49cba3714df5d795954f32f 100644 (file)
@@ -96,7 +96,7 @@ void ip_send_check(struct iphdr *iph)
 }
 EXPORT_SYMBOL(ip_send_check);
 
-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);
        struct iphdr *iph = ip_hdr(skb);
@@ -108,17 +108,12 @@ int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
                       dst_output);
 }
 
-int __ip_local_out(struct sk_buff *skb)
-{
-       return __ip_local_out_sk(skb->sk, skb);
-}
-
 int ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
 {
        struct net *net = dev_net(skb_dst(skb)->dev);
        int err;
 
-       err = __ip_local_out_sk(sk, skb);
+       err = __ip_local_out(sk, skb);
        if (likely(err == 1))
                err = dst_output(net, sk, skb);
 
index 638b976008b7d5946bc56ee2caeff7e93164ae4a..bf1486bd7e811d64d5c4a69173dfa9c64a877456 100644 (file)
@@ -165,7 +165,7 @@ static struct dst_ops ipv4_dst_ops = {
        .link_failure =         ipv4_link_failure,
        .update_pmtu =          ip_rt_update_pmtu,
        .redirect =             ip_do_redirect,
-       .local_out =            __ip_local_out_sk,
+       .local_out =            __ip_local_out,
        .neigh_lookup =         ipv4_neigh_lookup,
 };
 
index d46d99f9cabd05216085aa2ad78f53bb985272d6..f2606b9056bb1b3f4e3038328b62a97895dbd566 100644 (file)
@@ -243,7 +243,7 @@ static struct dst_ops xfrm4_dst_ops = {
        .cow_metrics =          dst_cow_metrics_generic,
        .destroy =              xfrm4_dst_destroy,
        .ifdown =               xfrm4_dst_ifdown,
-       .local_out =            __ip_local_out_sk,
+       .local_out =            __ip_local_out,
        .gc_thresh =            32768,
 };
 
This page took 0.029721 seconds and 5 git commands to generate.