aboutgitcodebugslistschat
path: root/test/run
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-10-10 02:40:29 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-10-15 02:10:36 +0200
commit346da48fe6fbf7a6433173790609801a4958bd9e (patch)
treed46e143d580ace53de3f58884e26a8c2b95d80ae /test/run
parent2970dc257cb09be0514085b9ae4732231bbc91af (diff)
downloadpasst-346da48fe6fbf7a6433173790609801a4958bd9e.tar
passt-346da48fe6fbf7a6433173790609801a4958bd9e.tar.gz
passt-346da48fe6fbf7a6433173790609801a4958bd9e.tar.bz2
passt-346da48fe6fbf7a6433173790609801a4958bd9e.tar.lz
passt-346da48fe6fbf7a6433173790609801a4958bd9e.tar.xz
passt-346da48fe6fbf7a6433173790609801a4958bd9e.tar.zst
passt-346da48fe6fbf7a6433173790609801a4958bd9e.zip
udp: Fix port and address checks for DNS forwarder
First off, as we swap endianness for source ports in udp_fill_data_v{4,6}(), we want host endianness, not network endianness. It doesn't actually matter if we use htons() or ntohs() here, but the current version is confusing. In the IPv4 path, when we remap DNS answers, we already swapped the endianness as needed for the source port: don't swap it again, otherwise we'll not map DNS answers for IPv4. In the IPv6 path, when we remap DNS answers, we want to check that they came from our upstream DNS server, not the one configured via --dns-forward (which doesn't even need to exist for this functionality to work). Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/run')
0 files changed, 0 insertions, 0 deletions