aboutgitcodebugslistschat
path: root/test/build/cppcheck
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-03-21 16:01:30 +0100
committerStefano Brivio <sbrivio@redhat.com>2023-03-21 16:19:04 +0100
commitccf6d2a7b48d08c23c16a618d5f8e148c3fc84de (patch)
tree57d932a59d7bec19ded48aba50fa7cf7d2ebdbb6 /test/build/cppcheck
parent418f75ac378088f30d8f8d9a9709b72bfb5859e4 (diff)
downloadpasst-ccf6d2a7b48d08c23c16a618d5f8e148c3fc84de.tar
passt-ccf6d2a7b48d08c23c16a618d5f8e148c3fc84de.tar.gz
passt-ccf6d2a7b48d08c23c16a618d5f8e148c3fc84de.tar.bz2
passt-ccf6d2a7b48d08c23c16a618d5f8e148c3fc84de.tar.lz
passt-ccf6d2a7b48d08c23c16a618d5f8e148c3fc84de.tar.xz
passt-ccf6d2a7b48d08c23c16a618d5f8e148c3fc84de.tar.zst
passt-ccf6d2a7b48d08c23c16a618d5f8e148c3fc84de.zip
udp: Actually bind detected namespace ports in init namespace
When I reworked udp_init() to move most of the port binding logic to conf_ports, I accidentally dropped this bit of automatic port detection (and binding) at start-up. On -U auto, in pasta mode, udp_sock_init_ns() binds ports in the namespace that correspond to ports bound in the init namespace, but on -u auto, nothing actually happens after port detection. Add udp_sock_init_init() to deal with this, and while at it fix the comment to udp_sock_init_ns(): the latter takes care of outbound "connections". This is currently not covered by tests, and the UDP port needs to be already bound in the namespace when pasta starts (periodic detection for UDP is a missing feature at the moment). It can be checked like this: $ unshare -rUn # echo $$ 590092 # socat -u UDP-LISTEN:5555 STDOUT $ pasta -q -u auto 590092 $ echo "test" | socat -u STDIN UDP:localhost:5555 Reported-by: Paul Holzinger <pholzing@redhat.com> Fixes: 3c6ae625101a ("conf, tcp, udp: Allow address specification for forwarded ports") Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/build/cppcheck')
0 files changed, 0 insertions, 0 deletions