summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/interface.py
diff options
context:
space:
mode:
authorViacheslav <v.gletenko@vyos.io>2021-11-01 13:15:00 +0000
committerViacheslav <v.gletenko@vyos.io>2021-11-01 13:16:19 +0000
commit05fccc464d715d515e09bcec46a25f0d23a88406 (patch)
tree005b6d8973fa67f040873b9810a3243a68269b94 /python/vyos/ifconfig/interface.py
parent85bf315f71b411e3cdcd19793c4f7e1e5efed917 (diff)
downloadvyos-1x-05fccc464d715d515e09bcec46a25f0d23a88406.tar.gz
vyos-1x-05fccc464d715d515e09bcec46a25f0d23a88406.zip
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.
Diffstat (limited to 'python/vyos/ifconfig/interface.py')
-rwxr-xr-xpython/vyos/ifconfig/interface.py8
1 files changed, 0 insertions, 8 deletions
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)