1
0

081-07-ppp-remove-PPPOX_ZOMBIE-socket-state.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From: Guillaume Nault <g.nault@alphalink.fr>
  2. Date: Thu, 19 Nov 2015 12:53:21 +0100
  3. Subject: [PATCH] ppp: remove PPPOX_ZOMBIE socket state
  4. PPPOX_ZOMBIE is never set anymore.
  5. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
  6. Signed-off-by: David S. Miller <davem@davemloft.net>
  7. ---
  8. --- a/drivers/net/ppp/pppoe.c
  9. +++ b/drivers/net/ppp/pppoe.c
  10. @@ -311,7 +311,7 @@ static void pppoe_flush_dev(struct net_d
  11. lock_sock(sk);
  12. if (po->pppoe_dev == dev &&
  13. - sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
  14. + sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) {
  15. pppox_unbind_sock(sk);
  16. sk->sk_state_change(sk);
  17. po->pppoe_dev = NULL;
  18. @@ -775,7 +775,7 @@ static int pppoe_ioctl(struct socket *so
  19. struct pppox_sock *relay_po;
  20. err = -EBUSY;
  21. - if (sk->sk_state & (PPPOX_BOUND | PPPOX_ZOMBIE | PPPOX_DEAD))
  22. + if (sk->sk_state & (PPPOX_BOUND | PPPOX_DEAD))
  23. break;
  24. err = -ENOTCONN;
  25. --- a/drivers/net/ppp/pppox.c
  26. +++ b/drivers/net/ppp/pppox.c
  27. @@ -58,7 +58,7 @@ void pppox_unbind_sock(struct sock *sk)
  28. {
  29. /* Clear connection to ppp device, if attached. */
  30. - if (sk->sk_state & (PPPOX_BOUND | PPPOX_CONNECTED | PPPOX_ZOMBIE)) {
  31. + if (sk->sk_state & (PPPOX_BOUND | PPPOX_CONNECTED)) {
  32. ppp_unregister_channel(&pppox_sk(sk)->chan);
  33. sk->sk_state = PPPOX_DEAD;
  34. }
  35. --- a/include/linux/if_pppox.h
  36. +++ b/include/linux/if_pppox.h
  37. @@ -91,7 +91,6 @@ enum {
  38. PPPOX_CONNECTED = 1, /* connection established ==TCP_ESTABLISHED */
  39. PPPOX_BOUND = 2, /* bound to ppp device */
  40. PPPOX_RELAY = 4, /* forwarding is enabled */
  41. - PPPOX_ZOMBIE = 8, /* dead, but still bound to ppp device */
  42. PPPOX_DEAD = 16 /* dead, useless, please clean me up!*/
  43. };