diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-06-18 16:04:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-18 16:04:35 +0200 |
| commit | d91e7ce6673d8bce86ff1143fd4c9ca8fd768ecf (patch) | |
| tree | e924d1e8cfbe210f978cbc4b7781806d30863780 | |
| parent | c92535d5afcddd58875c5394f967f95cbcc94aef (diff) | |
| parent | d49442a763de78b2fa5481218de1b91fb754c09c (diff) | |
| download | vyos-1x-d91e7ce6673d8bce86ff1143fd4c9ca8fd768ecf.tar.gz vyos-1x-d91e7ce6673d8bce86ff1143fd4c9ca8fd768ecf.zip | |
Merge pull request #5281 from natali-rs1985/T8979
vpp: T8979: Fix defunct interface retaining IP addresses after crash
| -rw-r--r-- | python/vyos/vpp/control_host.py | 6 |
1 files changed, 4 insertions, 2 deletions
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: |
