diff options
author | David S. Miller <davem@davemloft.net> | 2019-01-27 19:43:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-27 19:43:17 +0100 |
commit | 1d68101367a92336e633d0c3681bf8c86644e124 (patch) | |
tree | 8fdacef561481c25c71641b8fa91a5dfa0ba7f96 /net/ipv4/ip_tunnel.c | |
parent | net: lmc: remove -I. header search path (diff) | |
parent | Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm (diff) | |
download | linux-1d68101367a92336e633d0c3681bf8c86644e124.tar.xz 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); } |