diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-10-08 21:39:45 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-10-09 17:19:04 +0200 |
commit | 2d3539f9dec19c0d5cec5bd962aaf9640a8cec23 (patch) | |
tree | e367413c11d8f522454352712a9446fe258adc84 /src/conf_mode/interface-bridge.py | |
parent | afc82770cce851da31267829f1726f85093d9d76 (diff) | |
download | vyos-1x-2d3539f9dec19c0d5cec5bd962aaf9640a8cec23.tar.gz vyos-1x-2d3539f9dec19c0d5cec5bd962aaf9640a8cec23.zip |
T1430: add dhcp vendor-class-id client option
Diffstat (limited to 'src/conf_mode/interface-bridge.py')
-rwxr-xr-x | src/conf_mode/interface-bridge.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/interface-bridge.py b/src/conf_mode/interface-bridge.py index b2755547c..57ac98444 100755 --- a/src/conf_mode/interface-bridge.py +++ b/src/conf_mode/interface-bridge.py @@ -34,6 +34,7 @@ default_config_data = { 'deleted': False, 'dhcp_client_id': '', 'dhcp_hostname': '', + 'dhcp_vendor_class_id': '', 'dhcpv6_prm_only': False, 'dhcpv6_temporary': False, 'disable': False, @@ -93,6 +94,10 @@ def get_config(): if conf.exists('dhcp-options host-name'): bridge['dhcp_hostname'] = conf.return_value('dhcp-options host-name') + # DHCP client vendor identifier + if conf.exists('dhcp-options vendor-class-id'): + bridge['dhcp_vendor_class_id'] = conf.return_value('dhcp-options vendor-class-id') + # DHCPv6 only acquire config parameters, no address if conf.exists('dhcpv6-options parameters-only'): bridge['dhcpv6_prm_only'] = conf.return_value('dhcpv6-options parameters-only') @@ -232,6 +237,9 @@ def apply(bridge): if bridge['dhcp_hostname']: opt['hostname'] = bridge['dhcp_hostname'] + if bridge['dhcp_vendor_class_id']: + opt['vendor_class_id'] = bridge['dhcp_vendor_class_id'] + # store DHCP config dictionary - used later on when addresses # are requested br.set_dhcp_options(opt) |