pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
authorUlrich Weber <uweber@astaro.com>
Wed, 6 Apr 2011 21:04:49 +0000 (14:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Apr 2011 21:04:49 +0000 (14:04 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pppoe.c

index 78c0e3c9b2b5fcb8d42fb910ab2416e4db787dc7..71b1d8fbc301dca29ad0b8bd2e3d56c4adb97565 100644 (file)
@@ -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);