Skip to content

Commit

Permalink
X25 fix dead unaccepted sockets
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Andrew Hendry <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
AndrewHendry authored and davem330 committed Apr 21, 2010
1 parent 761172f commit 2cec6b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2cec6b0

Please sign in to comment.