|
@@ -1762,9 +1762,16 @@ int udp_rcv(struct sk_buff *skb)
|
|
|
|
|
|
void udp_destroy_sock(struct sock *sk)
|
|
void udp_destroy_sock(struct sock *sk)
|
|
{
|
|
{
|
|
|
|
+ struct udp_sock *up = udp_sk(sk);
|
|
bool slow = lock_sock_fast(sk);
|
|
bool slow = lock_sock_fast(sk);
|
|
udp_flush_pending_frames(sk);
|
|
udp_flush_pending_frames(sk);
|
|
unlock_sock_fast(sk, slow);
|
|
unlock_sock_fast(sk, slow);
|
|
|
|
+ if (static_key_false(&udp_encap_needed) && up->encap_type) {
|
|
|
|
+ void (*encap_destroy)(struct sock *sk);
|
|
|
|
+ encap_destroy = ACCESS_ONCE(up->encap_destroy);
|
|
|
|
+ if (encap_destroy)
|
|
|
|
+ encap_destroy(sk);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|