passt: Close UNIX domain socket on failure before accepting new connections
The socket isn't necessarily closed, make sure we close it before getting a new one from accept(), so that we don't mix it up with protocol sockets numbering. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
17337a736f
commit
4adae47c40
1 changed files with 3 additions and 1 deletions
4
passt.c
4
passt.c
|
@ -876,8 +876,10 @@ loop:
|
||||||
if (events[i].events & EPOLLRDHUP ||
|
if (events[i].events & EPOLLRDHUP ||
|
||||||
events[i].events & EPOLLHUP ||
|
events[i].events & EPOLLHUP ||
|
||||||
events[i].events & EPOLLERR ||
|
events[i].events & EPOLLERR ||
|
||||||
tap_handler(&c, &now))
|
tap_handler(&c, &now)) {
|
||||||
|
close(c.fd_unix);
|
||||||
goto listen;
|
goto listen;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sock_handler(&c, events[i].data.fd, events[i].events,
|
sock_handler(&c, events[i].data.fd, events[i].events,
|
||||||
&now);
|
&now);
|
||||||
|
|
Loading…
Reference in a new issue