Commit 2967388
authored
fix(ipparser): return SOA with NOERROR responses (#61)
* fix(ipparser): return SOA with NOERROR responses
aims to fix #52
according to RFC 2308 NODATA responses (NOERROR with no answers) should
include an SOA in the AUTHORITY section to specify the negative caching TTL
ipparser produced synthetic responses which were done by hand, and thus
did not benefit from coredns setting SOA.
this code reads SOA from the zone file, and attaches it to NOERROR
responses produced by ipparser plugin
* refactor: reuse entire dns.RR
this is a static response, fine to reuse across all responses1 parent 695bd14 commit 2967388
1 file changed
Lines changed: 47 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
35 | 72 | | |
36 | 73 | | |
37 | | - | |
| 74 | + | |
38 | 75 | | |
39 | 76 | | |
40 | 77 | | |
| |||
43 | 80 | | |
44 | 81 | | |
45 | 82 | | |
| 83 | + | |
46 | 84 | | |
47 | 85 | | |
48 | 86 | | |
| |||
141 | 179 | | |
142 | 180 | | |
143 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
144 | 190 | | |
145 | 191 | | |
146 | 192 | | |
| |||
0 commit comments