summaryrefslogtreecommitdiff
path: root/usr.sbin/rebound
AgeCommit message (Collapse)Author
2019-04-01if inet6 is not available, warn, but carry onTed Unangst
2018-12-27fifo isn't really the right data structure for varying expirations.Ted Unangst
convert to a simple rbtree ordered by expiration time. ok anton
2018-12-20zap whitespaceanton
2018-12-18Rework previous: use getopt(3) to parse options passed to the worker process.anton
ok tedu@
2018-12-18Rework how socket fds are passed around internally. This will allowTed Unangst
more flexibility in listening sockets (and fixes a bug related to inet6). Everything is in arrays now instead of discrete variables. ok anton
2018-12-06log more info about errorsTed Unangst
2018-12-06add very experimental support for dns over https. (RFC 8484)Ted Unangst
performance may be less than great. ok anton
2018-11-20move a magic constant into a magic defineTed Unangst
2018-10-26Unveil should work because this only opens the configuration file,Theo de Raadt
and re-exec's itself. That locks the pledge 'exec' nicely.
2018-09-10logmsg(LOG_ERR) -> logerr(); ok tedu@anton
2018-09-08Check for malloc() failures.anton
Initial diff from Clemens Goessnitzer on tech@ Feedback and ok tb@
2018-05-08some barebones documentation for the record option.Ted Unangst
if somebody adds AAAA support, we can explaina a little more. :)
2018-05-01Remove extraneous new line from error message.anton
2018-05-01The length field of a DNS packet must be network byte order encoded; ok tedu@anton
2018-04-30allow limited setting of permanent A records. like unbound local-data.Ted Unangst
some code and help from anton
2018-02-11sysctl.h is no longer neededTheo Buehler
ok tedu
2018-02-10Pledge monitoring process; ok tedu@anton
2018-02-07Markup SIGHUP.anton
2018-02-07clarify a bit about configTed Unangst
2018-02-07remove the magic dns port hijacking feature. it's complicated andTed Unangst
brittle, and never quite made the next step to being useful.
2018-02-06when we get SIGHUP, close conffd so it's reopened (and rewound).Ted Unangst
problem and early fix by anton
2018-01-12Adjust references for sysctl(3) to sysctl(2)Theo de Raadt
2017-08-22Use waitpid()/EINTR idiom for the specific pid, rather than generic wait(),Theo de Raadt
in case the parent process was started with a dangling child. This style ensures any potential parent:child interlock isn't disrupted due to the "wrong" child being waited on first. Then the other other childs can safely zombie. ok millert jca brynet
2017-08-12stop pretending that qnames are always strings. treat everything as aTed Unangst
dname always.
2017-07-20- listening on localhost is now adjustable; ok teduJason McIntyre
- document SIGUSR1, as noted by tedu
2017-07-19there's no nul byte after a name that ends in a crazy compression pointer.Ted Unangst
2017-07-13add an option to listen to an address other than localhost,Ted Unangst
upgrading to a mini recursive resolver for small networks.
2017-07-04properly adjust the ttl of replies instead of freezing them in timeTed Unangst
2017-07-03don't bother caching invalid or very short lived responsesTed Unangst
2017-07-03check that a cachehit hasn't expired before using it.Ted Unangst
2017-05-31use strerror; from Edgar PettijohnTheo de Raadt
2017-04-27clang warns about some of the strlcpy arguments here, which aren't theTed Unangst
typical idiom because there's invisible size dependencies. rewrite some of it to use memcpy, which makes clear the lengths are the same.
2017-04-13moving some code into a switch meant that break no longer stopped the loop.Ted Unangst
try harder with a goto. diagnosis and original fix by tb.
2017-04-06replace some long if/else chains with a switchTed Unangst
2016-10-23unbreak by fixing obvious pastosChristian Weisgerber
2016-10-23listen on inet6 sockets as well. we need this because stolen inet6 socketsTed Unangst
can't be redirected to inet4 listeners.
2016-10-16switch to a re-exec model instead of plain forking to reduce sharing.Ted Unangst
this shuffles about some of the initialization code and consolidates all the worker initialization in one place. the parent process runs the monitor loop and execs workers via -W, which then drop immediately into the worker loop. file descriptors currently inherited across exec, which probably exceeds safe magic levels, but fits the existing model without too many changes.
2016-10-15refactor the worker and monitor loops a little to make room for re-execTed Unangst
2016-10-15be more cautious about inspecting packets. use integer offsets instead ofTed Unangst
advancing pointers which may go past the end.
2016-10-15implement random casing for query names, also known as 0x20 hardening.Ted Unangst
this *should* work everywhere, and i consider minimum necessary protection for a program like rebound. in the event it doesn't work, rebound can be bypassed by disabling the port stealing sysctl.
2016-10-08a little more precision about reloading config. only reopen if it changedTed Unangst
2016-10-08too many blank linesTed Unangst
2016-10-07kern.dnsjacking -> kern.dnsjackport;Jason McIntyre
2016-10-07the parent mostly never crashes, but the child might. or the config fileTed Unangst
disappears. in such cases, the parent will exit. make sure to always reset the jackport, not just when receiving sigterm. (doesn't protect against parent crashing, but that shouldn't happen.)
2016-10-07several big changes, tied together.Ted Unangst
switch to reading resolv.conf to find upstream name servers. moitor this file and automatically restart if it changes. use the dnsjackport sysctl to steal DNS connections from libc. listen on port 54 to avoid collisions with other DNS servers.
2016-09-01naming a union 'sockthing' was a bit silly. sockun will do for now.Ted Unangst
2016-09-01print regular messages to stdout, not errTed Unangst
2016-09-01scan responses for minimum ttl, and cache for min(ttl, 300) instead ofTed Unangst
a fixed amount
2016-08-21introduce a union of sockaddr types and eliminate a lot of casts.Ted Unangst
2016-08-06reset timeout to null when reloopingTed Unangst