]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: split l2tp_session_get()
authorGuillaume Nault <g.nault@alphalink.fr>
Fri, 10 Aug 2018 11:21:57 +0000 (13:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Aug 2018 19:13:49 +0000 (12:13 -0700)
commitfbf4b89df11515258672631dec8f56cdf57d87b1
treea485ad31a7e8f2fa62ce2e8d8107c34c5bcb3f10
parent19b9259928f95d94f82508ce56fc5e2eb9b3f2ea
l2tp: split l2tp_session_get()

l2tp_session_get() is used for two different purposes. If 'tunnel' is
NULL, the session is searched globally in the supplied network
namespace. Otherwise it is searched exclusively in the tunnel context.

Callers always know the context in which they need to search the
session. But some of them do provide both a namespace and a tunnel,
making the semantic of the call unclear.

This patch defines l2tp_tunnel_get_session() for lookups done in a
tunnel and restricts l2tp_session_get() to namespace searches.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c
net/l2tp/l2tp_core.h
net/l2tp/l2tp_ip.c
net/l2tp/l2tp_ip6.c
net/l2tp/l2tp_netlink.c
net/l2tp/l2tp_ppp.c