Skip to contentSkip to conversation

X25 fix dead unaccepted sockets

PATCH Applied Andrew Hendry 2 participants 2 messages Apr 18, 2010 – Apr 21, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 X25 fix dead unaccepted sockets

1, An X25 program binds and listens
2, calls arrive waiting to be accepted
3, Program exits without accepting
4, Sockets time out but don't get correctly cleaned up
5, cat /proc/net/x25/socket shows the dead sockets with bad inode fields.

This line borrowed from AX25 sets the dying socket so the timers clean up later.

---
 net/x25/af_x25.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
net/x25/af_x25.c +1 -0
index cbddd0c..36e84e1 100644
@@ -402,6 +402,7 @@ static void __x25_destroy_socket(struct sock *sk)
 			/*
 			 * Queue the unaccepted socket for death
 			 */
+			skb->sk->sk_state = TCP_LISTEN;
 			sock_set_flag(skb->sk, SOCK_DEAD);
 			x25_start_heartbeat(skb->sk);
 			x25_sk(skb->sk)->state = X25_STATE_0;
Signature · 1 line
1.5.6.5
maintainer Applied
#1 lore raw

From: Andrew Hendry <[email protected]>
Date: Sun, 18 Apr 2010 10:17:32 +1000

Quoted 10 lines

1, An X25 program binds and listens
2, calls arrive waiting to be accepted
3, Program exits without accepting
4, Sockets time out but don't get correctly cleaned up
5, cat /proc/net/x25/socket shows the dead sockets with bad inode fields.

This line borrowed from AX25 sets the dying socket so the timers clean up later.

Applied, thank you.