diff options
author | David Miller <davem@davemloft.net> | 2015-04-05 22:19:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-07 15:29:08 -0400 |
commit | 79b16aadea32cce077acbe9e229fcb58a7801687 (patch) | |
tree | 8cfacda45a2b3d12a3831511199a13d33f245890 /net/tipc | |
parent | 7026b1ddb6b8d4e6ee33dc2bd06c0ca8746fa7ab (diff) |
udp_tunnel: Pass UDP socket down through udp_tunnel{, 6}_xmit_skb().
That was we can make sure the output path of ipv4/ipv6 operate on
the UDP socket rather than whatever random thing happens to be in
skb->sk.
Based upon a patch by Jiri Pirko.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/udp_media.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index ef3d7aa2854a..66deebc66aa1 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c | |||
@@ -176,7 +176,8 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb, | |||
176 | goto tx_error; | 176 | goto tx_error; |
177 | } | 177 | } |
178 | ttl = ip4_dst_hoplimit(&rt->dst); | 178 | ttl = ip4_dst_hoplimit(&rt->dst); |
179 | err = udp_tunnel_xmit_skb(rt, clone, src->ipv4.s_addr, | 179 | err = udp_tunnel_xmit_skb(rt, ub->ubsock->sk, clone, |
180 | src->ipv4.s_addr, | ||
180 | dst->ipv4.s_addr, 0, ttl, 0, | 181 | dst->ipv4.s_addr, 0, ttl, 0, |
181 | src->udp_port, dst->udp_port, | 182 | src->udp_port, dst->udp_port, |
182 | false, true); | 183 | false, true); |
@@ -197,7 +198,8 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb, | |||
197 | if (err) | 198 | if (err) |
198 | goto tx_error; | 199 | goto tx_error; |
199 | ttl = ip6_dst_hoplimit(ndst); | 200 | ttl = ip6_dst_hoplimit(ndst); |
200 | err = udp_tunnel6_xmit_skb(ndst, clone, ndst->dev, &src->ipv6, | 201 | err = udp_tunnel6_xmit_skb(ndst, ub->ubsock->sk, clone, |
202 | ndst->dev, &src->ipv6, | ||
201 | &dst->ipv6, 0, ttl, src->udp_port, | 203 | &dst->ipv6, 0, ttl, src->udp_port, |
202 | dst->udp_port, false); | 204 | dst->udp_port, false); |
203 | #endif | 205 | #endif |