]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ip_tunnels: Set tunnel option flag when tunnel metadata is present
authorYi-Hung Wei <yihung.wei@gmail.com>
Wed, 11 Nov 2020 00:16:40 +0000 (16:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:29:05 +0000 (13:29 +0100)
commitef097e93aca2f1bec3d0a2e632edbefedf7efb4e
tree20be827fc1f95d671e094308993b1622801fcfba
parentf5d6b6c2e9931e8cedeae29909cd4da362acfc25
ip_tunnels: Set tunnel option flag when tunnel metadata is present

[ Upstream commit 9c2e14b48119b39446031d29d994044ae958d8fc ]

Currently, we may set the tunnel option flag when the size of metadata
is zero.  For example, we set TUNNEL_GENEVE_OPT in the receive function
no matter the geneve option is present or not.  As this may result in
issues on the tunnel flags consumers, this patch fixes the issue.

Related discussion:
* https://lore.kernel.org/netdev/1604448694-19351-1-git-send-email-yihung.wei@gmail.com/T/#u

Fixes: 256c87c17c53 ("net: check tunnel option type in tunnel flags")
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Link: https://lore.kernel.org/r/1605053800-74072-1-git-send-email-yihung.wei@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/geneve.c
include/net/ip_tunnels.h