]> git.baikalelectronics.ru Git - kernel.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)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Nov 2020 00:58:10 +0000 (16:58 -0800)
commit3ccdb1fee45254b042f57340602aeabb50f2b86b
treef349c13f6a81d620761e2023064211cefda19592
parent5710c2753d5fe3bba8967250aa314efe56d8b10e
ip_tunnels: Set tunnel option flag when tunnel metadata is present

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: c909c89d9470 ("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>
drivers/net/geneve.c
include/net/ip_tunnels.h