diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-09-26 12:00:06 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-09-26 12:00:06 +0200 |
commit | 5db3d63160670c796ed74a170862c367048d89bb (patch) | |
tree | 029590908fb0bef85d04b44aeeb1c6c3db119784 /src/conf_mode/interfaces-bridge.py | |
parent | dfa949c5b758e2954ed5c6ad455fe586965cd156 (diff) | |
download | vyos-1x-5db3d63160670c796ed74a170862c367048d89bb.tar.gz vyos-1x-5db3d63160670c796ed74a170862c367048d89bb.zip |
ifconfig: mtu: disallow MTU < 1280 bytes when IPv6 is enabled on the interface
Using an MTU less then the required 1280 bytes (as per RFC) on an interface
where IPv6 is not explicitly disabled by:
- set interfaces ethernet eth1 ipv6 address no-default-link-local
- not having any other IPv6 address configured
Will now trigger a commit error via verify() instead of raising
FileNotFoundError!
Diffstat (limited to 'src/conf_mode/interfaces-bridge.py')
-rwxr-xr-x | src/conf_mode/interfaces-bridge.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-bridge.py b/src/conf_mode/interfaces-bridge.py index 485decb17..4ac9c8963 100755 --- a/src/conf_mode/interfaces-bridge.py +++ b/src/conf_mode/interfaces-bridge.py @@ -25,6 +25,7 @@ from vyos.configdict import node_changed from vyos.configdict import is_member from vyos.configdict import is_source_interface from vyos.configverify import verify_dhcpv6 +from vyos.configverify import verify_mtu_ipv6 from vyos.configverify import verify_vrf from vyos.ifconfig import BridgeIf from vyos.validate import has_address_configured @@ -95,6 +96,7 @@ def verify(bridge): if 'deleted' in bridge: return None + verify_mtu_ipv6(bridge) verify_dhcpv6(bridge) verify_vrf(bridge) |