mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
ndb/dns: refuse recursive requests harder when given -R (thanks be0ba)
Before we would refuse to recurse, but would still give a response with hints back. Some nefarious clients will interpret the lack of a Refused response code as us being an open resolver.
This commit is contained in:
parent
761452154a
commit
9d2f21b2cf
1 changed files with 2 additions and 1 deletions
|
@ -65,7 +65,8 @@ dnserver(DNSmsg *reqp, DNSmsg *repp, Request *req, uchar *srcip, int rcode)
|
|||
if(cfg.nonrecursive
|
||||
|| cfg.localrecursive && !localip(srcip)){
|
||||
/* we don't recurse and we're not authoritative */
|
||||
neg = nil;
|
||||
setercode(repp, Rrefused);
|
||||
return;
|
||||
} else {
|
||||
repp->flags |= Fcanrec;
|
||||
if(reqp->flags & Frecurse){
|
||||
|
|
Loading…
Reference in a new issue