ax25: Quick fix for making sure unaccepted sockets get destroyed.

Previous thread: Revert "ax25: Fix std timer socket destroy handling." by Linux Kernel Mailing List on Wednesday, October 8, 2008 - 2:59 pm. (1 message)

Next thread: net: only invoke dev->change_rx_flags when device is UP by Linux Kernel Mailing List on Wednesday, October 8, 2008 - 2:59 pm. (1 message)
From: Linux Kernel Mailing List
Date: Wednesday, October 8, 2008 - 2:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=33d1d2...
Commit:     33d1d2c52c3befa6c4df33b4ba58137d1c48894b
Parent:     88a944eef8a4f9a2ca647eb16202a2b63f8ba7cd
Author:     David S. Miller <davem@davemloft.net>
AuthorDate: Mon Oct 6 12:53:50 2008 -0700
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Mon Oct 6 12:53:50 2008 -0700

    ax25: Quick fix for making sure unaccepted sockets get destroyed.
    
    Since we reverted 30902dc3cb0ea1cfc7ac2b17bcf478ff98420d74 ("ax25: Fix
    std timer socket destroy handling.") we have to put some kind of fix
    in to cure the issue whereby unaccepted connections do not get destroyed.
    
    The approach used here is from Tihomir Heidelberg - 9a4gl
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ax25/af_ax25.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 01c83e2..28c7157 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -317,6 +317,9 @@ void ax25_destroy_socket(ax25_cb *ax25)
 				/* Queue the unaccepted socket for death */
 				sock_orphan(skb->sk);
 
+				/* 9A4GL: hack to release unaccepted sockets */
+				skb->sk->sk_state = TCP_LISTEN;
+
 				ax25_start_heartbeat(sax25);
 				sax25->state = AX25_STATE_0;
 			}
--

Previous thread: Revert "ax25: Fix std timer socket destroy handling." by Linux Kernel Mailing List on Wednesday, October 8, 2008 - 2:59 pm. (1 message)

Next thread: net: only invoke dev->change_rx_flags when device is UP by Linux Kernel Mailing List on Wednesday, October 8, 2008 - 2:59 pm. (1 message)