diff options
Diffstat (limited to 'drivers/net/pppoe.c')
-rw-r--r-- | drivers/net/pppoe.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index a842ecc60a34..71e303b28646 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -383,8 +383,6 @@ static int pppoe_rcv(struct sk_buff *skb, | |||
383 | { | 383 | { |
384 | struct pppoe_hdr *ph; | 384 | struct pppoe_hdr *ph; |
385 | struct pppox_sock *po; | 385 | struct pppox_sock *po; |
386 | struct sock *sk; | ||
387 | int ret; | ||
388 | 386 | ||
389 | if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) | 387 | if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) |
390 | goto drop; | 388 | goto drop; |
@@ -395,24 +393,8 @@ static int pppoe_rcv(struct sk_buff *skb, | |||
395 | ph = (struct pppoe_hdr *) skb->nh.raw; | 393 | ph = (struct pppoe_hdr *) skb->nh.raw; |
396 | 394 | ||
397 | po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source); | 395 | po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source); |
398 | if (!po) | 396 | if (po != NULL) |
399 | goto drop; | 397 | return sk_receive_skb(sk_pppox(po), skb); |
400 | |||
401 | sk = sk_pppox(po); | ||
402 | bh_lock_sock(sk); | ||
403 | |||
404 | /* Socket state is unknown, must put skb into backlog. */ | ||
405 | if (sock_owned_by_user(sk) != 0) { | ||
406 | sk_add_backlog(sk, skb); | ||
407 | ret = NET_RX_SUCCESS; | ||
408 | } else { | ||
409 | ret = pppoe_rcv_core(sk, skb); | ||
410 | } | ||
411 | |||
412 | bh_unlock_sock(sk); | ||
413 | sock_put(sk); | ||
414 | |||
415 | return ret; | ||
416 | drop: | 398 | drop: |
417 | kfree_skb(skb); | 399 | kfree_skb(skb); |
418 | out: | 400 | out: |