From 05fccc464d715d515e09bcec46a25f0d23a88406 Mon Sep 17 00:00:00 2001 From: Viacheslav Date: Mon, 1 Nov 2021 13:15:00 +0000 Subject: interfaces: T2281: Ability to set static and DHCP addr on same interface There are not any reason to enable only DHCP or only static address on interface at the same time It is possible to have both. --- python/vyos/ifconfig/interface.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'python/vyos/ifconfig/interface.py') diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index c73ffb634..58d130ef6 100755 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -1056,14 +1056,6 @@ class Interface(Control): addr_is_v4 = is_ipv4(addr) - # we can't have both DHCP and static IPv4 addresses assigned - for a in self._addr: - if ( ( addr == 'dhcp' and a != 'dhcpv6' and is_ipv4(a) ) or - ( a == 'dhcp' and addr != 'dhcpv6' and addr_is_v4 ) ): - raise ConfigError(( - "Can't configure both static IPv4 and DHCP address " - "on the same interface")) - # add to interface if addr == 'dhcp': self.set_dhcp(True) -- cgit v1.2.3