diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2025-04-15 17:16:18 +1000 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-04-15 19:43:00 +0200 |
| commit | baf049f8e06b7f0a73dfa7913297679a75aad381 (patch) | |
| tree | 12523e0175f8b7ec470a4daec897fa74951cc7bd /contrib | |
| parent | 50249086a967c54ff5b2521038cbe1d27303958c (diff) | |
| download | passt-baf049f8e06b7f0a73dfa7913297679a75aad381.tar passt-baf049f8e06b7f0a73dfa7913297679a75aad381.tar.gz passt-baf049f8e06b7f0a73dfa7913297679a75aad381.tar.bz2 passt-baf049f8e06b7f0a73dfa7913297679a75aad381.tar.lz passt-baf049f8e06b7f0a73dfa7913297679a75aad381.tar.xz passt-baf049f8e06b7f0a73dfa7913297679a75aad381.tar.zst passt-baf049f8e06b7f0a73dfa7913297679a75aad381.zip | |
udp: Fix breakage of UDP error handling by PKTINFO support
We recently enabled the IP_PKTINFO / IPV6_RECVPKTINFO socket options on our
UDP sockets. This lets us obtain and properly handle the specific local
address used when we're "listening" with a socket on 0.0.0.0 or ::.
However, the PKTINFO cmsgs this option generates appear on error queue
messages as well as regular datagrams. udp_sock_recverr() doesn't expect
this and so flags an unrecoverable error when it can't parse the control
message.
Correct this by adding space in udp_sock_recverr()s control buffer for the
additional PKTINFO data, and scan through all cmsgs for the RECVERR, rather
than only looking at the first one.
Link: https://bugs.passt.top/show_bug.cgi?id=99
Fixes: f4b0dd8b0685 ("udp: Use PKTINFO cmsgs to get destination address for received datagrams")
Reported-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 'contrib')
0 files changed, 0 insertions, 0 deletions
