mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 16:47:42 +00:00
l2tp: don't use sk_user_data in l2tp_udp_encap_err_recv
If UDP sockets are aliased, sk might be the wrong socket. There's no benefit to using sk_user_data to do some checks on the associated tunnel context. Just report the error anyway, like udp core does. Signed-off-by: James Chapman <jchapman@katalix.com> Reviewed-by: Tom Parkin <tparkin@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ff6a2ac23c
commit
c37e0138ca
@ -1030,12 +1030,6 @@ EXPORT_SYMBOL_GPL(l2tp_udp_encap_recv);
|
||||
static void l2tp_udp_encap_err_recv(struct sock *sk, struct sk_buff *skb, int err,
|
||||
__be16 port, u32 info, u8 *payload)
|
||||
{
|
||||
struct l2tp_tunnel *tunnel;
|
||||
|
||||
tunnel = rcu_dereference_sk_user_data(sk);
|
||||
if (!tunnel || tunnel->fd < 0)
|
||||
return;
|
||||
|
||||
sk->sk_err = err;
|
||||
sk_error_report(sk);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user