|
@@ -178,9 +178,10 @@ pass_up:
|
|
|
|
|
|
tunnel_id = ntohl(*(__be32 *) &skb->data[4]);
|
|
tunnel_id = ntohl(*(__be32 *) &skb->data[4]);
|
|
tunnel = l2tp_tunnel_find(net, tunnel_id);
|
|
tunnel = l2tp_tunnel_find(net, tunnel_id);
|
|
- if (tunnel != NULL)
|
|
|
|
|
|
+ if (tunnel) {
|
|
sk = tunnel->sock;
|
|
sk = tunnel->sock;
|
|
- else {
|
|
|
|
|
|
+ sock_hold(sk);
|
|
|
|
+ } else {
|
|
struct iphdr *iph = (struct iphdr *) skb_network_header(skb);
|
|
struct iphdr *iph = (struct iphdr *) skb_network_header(skb);
|
|
|
|
|
|
read_lock_bh(&l2tp_ip_lock);
|
|
read_lock_bh(&l2tp_ip_lock);
|