summaryrefslogtreecommitdiff
path: root/src/conf_mode/interface-ethernet.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-08 19:54:21 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-20 21:28:53 +0200
commitca9964099fe67128bd380fb6026f1631ccd89f11 (patch)
tree0def9ea11ef2030284cdf24947ec87041af22000 /src/conf_mode/interface-ethernet.py
parent735a7d663c279e25feadcfad79e17be7fc0d8c8f (diff)
downloadvyos-1x-ca9964099fe67128bd380fb6026f1631ccd89f11.tar.gz
vyos-1x-ca9964099fe67128bd380fb6026f1631ccd89f11.zip
ethernet: T1637: support changing flow-control
Diffstat (limited to 'src/conf_mode/interface-ethernet.py')
-rwxr-xr-xsrc/conf_mode/interface-ethernet.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py
index 83459cedb..a12980bfe 100755
--- a/src/conf_mode/interface-ethernet.py
+++ b/src/conf_mode/interface-ethernet.py
@@ -35,6 +35,7 @@ default_config_data = {
'dhcpv6_temporary': False,
'disable': False,
'disable_link_detect': 1,
+ 'flow_control': 'on',
'hw_id': '',
'ip_arp_cache_tmo': 30,
'ip_proxy_arp': 0,
@@ -140,6 +141,10 @@ def get_config():
if conf.exists('disable-link-detect'):
eth['disable_link_detect'] = 2
+ # disable ethernet flow control (pause frames)
+ if conf.exists('disable-flow-control'):
+ eth['flow_control'] = 'off'
+
# retrieve real hardware address
if conf.exists('hw-id'):
eth['hw_id'] = conf.return_value('hw-id')
@@ -232,6 +237,8 @@ def apply(eth):
# ignore link state changes
e.link_detect = eth['disable_link_detect']
+ # disable ethernet flow control (pause frames)
+ e.set_flow_control(eth['flow_control'])
# configure ARP cache timeout in milliseconds
e.arp_cache_tmp = eth['ip_arp_cache_tmo']
# Enable proxy-arp on this interface