aboutsummaryrefslogtreecommitdiff
path: root/plugin/hosts/hostsfile_test.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-09-04The IPv4 parser no longer accepts leading zeros (#4844)Gravatar rouzier 1-5/+2
Signed-off-by: James Rouzier <rouzier@gmail.com>
2019-07-25plugin/host: don't append the names when reparsing hosts file (#3045)Gravatar Miek Gieben 1-36/+38
The host plugin kept on adding entries instead of overwriting. Split the inline cache off from the /etc/hosts file cache and clear /etc/hosts file cache and re-parsing. A bunch of other cleanup as well. Use functions defined in the plugin package, don't re-parse strings if you don't have to and use To4() to check the family for IP addresses. Fix all test cases a carried entries are always fqdn-ed. Various smaller cleanup in unnessacry constants. Fixes: #3014 Signed-off-by: Miek Gieben <miek@miek.nl>
2019-02-12plugin/hosts provide more configuration flexibility (#2535)Gravatar Thomas Mangin 1-1/+5
* plugin/hosts provide more configuration flexibility This patch adds few features to the host plugin * no-reverse (both as first argument on the plugin line and inline) disable the automatic generation of reserve entries for hosts * ttl <duration> (inline only atm) allows to change the default ttl (default 5 minutes) * reload <duration> (inline only atm) allows to change the reloading interval (default 5s) * plugin/hosts remove superfluous parameters to parse
2018-07-09Remove trailing whitespace (#1955)Gravatar Miek Gieben 1-1/+1
Prevent future; "remove trailing whitespace" PR, but adding a simple presubmit that checks for this. This presubmit flagged quite some offenders, remove all trailing whitespace from. Apart from that there aren't any other changes. Signed-off-by: Miek Gieben <miek@miek.nl>
2017-10-31add goroutine to check hosts file for updates (#1180)Gravatar Pat Moroney 1-3/+2
* add goroutine to check hosts file for updates * rename parseFile to parseReader, remove extra error check
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-0/+239
* Rename middleware to plugin first pass; mostly used 'sed', few spots where I manually changed text. This still builds a coredns binary. * fmt error * Rename AddMiddleware to AddPlugin * Readd AddMiddleware to remain backwards compat