aboutgitcodebugslistschat
path: root/icmp.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-08-11 15:12:18 +1000
committerStefano Brivio <sbrivio@redhat.com>2023-08-13 17:29:44 +0200
commit548e05f76aad0580952714c0522e8fe3b9203ad5 (patch)
tree844ead0f7367b9178daf09d21b263e61ab2d97ba /icmp.c
parent28877b0fcdde7bd5c7ff3fc9305fc28ad9ba17cf (diff)
downloadpasst-548e05f76aad0580952714c0522e8fe3b9203ad5.tar
passt-548e05f76aad0580952714c0522e8fe3b9203ad5.tar.gz
passt-548e05f76aad0580952714c0522e8fe3b9203ad5.tar.bz2
passt-548e05f76aad0580952714c0522e8fe3b9203ad5.tar.lz
passt-548e05f76aad0580952714c0522e8fe3b9203ad5.tar.xz
passt-548e05f76aad0580952714c0522e8fe3b9203ad5.tar.zst
passt-548e05f76aad0580952714c0522e8fe3b9203ad5.zip
tap: Clean up behaviour for errors on listening Unix socket
We call tap_sock_unix_new() to handle a new connection to the qemu socket if we get an EPOLLIN event on c->fd_tap_listen. If we get any other event on the fd, we'll fall through to the "tap reset" path. But that won't do anything relevant to the listening socket, it will just close the already connected socket. Furthermore, the only other event we're subscribed to for the listening socket is EPOLLRDHUP, which doesn't apply to a non connected socket. Remove EPOLLRDHUP from the subscribed events. We don't need to explicitly add EPOLLERR, because errors are always reported. There's no obvious case that would cause an error on a listening socket anyway, and it's not obvious how we'd recover, treat it as a fatal error if it ever does happen. Finally, fold all this handling into the tap_sock_unix_new() function, there's no real reason to split it between there and tap_handler(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'icmp.c')
0 files changed, 0 insertions, 0 deletions