Commit 8af6615
committed
config: reject hostnames whose last label is too long
`valid_domain()` measured a label when it found the terminating dot, so the last one was never checked and `1.2.3.4 test.<64 characters>` passed. dnsmasq rejects labels above 63 characters, so with `dns.hostsLocal` such an entry produced a `local=` line that makes the resolver refuse to start.
Signed-off-by: DL6ER <dl6er@dl6er.de>1 parent a787629 commit 8af6615
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1630 | 1630 | | |
1631 | 1631 | | |
1632 | 1632 | | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
1633 | 1639 | | |
1634 | 1640 | | |
1635 | 1641 | | |
| |||
0 commit comments