From d49442a763de78b2fa5481218de1b91fb754c09c Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Thu, 18 Jun 2026 15:34:12 +0300 Subject: vpp: T8979: Fix defunct interface retaining IP addresses after crash flush_ip() used flush_addr(label=iface_name) which only matches addresses whose label equals exactly the interface name. Secondary IP addresses are assigned with :N suffixed labels (e.g. defunct_eth0:2, defunct_eth0:3) and are not matched, so they remain on the interface. Fix by flushing addresses by interface index instead of label, which removes all addresses regardless of their label. --- python/vyos/vpp/control_host.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/vyos/vpp/control_host.py b/python/vyos/vpp/control_host.py index 707f56740..6ad870b7b 100644 --- a/python/vyos/vpp/control_host.py +++ b/python/vyos/vpp/control_host.py @@ -444,8 +444,10 @@ def flush_ip(iface_name: str) -> None: Args: iface_name (str): name of an interface """ - iproute = IPRoute() - iproute.flush_addr(label=iface_name) + with IPRoute() as iproute: + index = iproute.link_lookup(ifname=iface_name) + if index: + iproute.flush_addr(index=index[0]) def get_eth_channels(iface_name: str) -> dict: -- cgit v1.2.3