diff options
author | David S. Miller <davem@davemloft.net> | 2019-01-27 10:43:17 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-27 10:43:17 -0800 |
commit | 1d68101367a92336e633d0c3681bf8c86644e124 (patch) | |
tree | 8fdacef561481c25c71641b8fa91a5dfa0ba7f96 /net/ipv4/ip_tunnel.c | |
parent | 085c4c7dd2b6558fb079fad07d6e9064f5e0b4c2 (diff) | |
parent | 1fc7f56db7a7c467e46a5d2e2a009d2f337e0338 (diff) | |
download | linux-1d68101367a92336e633d0c3681bf8c86644e124.tar.gz linux-1d68101367a92336e633d0c3681bf8c86644e124.tar.bz2 linux-1d68101367a92336e633d0c3681bf8c86644e124.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4/ip_tunnel.c')
-rw-r--r-- | net/ipv4/ip_tunnel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index 3a15ee1a775e..893f013d5369 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -671,13 +671,19 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, dst = tnl_params->daddr; if (dst == 0) { /* NBMA tunnel */ + struct ip_tunnel_info *tun_info; if (!skb_dst(skb)) { dev->stats.tx_fifo_errors++; goto tx_error; } - if (skb->protocol == htons(ETH_P_IP)) { + tun_info = skb_tunnel_info(skb); + if (tun_info && (tun_info->mode & IP_TUNNEL_INFO_TX) && + ip_tunnel_info_af(tun_info) == AF_INET && + tun_info->key.u.ipv4.dst) + dst = tun_info->key.u.ipv4.dst; + else if (skb->protocol == htons(ETH_P_IP)) { rt = skb_rtable(skb); dst = rt_nexthop(rt, inner_iph->daddr); } |