summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzdc <taras@vyos.io>2025-06-18 11:51:34 +0300
committerzdc <taras@vyos.io>2025-06-18 12:05:08 +0300
commit516ea43279d750272be398a27948049581b22630 (patch)
tree4133188548f6012e889ff346803afb348432cc0a /src
parentaab8c6f8c69e2ca0381ae5874c591197dcae36a9 (diff)
downloadvyos-1x-516ea43279d750272be398a27948049581b22630.tar.gz
vyos-1x-516ea43279d750272be398a27948049581b22630.zip
XDP/Mellanox: T7223: Fixed interfaces initialization
For the XDP driver and Mellanox NIC, we create `defunct_*` interfaces to hide original interfaces from CLI, when they are replaced with VPP-enabled pairs. But sometimes IP addresses are not flushed from these `defunct_*` interfaces, which leads to broken routing afterward. This commit introduces an additional flush operation for `defunct_*` interfaces to ensure that they do not conflict with VPP interfaces.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vpp.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/conf_mode/vpp.py b/src/conf_mode/vpp.py
index 76aa7c5af..d5778c778 100755
--- a/src/conf_mode/vpp.py
+++ b/src/conf_mode/vpp.py
@@ -693,6 +693,7 @@ def apply(config):
if 'promisc' in iface_config['xdp_options']:
control_host.set_promisc(f'defunct_{iface}', 'on')
control_host.set_status(f'defunct_{iface}', 'up')
+ control_host.flush_ip(f'defunct_{iface}')
# Rename Mellanox interfaces to hide them and create LCP properly
if (
iface in Section.interfaces()
@@ -700,6 +701,7 @@ def apply(config):
):
control_host.rename_iface(iface, f'defunct_{iface}')
control_host.set_status(f'defunct_{iface}', 'up')
+ control_host.flush_ip(f'defunct_{iface}')
# Create lcp
if iface not in Section.interfaces():
vpp_control.lcp_pair_add(iface, iface)