Commit b92dacd4 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller

ipv4: Merge __ip_local_out and __ip_local_out_sk

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4ebdfba7
...@@ -112,8 +112,7 @@ int ip_mc_output(struct sock *sk, struct sk_buff *skb); ...@@ -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 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_sk(struct sock *sk, struct sk_buff *skb); int __ip_local_out(struct sock *sk, struct sk_buff *skb);
int __ip_local_out(struct sk_buff *skb);
int ip_local_out_sk(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) static inline int ip_local_out(struct sk_buff *skb)
{ {
......
...@@ -96,7 +96,7 @@ void ip_send_check(struct iphdr *iph) ...@@ -96,7 +96,7 @@ void ip_send_check(struct iphdr *iph)
} }
EXPORT_SYMBOL(ip_send_check); 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 net *net = dev_net(skb_dst(skb)->dev);
struct iphdr *iph = ip_hdr(skb); struct iphdr *iph = ip_hdr(skb);
...@@ -108,17 +108,12 @@ int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb) ...@@ -108,17 +108,12 @@ int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
dst_output); 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) int ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
{ {
struct net *net = dev_net(skb_dst(skb)->dev); struct net *net = dev_net(skb_dst(skb)->dev);
int err; int err;
err = __ip_local_out_sk(sk, skb); err = __ip_local_out(sk, skb);
if (likely(err == 1)) if (likely(err == 1))
err = dst_output(net, sk, skb); err = dst_output(net, sk, skb);
......
...@@ -165,7 +165,7 @@ static struct dst_ops ipv4_dst_ops = { ...@@ -165,7 +165,7 @@ static struct dst_ops ipv4_dst_ops = {
.link_failure = ipv4_link_failure, .link_failure = ipv4_link_failure,
.update_pmtu = ip_rt_update_pmtu, .update_pmtu = ip_rt_update_pmtu,
.redirect = ip_do_redirect, .redirect = ip_do_redirect,
.local_out = __ip_local_out_sk, .local_out = __ip_local_out,
.neigh_lookup = ipv4_neigh_lookup, .neigh_lookup = ipv4_neigh_lookup,
}; };
......
...@@ -243,7 +243,7 @@ static struct dst_ops xfrm4_dst_ops = { ...@@ -243,7 +243,7 @@ static struct dst_ops xfrm4_dst_ops = {
.cow_metrics = dst_cow_metrics_generic, .cow_metrics = dst_cow_metrics_generic,
.destroy = xfrm4_dst_destroy, .destroy = xfrm4_dst_destroy,
.ifdown = xfrm4_dst_ifdown, .ifdown = xfrm4_dst_ifdown,
.local_out = __ip_local_out_sk, .local_out = __ip_local_out,
.gc_thresh = 32768, .gc_thresh = 32768,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment