All our interfaces have a default MTU of 1500 bytes. Some interfaces (PPPoE, L2TPv3, MACsec) do not have a default MTU of 1500 bytes, but as we inherit the XML definition we "pull-in" this invalid value.
- https://github.com/vyos/vyos-1x/blob/103e8404cdea70dad486940f209b9683f1c7b936/interface-definitions/interfaces-pppoe.xml.in#L127
- https://github.com/vyos/vyos-1x/blob/103e8404cdea70dad486940f209b9683f1c7b936/interface-definitions/include/interface-mtu-68-1500.xml.i#L13
The default value is later exchanged during runtime of the script here:
This simply "feels wrong" to change the value in the handler script. It would be nice to add an XML statement into interfaces-pppoe.xml.in stating:
#include <include/interface-mtu-68-1500.xml.i> <leafNode name="mtu"> <defaultValue>1492</defaultValue> </leafNode>
to override the default value with the correct one on this interface. This would mean "true inheritance" like in C++/Python.