diff /n/dump/2018/1008/sys/src/cmd/ndb/dnstcp.c /sys/src/cmd/ndb/dnstcp.c 6a7,8 > #include > #include 10a13,14 > int anyone; > char *remote; 34c38 < fprint(2, "usage: %s [-rR] [-f ndb-file] [-x netmtpt] [conndir]\n", argv0); --- > fprint(2, "usage: %s [-arR] [-f ndb-file] [-x netmtpt] [conndir]\n", argv0); 48c52 < alarm(2*60*1000); --- > alarm(10*1000); 65a70,72 > case 'a': > anyone++; > break; 84d90 < dnslog("dnstcp call from %s to %I", caller, ipaddr); 87a94,100 > if((remote = csgetvalue(mntpt, "ip", caller, "dom", nil)) == nil){ > dnslog("dnstcp: %s no reverse dns name, rejected", caller); > remote = ""; > } > > dnslog("dnstcp from %s (%s)", remote, caller); > 118,119c131 < dnslog("server: reply not request from %s", < caller); --- > dnslog("server: reply not request from %s", caller); 133c145 < dnslog("[%d] %d: serve (%s) %d %s %s", --- > dnslog("[%d] %d: serve %s %d %s %s", 160a173 > exits(0); 188c201 < dnslog("%d: reply (%s) %s %s %ux", --- > dnslog("%d: reply %s %s %s %ux", 255c268,269 < int h, depth, found, nlen; --- > Server *slave; > int h, depth, found, hits, nlen; 267c281 < /* send the soa */ --- > /* we only send to those named in dnsslave=, unless -a set on command line */ 268a283,291 > for(slave = repp->an->soa->slaves; slave; slave = slave->next) > if(strcmp(remote, slave->name) == 0) > break; > if(!anyone && !slave){ > dnslog("dnstcp: %s axfr %s - not a dnsslave", caller, dp->name); > goto out; > } > > /* send the soa */ 277a301 > hits = 0; 279,280c303 < for(depth = numelem(dp->name); ; depth++){ < found = 0; --- > for(depth = numelem(dp->name); !found; depth++){ 293a317 > 297a322 > hits++; 303a329,331 > if(hits == 0) > dnslog("dnstcp: %s axfr %s fqdn not known", caller, dp->name); > 317a346 > char *p; 330a360,361 > if((p = strchr(remote, '!')) != nil) > *p = 0; diff /n/dump/2018/1008/sys/man/8/ndb /sys/man/8/ndb 80c80 < .B -rR --- > .B -arR 643a644,649 > .LP > Clients must have a reverse DNS name to sumbit requests; > They must also either be listed in dnsslave= attribute for > the relevant domain, or the > .B -a > flag must be supplied.