diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-22 19:13:07 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-22 19:13:07 +0200 |
commit | 79a655a12875f5f152abba2d17eb6a1033b59131 (patch) | |
tree | 5a75960039a0dd81608b5a38351a8c8314cabccf /src/conf_mode/interface-vxlan.py | |
parent | c4d0b9ed4736911d341efdebf34997e6cee8c5a8 (diff) | |
parent | 2b9c84594a693c66b949183a25cc32dfcdee72e1 (diff) | |
download | vyos-1x-79a655a12875f5f152abba2d17eb6a1033b59131.tar.gz vyos-1x-79a655a12875f5f152abba2d17eb6a1033b59131.zip |
Merge branch 'current' of github.com:vyos/vyos-1x into equuleus
* 'current' of github.com:vyos/vyos-1x: (49 commits)
Jenkins: ease Pipeline
vxlan: T1636: simplyfy code (don't delete intf addresses)
ethernet: T1637: interfaces in a bond can be disabled
ethernet: T1637: fix calling arp_cache_tmo property
ethernet: T1637: do not overwrite interface description with interface name
ethernet: T1637: support offloading functions
Python/ifconfig: T1557: ethernet: add offloading interfaces
Python/ifconfig: T1557: update comments
Python/ifconfig: T1557: delete all assigned IP addresses on remove()
ethernet: T1637: call remove() on interface deletion
Python/ifconfig: T1557: use proper inheritance levels on remove()
ethernet: T1637: remove debug pprint
bridge: T1556: minor comment cleanup
bonding: T1614: minor comment cleanup
Python/ifconfig: T1557: unify '/sys/class/net/{}' path
Python/ifconfig: T1557: vmxnet3/virtio_net do not support changing speed/duplex control
Python/ifconfig: T1557: vmxnet3/virtio_net do not support changing flow control
Python/ifconfig: T1557: query driver if it supports auto negotiation
Python/ifconfig: T1557: call ethtool with full path
Python/ifconfig: T1557: return stdout string for _cmd()
...
Diffstat (limited to 'src/conf_mode/interface-vxlan.py')
-rwxr-xr-x | src/conf_mode/interface-vxlan.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/conf_mode/interface-vxlan.py b/src/conf_mode/interface-vxlan.py index 59022238e..e97b4bf99 100755 --- a/src/conf_mode/interface-vxlan.py +++ b/src/conf_mode/interface-vxlan.py @@ -28,7 +28,6 @@ from netifaces import interfaces default_config_data = { 'address': [], - 'address_remove': [], 'deleted': False, 'description': '', 'disable': False, @@ -43,7 +42,6 @@ default_config_data = { # the IANA's selection of a standard destination port } - def get_config(): vxlan = deepcopy(default_config_data) conf = Config() @@ -66,12 +64,6 @@ def get_config(): if conf.exists('address'): vxlan['address'] = conf.return_values('address') - # Determine interface addresses (currently effective) - to determine which - # address is no longer valid and needs to be removed from the interface - eff_addr = conf.return_effective_values('address') - act_addr = conf.return_values('address') - vxlan['address_remove'] = list_diff(eff_addr, act_addr) - # retrieve interface description if conf.exists('description'): vxlan['description'] = conf.return_value('description') @@ -180,11 +172,9 @@ def apply(vxlan): # Enable proxy-arp on this interface v.proxy_arp = vxlan['ip_proxy_arp'] - # Configure interface address(es) - # - not longer required addresses get removed first - # - newly addresses will be added second - for addr in vxlan['address_remove']: - v.del_addr(addr) + # Configure interface address(es) - no need to implicitly delete the + # old addresses as they have already been removed by deleting the + # interface above for addr in vxlan['address']: v.add_addr(addr) |