summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-11-03 18:37:58 +0100
committerGitHub <noreply@github.com>2021-11-03 18:37:58 +0100
commitc605e211584b502c905d61bb48728889d992072b (patch)
tree67501a35fe1ee72e9f3027ed869d72213551b99c /python/vyos/ifconfig
parentc59e558f1ebc9f84bcbe21a51b7368204bbdbd90 (diff)
parent05fccc464d715d515e09bcec46a25f0d23a88406 (diff)
downloadvyos-1x-c605e211584b502c905d61bb48728889d992072b.tar.gz
vyos-1x-c605e211584b502c905d61bb48728889d992072b.zip
Merge pull request #1058 from sever-sever/T2281
interfaces: T2281: Ability to set static and DHCP addr on same interface
Diffstat (limited to 'python/vyos/ifconfig')
-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)