Skip to content

l2tp: socket lookup fixes for l2tp_ip and l2tp_ip6

Guillaume Nault netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2l2tp: consider '::' as wildcard address in l2tp_ip6 socket lookupnet/l2tp/l2tp_ip6.c+2 -20 replies
2/2l2tp: take remote address into account in l2tp_ip and l2tp_ip6 socket lookupsnet/l2tp/l2tp_ip.c net/l2tp/l2tp_ip6.c+12 -270 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 0/2] l2tp: socket lookup fixes for l2tp_ip and l2tp_ip6

There are still some cases that aren't correctly handled in the socket lookup functions of l2tp_ip and l2tp_ip6. This series fixes lookups for connected sockets and for sockets bound to the IPv6 unspecified address.

bind() and connect() should now work as expected on IPPROTO_L2TP sockets. Extra features, like SO_REUSEADDR, remain unsupported.

The matching conditions in __l2tp_ip6_bind_lookup() and __l2tp_ip_bind_lookup() are getting hard to read. I've kept the single test approach to make the intend of the patches clear. I'll split the conditionals once these fixes reach net-next.

Guillaume Nault (2):
l2tp: consider '::' as wildcard address in l2tp_ip6 socket lookup
l2tp: take remote address into account in l2tp_ip and l2tp_ip6 socket
lookups

 net/l2tp/l2tp_ip.c  | 19 ++++++-------------
 net/l2tp/l2tp_ip6.c | 24 ++++++++----------------
 2 files changed, 14 insertions(+), 29 deletions(-)
Signature · 1 line
2.11.0