diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2026-06-20 01:26:24 +1000 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-06-22 09:13:46 +0200 |
| commit | 60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713 (patch) | |
| tree | 23f7cce16f469d8f8e1282f636ae2e39b2391fe0 /test | |
| parent | 780ba8a55feb99feb11c3277b2cb7d3222ec7872 (diff) | |
| download | passt-60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713.tar passt-60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713.tar.gz passt-60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713.tar.bz2 passt-60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713.tar.lz passt-60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713.tar.xz passt-60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713.tar.zst passt-60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713.zip | |
flow, udp: Fix errno handling in udp_flow_sock()
flowside_connect() behaves much like connect(2) itself, returning -1 on
error with errno set to the error code. One of the callers, in
udp_flow_sock(), uses the errno code with flow_dbg_perror() *after* it's
called epoll_del() and close() either of which could clobber errno.
Fix that by moving the debug message earlier: there's no reason it has to
wait until the epoll_del() and close().
While we're at it, adjust the comment on flowside_connect() to clarify
that it sets errno (rather than, say, returning an error code).
Suggested-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions
