Merge branch 'vxlan-keep-reserved_bits-on-changelink'

Hannes Laimer says:

====================
vxlan: keep reserved_bits on changelink

Currently reserved_bits are reset on every changelink. This leads to
packets using extensions that were enabled on creation being dropped
after a changelink. The first commit describes the problem and
solution in more detail and the second just adds a selftest for this.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
====================

Link: https://patch.msgid.link/20261023-b4-vxlan-changelink-gbp-v1-0-f0d13951c09b@proxmox.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Paolo Abeni 2026-10-27 11:36:12 +01:00
commit cf26b22050
2 changed files with 16 additions and 1 deletions

View File

@ -4488,7 +4488,7 @@ static int vxlan_nl2conf(struct nlattr *tb[], struct nlattr *data[],
}
conf->reserved_bits = reserved_bits;
} else {
} else if (!changelink) {
/* For backwards compatibility, only allow reserved fields to be
* used by VXLAN extensions if explicitly requested.
*/

View File

@ -40,6 +40,7 @@
reserved_31_test
reserved_56_test
reserved_63_test
gbp_changelink_test
"}
NUM_NETIFS=4
@ -338,6 +339,20 @@ reserved_63_test()
reserved_test 63
}
gbp_changelink_test_do()
{
vxlan_device_add gbp
__default_test_do 25 "gbp"
ip link set dev vx1 type vxlan ageing 300
__default_test_do 25 "gbp after changelink"
}
gbp_changelink_test()
{
in_defer_scope \
gbp_changelink_test_do
}
trap cleanup EXIT
setup_prepare