Måns Nilsson
2007-Jan-27 15:23 UTC
small patch to make nsd-notify increase timeout from a small value
--- nsd-3.0.4/nsd-notify.c 2006-09-01 23:22:14.000000000 +0200 +++ nsd-test/nsd-notify.c 2007-01-27 16:17:42.000000000 +0100 @@ -69,8 +69,8 @@ notify_host(int udp_s, struct query* q, struct query *answer, struct addrinfo* res, const char* addrstr) { - int timeout_retry = 5; /* seconds */ - int num_retry = 15; /* times to try */ + int timeout_retry = 1; /* seconds */ + int num_retry = 6; /* times to try */ fd_set rfds; struct timeval tv; int retval = 0; @@ -115,6 +115,7 @@ if (retval == 1) { got_ack = 1; } + timeout_retry = timeout_retry*2; } /* receive reply */ Result: rasmus:~/src/nsd-3.0.1 mansaxel$ ./nsd-notify -z namn.se 169.254.47.12 [1169911073] nsd-notify[5644]: warning: timeout (1 s) expired, retry notify to 169.254.47.12. [1169911075] nsd-notify[5644]: warning: timeout (2 s) expired, retry notify to 169.254.47.12. [1169911079] nsd-notify[5644]: warning: timeout (4 s) expired, retry notify to 169.254.47.12. [1169911087] nsd-notify[5644]: warning: timeout (8 s) expired, retry notify to 169.254.47.12. [1169911103] nsd-notify[5644]: warning: timeout (16 s) expired, retry notify to 169.254.47.12. [1169911135] nsd-notify[5644]: warning: error: failed to send notify to 169.254.47.12. I think, after very brief testing, that this is nicer to wait for than 15*5 seconds. -- M?ns Nilsson Systems Specialist +46 70 681 7204 cell KTHNOC +46 8 790 6518 office MN1334-RIPE My uncle Murray conquered Egypt in 53 B.C. And I can prove it too!! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 186 bytes Desc: not available URL: <http://lists.nlnetlabs.nl/pipermail/nsd-users/attachments/20070127/f9971886/attachment.bin>