This attribute's handling is broken. It can only be used when creating Ethernet pseudo-wires, in which case its value can be used as the initial MTU for the l2tpeth device. However, when handling update requests, L2TP_ATTR_MTU only modifies session->mtu. This value is never propagated to the l2tpeth device. Dump requests also return the value of session->mtu, which is not synchronised anymore with the device MTU. The same problem occurs if the device MTU is properly updated using the generic IFLA_MTU attribute. In this case, session->mtu is not updated, and L2TP_ATTR_MTU will report an invalid value again when dumping the session. It does not seem worthwhile to complexify l2tp_eth.c to synchronise session->mtu with the device MTU. Even the ip-l2tp manpage advises to use 'ip link' to initialise the MTU of l2tpeth devices (iproute2 does not handle L2TP_ATTR_MTU at all anyway). So let's just ignore it entirely.
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -119,7 +119,7 @@ enum { · 118 unmodified lines | |||
| 119 | L2TP_ATTR_IP_DADDR, /* u32 */ | 119 | L2TP_ATTR_IP_DADDR, /* u32 */ |
| 120 | L2TP_ATTR_UDP_SPORT, /* u16 */ | 120 | L2TP_ATTR_UDP_SPORT, /* u16 */ |
| 121 | L2TP_ATTR_UDP_DPORT, /* u16 */ | 121 | L2TP_ATTR_UDP_DPORT, /* u16 */ |
| 122 | L2TP_ATTR_MTU, /* u16 */ | 122 | L2TP_ATTR_MTU, /* u16 (not used) */ |
| 123 | L2TP_ATTR_MRU, /* u16 (not used) */ | 123 | L2TP_ATTR_MRU, /* u16 (not used) */ |
| 124 | L2TP_ATTR_STATS, /* nested */ | 124 | L2TP_ATTR_STATS, /* nested */ |
| 125 | L2TP_ATTR_IP6_SADDR, /* struct in6_addr */ | 125 | L2TP_ATTR_IP6_SADDR, /* struct in6_addr */ |