From: Arne Fitzenreiter Date: Wed, 19 Oct 2016 20:28:22 +0000 (+0000) Subject: Improve MTU handling on bridges X-Git-Tag: 009~271 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3464bc8917b7146e1ffabc69a50ec10d6dfbece0;p=network.git Improve MTU handling on bridges When the MTU of a bridge is changed, device_set_mtu will now change the MTU of all ports in that bridge, too. This does not seem to be 100% necessary, but it makes it clearer and probably avoids some other bugs. Signed-off-by: Arne Fitzenreiter Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.device b/src/functions/functions.device index 571b1fb4..a261335b 100644 --- a/src/functions/functions.device +++ b/src/functions/functions.device @@ -659,6 +659,14 @@ device_set_mtu() { assert device_exists ${device} + # Handle bridges differently + if device_is_bridge ${device}; then + local port + for port in $(bridge_get_members ${device}); do + device_set_mtu ${port} ${mtu} + done + fi + log INFO "Setting MTU of ${device} to ${mtu}" local up