ip_tunnel: Make none-tunnel-dst tunnel port work with lwtunnel
authorwenxu <wenxu@ucloud.cn>
Sat, 19 Jan 2019 05:11:25 +0000 (13:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:21:07 +0000 (09:21 +0100)
commit9f1ac494023d7adde34814612e44efecf4b8e4e6
tree09d9a158411104e387def43f382c338fcf9cf251
parent2269278085f7c505b70d7ca6a2118ad45b966cd7
ip_tunnel: Make none-tunnel-dst tunnel port work with lwtunnel

[ Upstream commit d71b57532d70c03f4671dd04e84157ac6bf021b0 ]

ip l add dev tun type gretap key 1000
ip a a dev tun 10.0.0.1/24

Packets with tun-id 1000 can be recived by tun dev. But packet can't
be sent through dev tun for non-tunnel-dst

With this patch: tunnel-dst can be get through lwtunnel like beflow:
ip r a 10.0.0.7 encap ip dst 172.168.0.11 dev tun

Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/ip_tunnel.c