diff mbox

pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev

Message ID 20110404123324.GA12662@babylon
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ulrich Weber April 4, 2011, 12:33 p.m. UTC
otherwise we loop forever if a PPPoE socket was set
to PPPOX_ZOMBIE state by a PADT message when the
ethernet device is going down afterwards.

Signed-off-by: Ulrich Weber <uweber@astaro.com>
---
 drivers/net/pppoe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller April 6, 2011, 9:05 p.m. UTC | #1
From: Ulrich Weber <uweber@astaro.com>
Date: Mon, 4 Apr 2011 14:33:24 +0200

> otherwise we loop forever if a PPPoE socket was set
> to PPPOX_ZOMBIE state by a PADT message when the
> ethernet device is going down afterwards.
> 
> Signed-off-by: Ulrich Weber <uweber@astaro.com>

Applied, thanks Ulrich.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index 78c0e3c..71b1d8f 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -317,7 +317,7 @@  static void pppoe_flush_dev(struct net_device *dev)
 			lock_sock(sk);
 
 			if (po->pppoe_dev == dev &&
-			    sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) {
+			    sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
 				pppox_unbind_sock(sk);
 				sk->sk_state = PPPOX_ZOMBIE;
 				sk->sk_state_change(sk);