ip_tunnel: Fix route fl4 init in ip_md_tunnel_xmit
authorwenxu <wenxu@ucloud.cn>
Tue, 22 Jan 2019 10:39:51 +0000 (18:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:16 +0000 (14:50 +0100)
commit7761d0c1c4f31e857793b9037382fbcb65353e41
tree4944384885073a6a51da4052e5ccf0e8577c84a0
parentdda759943606367eb283de0dea1398a54d2ac74c
ip_tunnel: Fix route fl4 init in ip_md_tunnel_xmit

[ Upstream commit 6e6b904ad4f9aed43ec320afbd5a52ed8461ab41 ]

Init the gre_key from tuninfo->key.tun_id and init the mark
from the skb->mark, set the oif to zero in the collect metadata
mode.

Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel")
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