aboutgitcodebugslistschat
path: root/doc
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-04-15 17:16:24 +1000
committerStefano Brivio <sbrivio@redhat.com>2025-04-15 19:56:16 +0200
commit2340bbf867e6c3c3b5ac67345b0e841ab49bbaa5 (patch)
tree8e374f08552729ec1b7778fc5f5a1de02a546f8c /doc
parentcfc0ee145a5cdd29b6e584171085dac6539b86c0 (diff)
downloadpasst-2340bbf867e6c3c3b5ac67345b0e841ab49bbaa5.tar
passt-2340bbf867e6c3c3b5ac67345b0e841ab49bbaa5.tar.gz
passt-2340bbf867e6c3c3b5ac67345b0e841ab49bbaa5.tar.bz2
passt-2340bbf867e6c3c3b5ac67345b0e841ab49bbaa5.tar.lz
passt-2340bbf867e6c3c3b5ac67345b0e841ab49bbaa5.tar.xz
passt-2340bbf867e6c3c3b5ac67345b0e841ab49bbaa5.tar.zst
passt-2340bbf867e6c3c3b5ac67345b0e841ab49bbaa5.zip
udp: Propagate errors on listening and brand new sockets2025_04_15.2340bbf
udp_sock_recverr() processes errors on UDP sockets and attempts to propagate them as ICMP packets on the tap interface. To do this it currently requires the flow with which the error is associated as a parameter. If that's missing it will clear the error condition, but not propagate it. That means that we largely ignore errors on "listening" sockets. It also means we may discard some errors on flow specific sockets if they occur very shortly after the socket is created. In udp_flush_flow() we need to clear any datagrams received between bind() and connect() which might not be associated with the "final" flow for the socket. If we get errors before that point we'll ignore them in the same way because we don't know the flow they're associated with in advance. This can happen in practice if we have errors which occur almost immediately after connect(), such as ECONNREFUSED when we connect() to a local address where nothing is listening. Between the extended error message itself and the PKTINFO information we do actually have enough information to find the correct flow. So, rather than ignoring errors where we don't have a flow "hint", determine the flow the hard way in udp_sock_recverr(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [sbrivio: Change warn() to debug() in udp_sock_recverr()] Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions