diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-10-07 17:48:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-08 07:26:55 -0400 |
commit | 4ebdfba73c09d8568d891bae87c40fad43dd7f41 (patch) | |
tree | f90cbfbed25de48ec9972d9b294cdcd856f05a12 /net/ipv4 | |
parent | 13206b6bff3b15b724926a222406476bf2c23c40 (diff) |
dst: Pass a sk into .local_out
For consistency with the other similar methods in the kernel pass a
struct sock into the dst_ops .local_out method.
Simplifying the socket passing case is needed a prequel to passing a
struct net reference into .local_out.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_output.c | 2 | ||||
-rw-r--r-- | net/ipv4/route.c | 2 | ||||
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index c94efb22f380..c38dfd7404fb 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -96,7 +96,7 @@ void ip_send_check(struct iphdr *iph) | |||
96 | } | 96 | } |
97 | EXPORT_SYMBOL(ip_send_check); | 97 | EXPORT_SYMBOL(ip_send_check); |
98 | 98 | ||
99 | static int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb) | 99 | int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb) |
100 | { | 100 | { |
101 | struct net *net = dev_net(skb_dst(skb)->dev); | 101 | struct net *net = dev_net(skb_dst(skb)->dev); |
102 | struct iphdr *iph = ip_hdr(skb); | 102 | struct iphdr *iph = ip_hdr(skb); |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index bf1486bd7e81..638b976008b7 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -165,7 +165,7 @@ static struct dst_ops ipv4_dst_ops = { | |||
165 | .link_failure = ipv4_link_failure, | 165 | .link_failure = ipv4_link_failure, |
166 | .update_pmtu = ip_rt_update_pmtu, | 166 | .update_pmtu = ip_rt_update_pmtu, |
167 | .redirect = ip_do_redirect, | 167 | .redirect = ip_do_redirect, |
168 | .local_out = __ip_local_out, | 168 | .local_out = __ip_local_out_sk, |
169 | .neigh_lookup = ipv4_neigh_lookup, | 169 | .neigh_lookup = ipv4_neigh_lookup, |
170 | }; | 170 | }; |
171 | 171 | ||
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index f2606b9056bb..d46d99f9cabd 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -243,7 +243,7 @@ static struct dst_ops xfrm4_dst_ops = { | |||
243 | .cow_metrics = dst_cow_metrics_generic, | 243 | .cow_metrics = dst_cow_metrics_generic, |
244 | .destroy = xfrm4_dst_destroy, | 244 | .destroy = xfrm4_dst_destroy, |
245 | .ifdown = xfrm4_dst_ifdown, | 245 | .ifdown = xfrm4_dst_ifdown, |
246 | .local_out = __ip_local_out, | 246 | .local_out = __ip_local_out_sk, |
247 | .gc_thresh = 32768, | 247 | .gc_thresh = 32768, |
248 | }; | 248 | }; |
249 | 249 | ||