diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/ifconfig/interface.py | 12 | ||||
-rw-r--r-- | python/vyos/utils/network.py | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index cad1685a9..de821ab60 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -1423,11 +1423,13 @@ class Interface(Control): tmp = get_interface_address(self.ifname) if tmp and 'addr_info' in tmp: for address_dict in tmp['addr_info']: - # Only remove dynamic assigned addresses - if 'dynamic' not in address_dict: - continue - address = address_dict['local'] - self.del_addr(address) + if address_dict['family'] == 'inet': + # Only remove dynamic assigned addresses + if 'dynamic' not in address_dict: + continue + address = address_dict['local'] + prefixlen = address_dict['prefixlen'] + self.del_addr(f'{address}/{prefixlen}') # cleanup old config files for file in [dhclient_config_file, systemd_override_file, dhclient_lease_file]: diff --git a/python/vyos/utils/network.py b/python/vyos/utils/network.py index 8fce08de0..dc0c0a6d6 100644 --- a/python/vyos/utils/network.py +++ b/python/vyos/utils/network.py @@ -69,7 +69,9 @@ def get_vrf_members(vrf: str) -> list: answer = json.loads(output) for data in answer: if 'ifname' in data: - interfaces.append(data.get('ifname')) + # Skip PIM interfaces which appears in VRF + if 'pim' not in data.get('ifname'): + interfaces.append(data.get('ifname')) except: pass return interfaces |