diff options
author | John Estabrook <jestabro@vyos.io> | 2021-01-21 15:02:41 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2021-02-03 11:50:32 -0600 |
commit | e336cfe1d4c68e94b1ba759f5bb5dd6907a6c6b8 (patch) | |
tree | 37e3072757bcc708f729445ab4f0d60b70a1d346 | |
parent | d38fdaa3a91b168316fc1c668491774b942b8848 (diff) | |
download | vyos-1x-e336cfe1d4c68e94b1ba759f5bb5dd6907a6c6b8.tar.gz vyos-1x-e336cfe1d4c68e94b1ba759f5bb5dd6907a6c6b8.zip |
xml: T3239: override default mtu values and remove workarounds
(cherry picked from commit ea4c72ed0dbcee3f7e8f9693c5310190833651d8)
-rw-r--r-- | interface-definitions/interfaces-l2tpv3.xml.in | 3 | ||||
-rw-r--r-- | interface-definitions/interfaces-macsec.xml.in | 3 | ||||
-rw-r--r-- | interface-definitions/interfaces-pppoe.xml.in | 3 | ||||
-rw-r--r-- | interface-definitions/interfaces-tunnel.xml.in | 3 | ||||
-rw-r--r-- | interface-definitions/interfaces-vxlan.xml.in | 3 | ||||
-rw-r--r-- | interface-definitions/interfaces-wireguard.xml.in | 3 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-l2tpv3.py | 6 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-macsec.py | 8 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-pppoe.py | 6 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-tunnel.py | 6 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-vxlan.py | 6 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-wireguard.py | 6 |
12 files changed, 18 insertions, 38 deletions
diff --git a/interface-definitions/interfaces-l2tpv3.xml.in b/interface-definitions/interfaces-l2tpv3.xml.in index a8ddb74fb..3853cd339 100644 --- a/interface-definitions/interfaces-l2tpv3.xml.in +++ b/interface-definitions/interfaces-l2tpv3.xml.in @@ -72,6 +72,9 @@ </properties> </leafNode> #include <include/interface-mtu-68-16000.xml.i> + <leafNode name="mtu"> + <defaultValue>1488</defaultValue> + </leafNode> <leafNode name="peer-session-id"> <properties> <help>Peer session identifier</help> diff --git a/interface-definitions/interfaces-macsec.xml.in b/interface-definitions/interfaces-macsec.xml.in index 4d2581906..94d78c6dd 100644 --- a/interface-definitions/interfaces-macsec.xml.in +++ b/interface-definitions/interfaces-macsec.xml.in @@ -110,6 +110,9 @@ #include <include/interface-description.xml.i> #include <include/interface-disable.xml.i> #include <include/interface-mtu-68-16000.xml.i> + <leafNode name="mtu"> + <defaultValue>1460</defaultValue> + </leafNode> #include <include/source-interface-ethernet.xml.i> #include <include/interface-vrf.xml.i> </children> diff --git a/interface-definitions/interfaces-pppoe.xml.in b/interface-definitions/interfaces-pppoe.xml.in index 7dccfbc9c..9bbaae9ea 100644 --- a/interface-definitions/interfaces-pppoe.xml.in +++ b/interface-definitions/interfaces-pppoe.xml.in @@ -125,6 +125,9 @@ </properties> </leafNode> #include <include/interface-mtu-68-1500.xml.i> + <leafNode name="mtu"> + <defaultValue>1492</defaultValue> + </leafNode> <leafNode name="no-peer-dns"> <properties> <help>Do not use DNS servers provided by the peer</help> diff --git a/interface-definitions/interfaces-tunnel.xml.in b/interface-definitions/interfaces-tunnel.xml.in index 3a4db6f09..470181d11 100644 --- a/interface-definitions/interfaces-tunnel.xml.in +++ b/interface-definitions/interfaces-tunnel.xml.in @@ -22,6 +22,9 @@ #include <include/interface-disable-link-detect.xml.i> #include <include/interface-vrf.xml.i> #include <include/interface-mtu-64-8024.xml.i> + <leafNode name="mtu"> + <defaultValue>1476</defaultValue> + </leafNode> #include <include/interface-ipv4-options.xml.i> #include <include/interface-ipv6-options.xml.i> <leafNode name="local-ip"> diff --git a/interface-definitions/interfaces-vxlan.xml.in b/interface-definitions/interfaces-vxlan.xml.in index 8c76ab60b..f90a86274 100644 --- a/interface-definitions/interfaces-vxlan.xml.in +++ b/interface-definitions/interfaces-vxlan.xml.in @@ -41,6 +41,9 @@ #include <include/source-interface.xml.i> #include <include/interface-mac.xml.i> #include <include/interface-mtu-1200-16000.xml.i> + <leafNode name="mtu"> + <defaultValue>1450</defaultValue> + </leafNode> <leafNode name="remote"> <properties> <help>Remote address of VXLAN tunnel</help> diff --git a/interface-definitions/interfaces-wireguard.xml.in b/interface-definitions/interfaces-wireguard.xml.in index acf5082d6..3f56046c4 100644 --- a/interface-definitions/interfaces-wireguard.xml.in +++ b/interface-definitions/interfaces-wireguard.xml.in @@ -22,6 +22,9 @@ #include <include/interface-vrf.xml.i> #include <include/port-number.xml.i> #include <include/interface-mtu-68-16000.xml.i> + <leafNode name="mtu"> + <defaultValue>1420</defaultValue> + </leafNode> #include <include/interface-ipv4-options.xml.i> #include <include/interface-ipv6-options.xml.i> <leafNode name="fwmark"> diff --git a/src/conf_mode/interfaces-l2tpv3.py b/src/conf_mode/interfaces-l2tpv3.py index 1118143e4..7b3afa058 100755 --- a/src/conf_mode/interfaces-l2tpv3.py +++ b/src/conf_mode/interfaces-l2tpv3.py @@ -47,12 +47,6 @@ def get_config(config=None): base = ['interfaces', 'l2tpv3'] l2tpv3 = get_interface_dict(conf, base) - # L2TPv3 is "special" the default MTU is 1488 - update accordingly - # as the config_level is already st in get_interface_dict() - we can use [] - tmp = conf.get_config_dict([], key_mangling=('-', '_'), get_first_key=True) - if 'mtu' not in tmp: - l2tpv3['mtu'] = '1488' - # To delete an l2tpv3 interface we need the current tunnel and session-id if 'deleted' in l2tpv3: tmp = leaf_node_changed(conf, ['tunnel-id']) diff --git a/src/conf_mode/interfaces-macsec.py b/src/conf_mode/interfaces-macsec.py index 2c8367ff3..bfebed7e4 100755 --- a/src/conf_mode/interfaces-macsec.py +++ b/src/conf_mode/interfaces-macsec.py @@ -49,14 +49,6 @@ def get_config(config=None): base = ['interfaces', 'macsec'] macsec = get_interface_dict(conf, base) - # MACsec is "special" the default MTU is 1460 - update accordingly - # as the config_level is already st in get_interface_dict() - we can use [] - tmp = conf.get_config_dict([], key_mangling=('-', '_'), get_first_key=True) - if 'mtu' not in tmp: - # base MTU for MACsec is 1468 bytes, but we leave room for 802.1ad and - # 802.1q VLAN tags, thus the limit is 1460 bytes. - macsec['mtu'] = '1460' - # Check if interface has been removed if 'deleted' in macsec: source_interface = conf.return_effective_value(['source-interface']) diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py index fd8919918..3675db73b 100755 --- a/src/conf_mode/interfaces-pppoe.py +++ b/src/conf_mode/interfaces-pppoe.py @@ -43,12 +43,6 @@ def get_config(config=None): base = ['interfaces', 'pppoe'] pppoe = get_interface_dict(conf, base) - # PPPoE is "special" the default MTU is 1492 - update accordingly - # as the config_level is already st in get_interface_dict() - we can use [] - tmp = conf.get_config_dict([], key_mangling=('-', '_'), get_first_key=True) - if 'mtu' not in tmp: - pppoe['mtu'] = '1492' - return pppoe def verify(pppoe): diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py index ffeb57784..be56761cf 100755 --- a/src/conf_mode/interfaces-tunnel.py +++ b/src/conf_mode/interfaces-tunnel.py @@ -57,12 +57,6 @@ def get_config(config=None): base = ['interfaces', 'tunnel'] tunnel = get_interface_dict(conf, base) - # Wireguard is "special" the default MTU is 1420 - update accordingly - # as the config_level is already st in get_interface_dict() - we can use [] - tmp = conf.get_config_dict([], key_mangling=('-', '_'), get_first_key=True) - if 'mtu' not in tmp: - tunnel['mtu'] = '1476' - tmp = leaf_node_changed(conf, ['encapsulation']) if tmp: tunnel.update({'encapsulation_changed': {}}) diff --git a/src/conf_mode/interfaces-vxlan.py b/src/conf_mode/interfaces-vxlan.py index 04e258fcf..9a6d72772 100755 --- a/src/conf_mode/interfaces-vxlan.py +++ b/src/conf_mode/interfaces-vxlan.py @@ -42,12 +42,6 @@ def get_config(config=None): base = ['interfaces', 'vxlan'] vxlan = get_interface_dict(conf, base) - # VXLAN is "special" the default MTU is 1492 - update accordingly - # as the config_level is already st in get_interface_dict() - we can use [] - tmp = conf.get_config_dict([], key_mangling=('-', '_'), get_first_key=True) - if 'mtu' not in tmp: - vxlan['mtu'] = '1450' - return vxlan def verify(vxlan): diff --git a/src/conf_mode/interfaces-wireguard.py b/src/conf_mode/interfaces-wireguard.py index 3e6320f02..024ab8f59 100755 --- a/src/conf_mode/interfaces-wireguard.py +++ b/src/conf_mode/interfaces-wireguard.py @@ -46,12 +46,6 @@ def get_config(config=None): base = ['interfaces', 'wireguard'] wireguard = get_interface_dict(conf, base) - # Wireguard is "special" the default MTU is 1420 - update accordingly - # as the config_level is already st in get_interface_dict() - we can use [] - tmp = conf.get_config_dict([], key_mangling=('-', '_'), get_first_key=True) - if 'mtu' not in tmp: - wireguard['mtu'] = '1420' - # Mangle private key - it has a default so its always valid wireguard['private_key'] = '/config/auth/wireguard/{private_key}/private.key'.format(**wireguard) |