diff options
author | wenxu <wenxu@ucloud.cn> | 2018-12-23 16:18:39 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-24 14:20:25 -0800 |
commit | 7bdca378b2301b1fc6a95c60d6d428408ae4e39e (patch) | |
tree | 214f39ee45cff0c006d5c27d902eaa52267151f0 /net/ipv4 | |
parent | f2ab95814103314af3239d322e382c61c69a788d (diff) | |
download | linux-7bdca378b2301b1fc6a95c60d6d428408ae4e39e.tar.bz2 |
iptunnel: Set tun_flags in the iptunnel_metadata_reply from src
ip l add tun type gretap external
ip r a 10.0.0.2 encap ip id 1000 dst 172.168.0.2 key dev tun
ip a a 10.0.0.1/24 dev tun
The peer arp request to 10.0.0.1 with tunnel_id, but the arp reply
only set the tun_id but not the tun_flags with TUNNEL_KEY. The arp
reply packet don't contain tun_id field.
Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_tunnel_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index c248e0dccbe1..43f519c9b318 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -151,6 +151,7 @@ struct metadata_dst *iptunnel_metadata_reply(struct metadata_dst *md, sizeof(struct in6_addr)); else dst->key.u.ipv4.dst = src->key.u.ipv4.src; + dst->key.tun_flags = src->key.tun_flags; dst->mode = src->mode | IP_TUNNEL_INFO_TX; return res; |