diff options
author | Jeremy Allison <jra@samba.org> | 2010-02-10 12:32:05 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-02-10 12:32:05 -0800 |
commit | c2f3ed48c5ac253bb17387800579f94d933b71e1 (patch) | |
tree | 9c540dd760b965af0fa993b60c82a5d11e37c1ce /source3/lib/sock_exec.c | |
parent | 84fba3c1bc962804259f201d465acfdf0cd3c6a8 (diff) | |
download | samba-c2f3ed48c5ac253bb17387800579f94d933b71e1.tar.gz samba-c2f3ed48c5ac253bb17387800579f94d933b71e1.tar.bz2 samba-c2f3ed48c5ac253bb17387800579f94d933b71e1.zip |
More of the fix for bug #7118 - nmbd problems with socket address.
Add a simple "processed packet queue" cache to stop nmbd responding to
packets received on the broadcast and non-broadcast socket (which
it has opened when "nmbd bind explicit broadcast = yes").
This is a very simple packet queue - it only keeps the packets
processed during a single call to listen_for_packets() (i.e. one
select call). This means that if the delivery notification for a
packet received on both broadcast and non-broadcast addresses
is done in two different select calls, the packet will still be
processed twice. This is a very rare occurrance and we can just
live with it when it does as the protocol is stateless. If this
is ever flagged as a repeatable problem then we can add a longer
lived cache, using timeout processing to clear etc. etc. But without
storing all packets processed we can never be *sure* we've eliminated
the race condition so I'm going to go with this simple solution until
someone proves a more complex one is needed :-).
Jeremy.
Diffstat (limited to 'source3/lib/sock_exec.c')
0 files changed, 0 insertions, 0 deletions