diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 14:49:57 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 14:49:57 +0000 |
commit | 2034dac421494723224d278a9b1eeb17bfcf14dd (patch) | |
tree | 736d2d3858d118bbc3eef6026bdb5b85fa8ff3c3 /usr.sbin | |
parent | 241d3bf325998ee49c7d65e82192bfadf55cbc81 (diff) |
Call accept_unpause() when any TCP socket is closed.
We were calling accept_unpause() only when an LDP session is shut
down. But, during the LDP session establishment process, we may have
TCP sockets that are not associated with any neighbor. If we close one
of these sockets, we must call accept_unpause() too.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ldpd/control.c | 4 | ||||
-rw-r--r-- | usr.sbin/ldpd/packet.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/ldpd/control.c b/usr.sbin/ldpd/control.c index 38b87a4806d..5516b411bc0 100644 --- a/usr.sbin/ldpd/control.c +++ b/usr.sbin/ldpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.17 2015/12/05 13:11:48 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.18 2016/05/23 14:49:56 renato Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -182,8 +182,8 @@ control_close(int fd) event_del(&c->iev.ev); close(c->iev.ibuf.fd); - free(c); accept_unpause(); + free(c); } /* ARGSUSED */ diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c index 484b08f77fe..576616c9e87 100644 --- a/usr.sbin/ldpd/packet.c +++ b/usr.sbin/ldpd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.41 2015/07/21 04:43:28 renato Exp $ */ +/* $OpenBSD: packet.c,v 1.42 2016/05/23 14:49:56 renato Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -258,6 +258,7 @@ tcp_close(struct tcp_conn *tcp) evbuf_clear(&tcp->wbuf); event_del(&tcp->rev); close(tcp->fd); + accept_unpause(); free(tcp->rbuf); free(tcp); } @@ -567,8 +568,6 @@ session_close(struct nbr *nbr) nbr_stop_ktimer(nbr); nbr_stop_ktimeout(nbr); - - accept_unpause(); } ssize_t |