initrd: fix generation of MTU and cloned-mac-address for masters

System Internals / NetworkManager - Beniamino Galvani [redhat.com] - 3 July 2020 20:02 UTC

Setting a MTU or a cloned MAC for bonds/bridges/teams fails with:

# nm-initrd-generator -- bond=bond0:eno1,eno2:mode=802.3ad ip=192.168.1.5::192.168.1.254:255.255.255.0:MyServer:bond0:none::01:02:03:04:05:06 bootdev=bond0 nameserver=192.168.1.1

cmdline-reader: 'bond' does not support setting cloned-mac-address

Fix this.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/460

79f70bf5d initrd: fix generation of MTU and cloned-mac-address for masters
src/initrd/nmi-cmdline-reader.c | 36 ++++----
src/initrd/tests/test-cmdline-reader.c | 155 +++++++++++++++++++++++++++++++++
2 files changed, 174 insertions(+), 17 deletions(-)

Upstream: cgit.freedesktop.org


  • Share