aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-10-07 17:48:35 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-08 07:26:54 -0400
commit13206b6bff3b15b724926a222406476bf2c23c40 (patch)
tree4d433aa937254f44d86411cd33355072b56925ab /net/ipv4
parent3f5312ae620c79e877a6aa0e8894c6603a090b4e (diff)
net: Pass net into dst_output and remove dst_output_okfn
Replace dst_output_okfn with dst_output 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_forward.c2
-rw-r--r--net/ipv4/ip_output.c7
-rw-r--r--net/ipv4/ip_vti.c2
-rw-r--r--net/ipv4/ipmr.c2
-rw-r--r--net/ipv4/raw.c2
-rw-r--r--net/ipv4/xfrm4_output.c2
6 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index d66cfb35ba74..da0d7ce85844 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -72,7 +72,7 @@ static int ip_forward_finish(struct net *net, struct sock *sk, struct sk_buff *s
72 ip_forward_options(skb); 72 ip_forward_options(skb);
73 73
74 skb_sender_cpu_clear(skb); 74 skb_sender_cpu_clear(skb);
75 return dst_output(sk, skb); 75 return dst_output(net, sk, skb);
76} 76}
77 77
78int ip_forward(struct sk_buff *skb) 78int ip_forward(struct sk_buff *skb)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 1030f48d66e1..c94efb22f380 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -105,7 +105,7 @@ static int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
105 ip_send_check(iph); 105 ip_send_check(iph);
106 return nf_hook(NFPROTO_IPV4, NF_INET_LOCAL_OUT, 106 return nf_hook(NFPROTO_IPV4, NF_INET_LOCAL_OUT,
107 net, sk, skb, NULL, skb_dst(skb)->dev, 107 net, sk, skb, NULL, skb_dst(skb)->dev,
108 dst_output_okfn); 108 dst_output);
109} 109}
110 110
111int __ip_local_out(struct sk_buff *skb) 111int __ip_local_out(struct sk_buff *skb)
@@ -115,11 +115,12 @@ int __ip_local_out(struct sk_buff *skb)
115 115
116int ip_local_out_sk(struct sock *sk, struct sk_buff *skb) 116int ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
117{ 117{
118 struct net *net = dev_net(skb_dst(skb)->dev);
118 int err; 119 int err;
119 120
120 err = __ip_local_out_sk(sk, skb); 121 err = __ip_local_out_sk(sk, skb);
121 if (likely(err == 1)) 122 if (likely(err == 1))
122 err = dst_output(sk, skb); 123 err = dst_output(net, sk, skb);
123 124
124 return err; 125 return err;
125} 126}
@@ -276,7 +277,7 @@ static int ip_finish_output(struct net *net, struct sock *sk, struct sk_buff *sk
276 /* Policy lookup after SNAT yielded a new policy */ 277 /* Policy lookup after SNAT yielded a new policy */
277 if (skb_dst(skb)->xfrm) { 278 if (skb_dst(skb)->xfrm) {
278 IPCB(skb)->flags |= IPSKB_REROUTED; 279 IPCB(skb)->flags |= IPSKB_REROUTED;
279 return dst_output(sk, skb); 280 return dst_output(net, sk, skb);
280 } 281 }
281#endif 282#endif
282 mtu = ip_skb_dst_mtu(skb); 283 mtu = ip_skb_dst_mtu(skb);
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 3b87ec5178f9..4d8f0b698777 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -197,7 +197,7 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev,
197 skb_dst_set(skb, dst); 197 skb_dst_set(skb, dst);
198 skb->dev = skb_dst(skb)->dev; 198 skb->dev = skb_dst(skb)->dev;
199 199
200 err = dst_output(skb->sk, skb); 200 err = dst_output(tunnel->net, skb->sk, skb);
201 if (net_xmit_eval(err) == 0) 201 if (net_xmit_eval(err) == 0)
202 err = skb->len; 202 err = skb->len;
203 iptunnel_xmit_stats(err, &dev->stats, dev->tstats); 203 iptunnel_xmit_stats(err, &dev->stats, dev->tstats);
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index cfcb996ec51b..fc42525d8694 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1689,7 +1689,7 @@ static inline int ipmr_forward_finish(struct net *net, struct sock *sk,
1689 if (unlikely(opt->optlen)) 1689 if (unlikely(opt->optlen))
1690 ip_forward_options(skb); 1690 ip_forward_options(skb);
1691 1691
1692 return dst_output(sk, skb); 1692 return dst_output(net, sk, skb);
1693} 1693}
1694 1694
1695/* 1695/*
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 09a07e8b2f35..8c0d0bdc2a7c 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -413,7 +413,7 @@ static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4,
413 413
414 err = NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_OUT, 414 err = NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_OUT,
415 net, sk, skb, NULL, rt->dst.dev, 415 net, sk, skb, NULL, rt->dst.dev,
416 dst_output_okfn); 416 dst_output);
417 if (err > 0) 417 if (err > 0)
418 err = net_xmit_errno(err); 418 err = net_xmit_errno(err);
419 if (err) 419 if (err)
diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c
index cd6be736e19f..17db61f4b439 100644
--- a/net/ipv4/xfrm4_output.c
+++ b/net/ipv4/xfrm4_output.c
@@ -87,7 +87,7 @@ static int __xfrm4_output(struct net *net, struct sock *sk, struct sk_buff *skb)
87#ifdef CONFIG_NETFILTER 87#ifdef CONFIG_NETFILTER
88 if (!x) { 88 if (!x) {
89 IPCB(skb)->flags |= IPSKB_REROUTED; 89 IPCB(skb)->flags |= IPSKB_REROUTED;
90 return dst_output(sk, skb); 90 return dst_output(net, sk, skb);
91 } 91 }
92#endif 92#endif
93 93