mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	middleware/file: add nsec for wildcard expansion (#382)
A NSEC record is need to deny any other name that might exist. Also don't blindly perform the interface conversion when getting glue for NS records as they now may include RRSIG - also add tests for that.
This commit is contained in:
		| @@ -31,6 +31,10 @@ var wildcardTestCases = []test.Case{ | ||||
| 			test.RRSIG("wild.dnssex.nl.	1800	IN	RRSIG	TXT 8 2 1800 20160428190224 20160329190224 14460 dnssex.nl. FUZSTyvZfeuuOpCm"), | ||||
| 			test.TXT(`wild.dnssex.nl.	1800	IN	TXT	"Doing It Safe Is Better"`), | ||||
| 		}, | ||||
| 		Ns: []dns.RR{ | ||||
| 			test.NSEC("a.dnssex.nl.	14400	IN	NSEC	www.dnssex.nl. A AAAA RRSIG NSEC"), | ||||
| 			test.RRSIG("a.dnssex.nl.	14400	IN	RRSIG	NSEC 8 3 14400 20160428190224 20160329190224 14460 dnssex.nl. S+UMs2ySgRaaRY"), | ||||
| 		}, | ||||
| 		Extra: []dns.RR{test.OPT(4096, true)}, | ||||
| 	}, | ||||
| 	{ | ||||
| @@ -39,6 +43,10 @@ var wildcardTestCases = []test.Case{ | ||||
| 			test.RRSIG("a.wild.dnssex.nl.	1800	IN	RRSIG	TXT 8 2 1800 20160428190224 20160329190224 14460 dnssex.nl. FUZSTyvZfeuuOpCm"), | ||||
| 			test.TXT(`a.wild.dnssex.nl.	1800	IN	TXT	"Doing It Safe Is Better"`), | ||||
| 		}, | ||||
| 		Ns: []dns.RR{ | ||||
| 			test.NSEC("a.dnssex.nl.	14400	IN	NSEC	www.dnssex.nl. A AAAA RRSIG NSEC"), | ||||
| 			test.RRSIG("a.dnssex.nl.	14400	IN	RRSIG	NSEC 8 3 14400 20160428190224 20160329190224 14460 dnssex.nl. S+UMs2ySgRaaRY"), | ||||
| 		}, | ||||
| 		Extra: []dns.RR{test.OPT(4096, true)}, | ||||
| 	}, | ||||
| 	// nodata responses | ||||
|   | ||||
		Reference in New Issue
	
	Block a user