diff options
| author | Xuanqiang Luo <luoxuanqiang@kylinos.cn> | 2026-09-21 11:18:59 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-09-23 19:17:46 -0700 |
| commit | a3f315be9d30eeb6938d11fa17fd4b32d52f7c42 (patch) | |
| tree | 22af0fdc241027e25c03edfe41e3305a77632ae3 /drivers | |
| parent | 4bdee8060d1e4581624e68fbd369b1afb14df4bc (diff) | |
| download | linux-a3f315be9d30eeb6938d11fa17fd4b32d52f7c42.tar.gz linux-a3f315be9d30eeb6938d11fa17fd4b32d52f7c42.zip | |
ip_gre: Reject enabling collect metadata through changelink
ipgre_netlink_parms() can enable collect_md on an existing GRE, GRETAP
or ERSPAN device. Unlike newlink, changelink does not enforce metadata
tunnel uniqueness. Converting a non-metadata device can therefore
replace the metadata receive entry for another device of the same type
in the same netns. Deleting either device then clears the shared entry,
breaking metadata receive lookup for the surviving device.
If parameter validation fails after collect_md is set, deleting the
modified device can also clear an entry it never owned.
Reject enabling metadata mode in both changelink callbacks before any
encapsulation or tunnel parameters are modified. Allow requests that
repeat the metadata attribute on an existing metadata device.
Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.")
Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Link: https://patch.msgid.link/20260921031859.9283-1-xuanqiang.luo@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions
