aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2025-05-12 18:47:00 +0200
committerStefano Brivio <sbrivio@redhat.com>2025-05-12 21:04:57 +0200
commit8ec134109eb136432a29bdf5a14f8b1fd4e46208 (patch)
tree9aa31b659b39a70f0822e85541c18169278c9566
parent92d5d680134455f1a5b51fd8a3e9e64c99ac6d13 (diff)
downloadpasst-8ec134109eb136432a29bdf5a14f8b1fd4e46208.tar
passt-8ec134109eb136432a29bdf5a14f8b1fd4e46208.tar.gz
passt-8ec134109eb136432a29bdf5a14f8b1fd4e46208.tar.bz2
passt-8ec134109eb136432a29bdf5a14f8b1fd4e46208.tar.lz
passt-8ec134109eb136432a29bdf5a14f8b1fd4e46208.tar.xz
passt-8ec134109eb136432a29bdf5a14f8b1fd4e46208.tar.zst
passt-8ec134109eb136432a29bdf5a14f8b1fd4e46208.zip
flow: close socket fd on error2025_05_12.8ec1341
In eea8a76caf85 ("flow: fix podman issue #26073"), we unregister the fd from epoll_ctl() in case of error, but we also need to close it. As flowside_sock_l4() also calls sock_l4_sa() via flowside_sock_splice() we can do it unconditionally. Fixes: eea8a76caf85 ("flow: fix podman issue #26073") Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--udp_flow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/udp_flow.c b/udp_flow.c
index b3a13b7..4c6b3c2 100644
--- a/udp_flow.c
+++ b/udp_flow.c
@@ -88,8 +88,8 @@ static int udp_flow_sock(const struct ctx *c,
if (flowside_connect(c, s, pif, side) < 0) {
int rc = -errno;
- if (pif == PIF_HOST)
- epoll_del(c, s);
+ epoll_del(c, s);
+ close(s);
flow_dbg_perror(uflow, "Couldn't connect flow socket");
return rc;