argh! how horrible! spent ages working out why packets weren't being
authorLuke Leighton <lkcl@samba.org>
Sat, 4 Dec 1999 23:40:21 +0000 (23:40 +0000)
committerLuke Leighton <lkcl@samba.org>
Sat, 4 Dec 1999 23:40:21 +0000 (23:40 +0000)
commitddda7722a673cefc89a55133f99c07dd153b1f19
tree6b2148dfa7539cb48e45f76103d2fb41d848a598
parent97913d82f56388eee7d8fa8c204a1fa8c9754b88
argh!  how horrible!  spent ages working out why packets weren't being
received properly when a UDP "retry" occurs.  it's because reads and
writes must be interleaved / matched.

scenario:

nmblookup connects to agent, sends request.

agent receives request, broadcasts it on 137.

agent RECEIVES 137 broadcast, sends it to nmblookup

agent receives RESPONSE to 137 broadcast, sends it to nmblookup.

if reads are not equally interspersed with writes, then second send
will fail.

if you think this is odd behaviour and that the agent should be filtering
its own UDP traffic, think again.

agent will be, potentially, redirecting nmbd traffic (including WINS
server) not just client programs.
(This used to be commit 43e158c4261e51678d6e7f77ceb4a1c7281a2525)
source3/libsmb/namequery.c
source3/libsmb/nmblib.c
source3/utils/nmb-agent.c