Skip to content

l2tp: sanitise MTU handling on sessions

Guillaume Nault netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3l2tp: define l2tp_tunnel_dst_mtu()net/l2tp/l2tp_core.h net/l2tp/l2tp_eth.c net/l2tp/l2tp_ppp.c+26 -210 replies
2/3l2tp: simplify MTU handling in l2tp_pppnet/l2tp/l2tp_ppp.c+18 -490 replies
3/3l2tp: ignore L2TP_ATTR_MTUinclude/uapi/linux/l2tp.h net/l2tp/l2tp_core.c net/l2tp/l2tp_core.h +3 more+10 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/3] l2tp: sanitise MTU handling on sessions

Most of the code handling sessions' MTU has no effect. The ->mtu field in struct l2tp_session might be used at session creation time, but neither PPP nor Ethernet pseudo-wires take updates into account.

L2TP sessions don't have a concept of MTU, which is the reason why ->mtu is mostly ignored. MTU should remain a network device thing. Therefore this patch set does not try to propagate/update ->mtu to/from the device. That would complicate the code unnecessarily. Instead this field and the associated ioctl commands and netlink attributes are removed.

Patch #1 defines l2tp_tunnel_dst_mtu() in order to simplify the following patches. Then patches #2 and #3 remove MTU handling from PPP and Ethernet pseudo-wires respectively.

Guillaume Nault (3):
l2tp: define l2tp_tunnel_dst_mtu()
l2tp: simplify MTU handling in l2tp_ppp
l2tp: ignore L2TP_ATTR_MTU

 include/uapi/linux/l2tp.h |  2 +-
 net/l2tp/l2tp_core.c      |  1 -
 net/l2tp/l2tp_core.h      | 20 +++++++++--
 net/l2tp/l2tp_debugfs.c   |  3 +-
 net/l2tp/l2tp_eth.c       | 25 +++++--------
 net/l2tp/l2tp_netlink.c   |  9 +----
 net/l2tp/l2tp_ppp.c       | 74 ++++++++++-----------------------------
 7 files changed, 47 insertions(+), 87 deletions(-)
Signature · 1 line
2.18.0