summaryrefslogtreecommitdiff
path: root/net/l2tp/l2tp_debugfs.c
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2018-08-03 13:38:37 +0300
committerDavid S. Miller <davem@davemloft.net>2018-08-03 20:03:57 +0300
commit789141b215fc509defdd0f0978e4bf1bb5b31fc2 (patch)
treed78ce6506f81efcf2ab0bd54d4698fa2e077e632 /net/l2tp/l2tp_debugfs.c
parent1f5cd2a0107d4ed95cbd9118e6a5f7ccd3d4d12a (diff)
downloadlinux-789141b215fc509defdd0f0978e4bf1bb5b31fc2.tar.xz
l2tp: simplify MTU handling in l2tp_ppp
The value of the session's .mtu field, as defined by pppol2tp_connect() or pppol2tp_session_create(), is later overwritten by pppol2tp_session_init() (unless getting the tunnel's socket PMTU fails). This field is then only used when setting the PPP channel's MTU in pppol2tp_connect(). Furthermore, the SIOC[GS]IFMTU ioctls only act on the session's .mtu without propagating this value to the PPP channel, making them useless. This patch initialises the PPP channel's MTU directly and ignores the session's .mtu entirely. MTU is still computed by subtracting the PPPOL2TP_HEADER_OVERHEAD constant. It is not optimal, but that doesn't really matter: po->chan.mtu is only used when the channel is part of a multilink PPP bundle. Running multilink PPP over packet switched networks is certainly not going to be efficient, so not picking the best MTU does not harm (in the worst case, packets will just be fragmented by the underlay). The SIOC[GS]IFMTU ioctls are removed entirely (as opposed to simply ignored), because these ioctls commands are part of the requests that should be handled generically by the socket layer. PX_PROTO_OL2TP was the only socket type abusing these ioctls. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_debugfs.c')
0 files changed, 0 insertions, 0 deletions