diff options
Diffstat (limited to 'src/conf_mode/interface-ethernet.py')
-rwxr-xr-x | src/conf_mode/interface-ethernet.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py index c20e551d6..83459cedb 100755 --- a/src/conf_mode/interface-ethernet.py +++ b/src/conf_mode/interface-ethernet.py @@ -140,6 +140,10 @@ def get_config(): if conf.exists('disable-link-detect'): eth['disable_link_detect'] = 2 + # retrieve real hardware address + if conf.exists('hw-id'): + eth['hw_id'] = conf.return_value('hw-id') + # disable interface if conf.exists('disable'): eth['disable'] = True @@ -235,9 +239,12 @@ def apply(eth): # Enable private VLAN proxy ARP on this interface e.proxy_arp_pvlan = eth['ip_proxy_arp_pvlan'] - # Change interface MAC address + # Change interface MAC address - re-set to real hardware address (hw-id) + # if custom mac is removed if eth['mac']: e.mac = eth['mac'] + else: + e.mac = eth['hw_id'] # Maximum Transmission Unit (MTU) e.mtu = eth['mtu'] |