]> git.ipfire.org Git - thirdparty/bind9.git/commit
fix: dev: Don't ignore the local port number in dns_dispatch_add() for TCP
authorArаm Sаrgsyаn <aram@isc.org>
Wed, 2 Oct 2024 09:51:40 +0000 (09:51 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Wed, 2 Oct 2024 09:51:40 +0000 (09:51 +0000)
commit41f4c620c2e146faee7e92f234f4650dc31076ed
tree541ae6a3e7aa010393ebaa5d48c66789b18c5044
parente618cdddf8fb9f8b359082f879c777bd7cc3f48c
parentd49a8f518a8ffe4b2db2ea20ed3171723ff0404b
fix: dev: Don't ignore the local port number in dns_dispatch_add() for TCP

The dns_dispatch_add() function registers the 'resp' entry in
'disp->mgr->qids' hash table with 'resp->port' being 0, but in
tcp_recv_success(), when looking up an entry in the hash table
after a successfully received data the port is used, so if the
local port was set (i.e. it was not 0) it fails to find the
entry and results in an unexpected error.

Set the 'resp->port' to the given local port value extracted from
'disp->local'.

Closes #4969

Merge branch '4969-dispatch-tcp-source-port-bug-fix' into 'main'

See merge request isc-projects/bind9!9576