Add a default logmessage to NSD when we receive a notify for an unauthorive zone Used by a script to check against authorized hosts and add the zone automatically --- nsd-3.2.5/query.c.orig 2010-06-19 14:23:53.000000000 +0200 +++ nsd-3.2.5/query.c 2010-06-19 14:30:02.000000000 +0200 @@ -397,8 +397,17 @@ dname_to_string(query->qname, NULL))); zone_opt = zone_options_find(nsd->options, query->qname); - if(!zone_opt) + if(!zone_opt) { + /* Thomas Eckhardt 2010-06-18: add logmessage for unauthoritative notifies similar to bind */ + char address[128]; + if (addr2ip(query->addr, address, 128)) { + DEBUG(DEBUG_XFRD,1, (LOG_INFO, "addr2ip failed")); + strlcpy(address, "[unknown]", sizeof(address)); + } + log_msg(LOG_NOTICE, "received notify from %s for zone '%s': not authoritative", + address, dname_to_string(query->qname, NULL) ); return query_error(query, NSD_RC_NXDOMAIN); + } if(!nsd->this_child) /* we are in debug mode or something */ return query_error(query, NSD_RC_SERVFAIL);