From 2929d88c15b3caaae0a9fc4e4397e227a2552f9c Mon Sep 17 00:00:00 2001 From: Gris Ge Date: Mon, 25 May 2026 09:54:50 +0800 Subject: [PATCH] link: vxlan: add localbypass support Intrduced support for the VXLAN localbypass attribute, which controls whether the VXLAN localbypass mode is turned on. This is equivalent to `ip link add name NAME type vxlan id VNI [no]localbypass`. Signed-off-by: Gris Ge --- src/link/vxlan.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/link/vxlan.rs b/src/link/vxlan.rs index 0bec268..6af8205 100644 --- a/src/link/vxlan.rs +++ b/src/link/vxlan.rs @@ -229,6 +229,14 @@ impl LinkMessageBuilder { self.append_info_data(InfoVxlan::CollectMetadata(collect_metadata)) } + // Adds the `localbypass` attribute to the VXLAN + /// This is equivalent to `ip link add name NAME type vxlan id VNI + /// [no]localbypass`. \[no\]localbypass - specifies if the VXLAN + /// localbypass mode is turned on. + pub fn localbypass(self, localbypass: bool) -> Self { + self.append_info_data(InfoVxlan::Localbypass(localbypass)) + } + // Adds the `udp_csum` attribute to the VXLAN /// This is equivalent to `ip link add name NAME type vxlan id VNI /// [no]udp_csum`. \[no\]udpcsum - specifies if UDP checksum is