- auth zone notify work.

git-svn-id: file:///svn/unbound/trunk@4627 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2018-04-17 12:18:34 +00:00
parent 4809fe1b95
commit 630600e70d
2 changed files with 28 additions and 19 deletions

View file

@ -1,3 +1,6 @@
17 April 2018: Wouter
- auth zone notify work.
16 April 2018: Wouter 16 April 2018: Wouter
- Fix auth zone target lookup iterator. - Fix auth zone target lookup iterator.
- auth zone notify with prefix - auth zone notify with prefix

View file

@ -3312,20 +3312,11 @@ xfr_serial_means_update(struct auth_xfer* xfr, uint32_t serial)
return 0; return 0;
} }
/** process a notify serial, start new probe or note serial. xfr is locked */ /** note notify serial, updates the notify information in the xfr struct */
static void static void
xfr_process_notify(struct auth_xfer* xfr, struct module_env* env, xfr_note_notify_serial(struct auth_xfer* xfr, int has_serial, uint32_t serial)
int has_serial, uint32_t serial, struct auth_master* fromhost)
{ {
/* if the serial of notify is older than we have, don't fetch if(xfr->notify_received && xfr->notify_has_serial && has_serial) {
* a zone, we already have it */
if(has_serial && !xfr_serial_means_update(xfr, serial))
return;
/* start new probe with this addr src, or note serial */
if(!xfr_start_probe(xfr, env, fromhost)) {
/* not started because already in progress, note the serial */
if(xfr->notify_received && xfr->notify_has_serial &&
has_serial) {
/* see if this serial is newer */ /* see if this serial is newer */
if(compare_serial(xfr->notify_serial, serial) < 0) if(compare_serial(xfr->notify_serial, serial) < 0)
xfr->notify_serial = serial; xfr->notify_serial = serial;
@ -3343,6 +3334,21 @@ xfr_process_notify(struct auth_xfer* xfr, struct module_env* env,
xfr->notify_has_serial = has_serial; xfr->notify_has_serial = has_serial;
xfr->notify_serial = serial; xfr->notify_serial = serial;
} }
}
/** process a notify serial, start new probe or note serial. xfr is locked */
static void
xfr_process_notify(struct auth_xfer* xfr, struct module_env* env,
int has_serial, uint32_t serial, struct auth_master* fromhost)
{
/* if the serial of notify is older than we have, don't fetch
* a zone, we already have it */
if(has_serial && !xfr_serial_means_update(xfr, serial))
return;
/* start new probe with this addr src, or note serial */
if(!xfr_start_probe(xfr, env, fromhost)) {
/* not started because already in progress, note the serial */
xfr_note_notify_serial(xfr, has_serial, serial);
lock_basic_unlock(&xfr->lock); lock_basic_unlock(&xfr->lock);
} }
} }