diff options
author | Eric Dumazet <edumazet@google.com> | 2014-04-15 13:47:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-15 13:47:15 -0400 |
commit | aad88724c9d54acb1a9737cb6069d8470fa85f74 (patch) | |
tree | 78cc7b925f3d05338373898f018892b8f434a948 /include/net/ip.h | |
parent | b0270e91014dabfceaf37f5b40ad51bbf21a1302 (diff) |
ipv4: add a sock pointer to dst->output() path.
In the dst->output() path for ipv4, the code assumes the skb it has to
transmit is attached to an inet socket, specifically via
ip_mc_output() : The sk_mc_loop() test triggers a WARN_ON() when the
provider of the packet is an AF_PACKET socket.
The dst->output() method gets an additional 'struct sock *sk'
parameter. This needs a cascade of changes so that this parameter can
be propagated from vxlan to final consumer.
Fixes: 8f646c922d55 ("vxlan: keep original skb ownership")
Reported-by: lucien xin <lucien.xin@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 77e73d293e09..3ec2b0fb9d83 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -104,13 +104,18 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, | |||
104 | struct net_device *orig_dev); | 104 | struct net_device *orig_dev); |
105 | int ip_local_deliver(struct sk_buff *skb); | 105 | int ip_local_deliver(struct sk_buff *skb); |
106 | int ip_mr_input(struct sk_buff *skb); | 106 | int ip_mr_input(struct sk_buff *skb); |
107 | int ip_output(struct sk_buff *skb); | 107 | int ip_output(struct sock *sk, struct sk_buff *skb); |
108 | int ip_mc_output(struct sk_buff *skb); | 108 | int ip_mc_output(struct sock *sk, struct sk_buff *skb); |
109 | int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); | 109 | int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); |
110 | int ip_do_nat(struct sk_buff *skb); | 110 | int ip_do_nat(struct sk_buff *skb); |
111 | void ip_send_check(struct iphdr *ip); | 111 | void ip_send_check(struct iphdr *ip); |
112 | int __ip_local_out(struct sk_buff *skb); | 112 | int __ip_local_out(struct sk_buff *skb); |
113 | int ip_local_out(struct sk_buff *skb); | 113 | int ip_local_out_sk(struct sock *sk, struct sk_buff *skb); |
114 | static inline int ip_local_out(struct sk_buff *skb) | ||
115 | { | ||
116 | return ip_local_out_sk(skb->sk, skb); | ||
117 | } | ||
118 | |||
114 | int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl); | 119 | int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl); |
115 | void ip_init(void); | 120 | void ip_init(void); |
116 | int ip_append_data(struct sock *sk, struct flowi4 *fl4, | 121 | int ip_append_data(struct sock *sk, struct flowi4 *fl4, |