diff options
author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-03-28 17:57:14 +0000 |
---|---|---|
committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-03-28 17:57:14 +0000 |
commit | 72a47361a4a7d352a8be61ea3feaa0f7f6e66745 (patch) | |
tree | 7248ac3c78d3dd27c8a7ed6c75984cd27eb69f03 /src/conf_mode/interfaces-ethernet.py | |
parent | 458ccfc2f0fe46d399d2412af60d8ade26b57f65 (diff) | |
download | vyos-1x-72a47361a4a7d352a8be61ea3feaa0f7f6e66745.tar.gz vyos-1x-72a47361a4a7d352a8be61ea3feaa0f7f6e66745.zip |
ifconfig: T2057: Do not set empty hw_id mac
set_mac is validating the mac address passed, therefore passing
empty string will cause it to fail. if the hardware id could
not be found then it should not be attempted to be set
Diffstat (limited to 'src/conf_mode/interfaces-ethernet.py')
-rwxr-xr-x | src/conf_mode/interfaces-ethernet.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces-ethernet.py b/src/conf_mode/interfaces-ethernet.py index 286cab88e..15e9b4185 100755 --- a/src/conf_mode/interfaces-ethernet.py +++ b/src/conf_mode/interfaces-ethernet.py @@ -359,7 +359,7 @@ def apply(eth): # if custom mac is removed if eth['mac']: e.set_mac(eth['mac']) - else: + elif eth['hw_id']: e.set_mac(eth['hw_id']) # Maximum Transmission Unit (MTU) |