Skip to content

l2tp: cleanup socket lookup code in 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 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4l2tp: remove redundant addr_len check in l2tp_ip_bind()net/l2tp/l2tp_ip.c+1 -10 replies
2/4l2tp: make __l2tp_ip*_bind_lookup() parameters 'const'net/l2tp/l2tp_ip.c net/l2tp/l2tp_ip6.c+5 -50 replies
3/4l2tp: remove useless NULL check in __l2tp_ip*_bind_lookup()net/l2tp/l2tp_ip.c net/l2tp/l2tp_ip6.c+0 -60 replies
4/4l2tp: rework socket comparison in __l2tp_ip*_bind_lookup()net/l2tp/l2tp_ip.c net/l2tp/l2tp_ip6.c+35 -140 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/4] l2tp: cleanup socket lookup code in l2tp_ip and l2tp_ip6

First three patches remove redundant tests and add missing "const" qualifiers.

Fourth patch splits the conditionals found in __l2tp_ip*_bind_lookup(), to make these functions easier to review. In the process, I found that some corner cases were still not handled properly. So I've added the missing tests in this patch too, because they're pretty simple and the whole "if" statements are modified anyway.

I expect it to be easier to review this way. If not, I can split up patch #4, post the missing tests separately to -net, and later repost this series as pure cleanup. Just let me know.

Guillaume Nault (4):
l2tp: remove redundant addr_len check in l2tp_ip_bind()
l2tp: make __l2tp_ip*_bind_lookup() parameters 'const'
l2tp: remove useless NULL check in __l2tp_ip{,6}_bind_lookup()
l2tp: rework socket comparison in __l2tp_ip*_bind_lookup()

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