From 2fcb128ea04e7e6c3f05b1b05bbc9fd3c541abb8 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 10 Apr 2025 17:06:06 +0200 Subject: netplug: T7346: only call interface helpers if interface is not removed When an interface is removed from the system also netplug is triggered. It makes no sense to call vyos.ifconfig.Interface() and update it's configuration when the interface was just recently removed. This would in fact re-add an interface temporarily in it's worst case. --- src/etc/netplug/vyos-netplug-dhcp-client | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/etc/netplug') diff --git a/src/etc/netplug/vyos-netplug-dhcp-client b/src/etc/netplug/vyos-netplug-dhcp-client index 4cc824afd..7fe6cda75 100755 --- a/src/etc/netplug/vyos-netplug-dhcp-client +++ b/src/etc/netplug/vyos-netplug-dhcp-client @@ -54,4 +54,5 @@ interface_path = ['interfaces'] + Section.get_config_path(interface).split() _, interface_config = get_interface_dict( config, interface_path[:-1], ifname=interface, with_pki=True ) -Interface(interface).update(interface_config) +if 'deleted' not in interface_config: + Interface(interface).update(interface_config) -- cgit v1.2.3