l2tp: take remote address into account in l2tp_ip and l2tp_ip6 socket lookups
authorGuillaume Nault <g.nault@alphalink.fr>
Fri, 30 Dec 2016 18:48:20 +0000 (19:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Dec 2017 21:01:50 +0000 (22:01 +0100)
commitd2d74d0e58b20d4464f9f24b33e083a3f6766aa6
treed9bb8c6388973fdcbf69af3d7b78fce402782767
parent55c050ae5165bbeff669aaf32c7ed4dfc8f513b4
l2tp: take remote address into account in l2tp_ip and l2tp_ip6 socket lookups

[ Upstream commit a9b2dff80be979432484afaf7f8d8e73f9e8838a ]

For connected sockets, __l2tp_ip{,6}_bind_lookup() needs to check the
remote IP when looking for a matching socket. Otherwise a connected
socket can receive traffic not originating from its peer.

Drop l2tp_ip_bind_lookup() and l2tp_ip6_bind_lookup() instead of
updating their prototype, as these functions aren't used.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/l2tp/l2tp_ip.c
net/l2tp/l2tp_ip6.c