l2tp: define l2tp_tunnel_uses_xfrm()
authorGuillaume Nault <g.nault@alphalink.fr>
Fri, 10 Aug 2018 11:21:55 +0000 (13:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Aug 2018 19:13:49 +0000 (12:13 -0700)
commitd6a61ec936676dbe25a6eb76e1229787dc2fbba8
tree6365ef6a97498aee99a5131bef45375d72d3d65a
parent8a8982d1e2137aa020dd9fbc96b5e3c4fd871d0c
l2tp: define l2tp_tunnel_uses_xfrm()

Use helper function to figure out if a tunnel is using ipsec.
Also, avoid accessing ->sk_policy directly since it's RCU protected.

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