summaryrefslogtreecommitdiffstats
path: root/usr.sbin/route6d (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-22/+22
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* PF_ROUTE -> AF_ROUTE in the scattered sock()/setsockopt() callskrw2019-01-221-2/+2
| | | | | | where the "wrong" #define was used. ok dlg@
* Remove RTM_LOSING from the file, it is no longer used by OpenBSD andclaudio2018-07-111-4/+1
| | | | | route6d is not realy using it anyway. OK henning@
* more RTM_LOCK removalsderaadt2018-07-011-3/+1
|
* Retire support for unused RTM_LOCK messages, it's redundant w/ RTM_CHANGE.mpi2018-07-011-2/+1
| | | | ok tb@, sthen@
* fix mem leakflorian2018-06-141-1/+3
| | | | | from Thomas Barabosch (thomas.barabosch AT fkie fraunhofer de), thanks! OK tb
* Recycle IFF_NOTRAILERS into IFF_STATICARP and document ownerhsipmpi2018-01-161-7/+2
| | | | | | of IFF* flags. inputs from jmc@, ok bluhm@, visa@
* No need to handle more than one routing message here.jca2017-08-231-147/+145
|
* pass the size of the dst buffer to strlcat, not the source; pointedflorian2017-07-281-2/+2
| | | | | | out by clang OK kettenis
* From a syslog perspective it does not make sense to log fatal andbluhm2017-03-211-6/+6
| | | | | | warn with the same severity. Switch log_warn() to LOG_ERR and keep fatal() at LOG_CRIT. OK reyk@ florian@
* Add OpenBSD RCS id.bluhm2017-03-132-0/+4
|
* 6bone -> documentation rangejca2016-08-121-4/+4
|
* Add a -u switch to always log route insertions/deletions.jca2016-08-052-9/+26
| | | | | | | | Route updates (and associated warnings) are always prefixed with "RTADD" or "RTDEL". This is useful for people that previously used the -R option that got removed. Tested by Freddy Dissaux.
* Use tighter pledge(2) restrictions.jca2016-08-051-2/+2
| | | | Made possible by the logging overhaul. Tested by Freddy Dissaux.
* Rework logging.jca2016-08-055-339/+426
| | | | | | | | | | | | Use log.c like in many other daemons, with small additions to maintain a log queue (useful to dump a single log line with several logging statements). Use log.c to dump the internal state, and remove the -R option (a similar feature will be implemented differently soon). The end goal is to avoid touching the filesystem and use much tighter pledge(2) restrictions. Tested by Freddy Dissaux.
* Introduce RTF_MULTICAST and flag corresponding IPv6 routes as suchmpi2016-07-131-31/+2
| | | | | | instead of abusing RTF_CLONING. Fix a leak reporeted by Aaron Riekenberg on misc@, ok sthen@
* route6d spring cleanupjca2016-07-061-23/+7
| | | | | | | | | | | | | | Various tweaks and fixes: - nuke util.h, not needed since pidfile(3) went away - nuke the rrt_same member of struct riprt, "future use" since import - mark rtdexit as __dead - nuke progname handling - fix pid handling: cache the pid *after* calling daemon(3) - nuke setting rtm_pid. The kernel is responsible for setting this in routing messages. - nuke the useless myseq variable ok florian@ benno@ millert@ deraadt@ renato@
* No need to declare main().jca2016-01-251-2/+1
|
* malloc+memset -> callocjca2016-01-251-25/+17
|
* Remove NULL-check before free().mmcc2015-12-191-3/+2
|
* Sort includes.jca2015-11-301-21/+19
|
* Fix error message after conversion from select(2) to poll(2).jca2015-11-301-2/+2
|
* Partial revert of r1.79, "np" handling is a bit trickier than expected.jca2015-10-261-4/+3
|
* Rename the struct pollfd array, "set" -> "pfd"jca2015-10-261-10/+10
| | | | | "set" reminds of select(2) fd_set, and is never used elsewhere in the tree as a name for a pollfd array. No functional change.
* Those variables should be local to the functions where they are used.jca2015-10-261-12/+11
| | | | Gets rid of a lot of warnings with -Wshadow. No functional change.
* Kill unused variable and function.jca2015-10-261-16/+1
| | | | No functional change.
* hms() returns a pointer to static storage, annotate the return type with "const"jca2015-10-251-3/+3
| | | | No functional change.
* Correctly print size_t/time_t.jca2015-10-251-7/+7
| | | | No functional change.
* Plug memory leak introduced in r1.15.jca2015-10-251-11/+1
| | | | No functional change.
* Those two functions take no parameters, thus /* ARGSUSED */ is meaningless.jca2015-10-251-3/+1
| | | | No functional change.
* Sync surrounding code after reallocarray introduction.jca2015-10-251-3/+3
| | | | No functional change.
* Rename allocopy() to xstrdup(), and make use of strdup(3).jca2015-10-251-11/+9
| | | | No functional change.
* Kill unused ROUTE6D_CONF define.jca2015-10-251-5/+1
| | | | Since 1999 no one has found the need to write support for a config file.
* Another pidfile(3) removal; ok benno@jca2015-10-252-6/+2
|
* Tweak previous: call fatal(), not err(3), for consistency. err.h goes away.jca2015-10-181-3/+2
|
* route6d pledges to use only "stdio rpath wpath cpath inet route mcast"jca2015-10-171-1/+6
| | | | ok deraadt@
* Unbreak route6d.jca2015-10-161-4/+4
| | | | | | | | | | | Instead of breaking sendmsg(2) by adding unneeded space to its cmsg item, add space to the cmsg used by recvmsg(2), where it will be used to get the incoming packet hop limit. Reported by several over the last years, and more recently by 'bsdsx', who tested it against NetBSD route6d. Also works against Quagga ripng. ok deraadt@ sthen@
* RTF_XRESOLVE is gone.mpi2015-09-111-3/+2
|
* delete obsolete .Bk from the SYNOPSISschwarze2015-09-101-10/+8
| | | | and delete some useless .No while here
* stdlib.h is in scope; do not cast malloc/calloc/realloc*deraadt2015-08-201-14/+12
| | | | ok millert krw
* Fix potentional double free in do-while-loop.bluhm2015-02-041-3/+3
| | | | Found by Benjamin Baier with llvm/scan-build; OK florian@
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+1
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* obvious reallocarray(); ok dougderaadt2014-10-081-3/+2
|
* Remove commented out MSG_DONTROUTE flag. No object change.mpi2014-03-241-2/+2
| | | | ok florian@
* RTA_GENMASK is going to die soon so no need to handle it anymore.claudio2014-01-221-7/+3
| | | | OK benno@ and agreed by dlg@
* Asa Yeamans points out that we need to CMSG_SPACE[] for the 2nd messagederaadt2014-01-071-2/+3
| | | | | as well. ok guenther millert
* The header file netinet/in_var.h included netinet6/in6_var.h. Thisbluhm2013-10-171-2/+2
| | | | | | | created a bunch of useless dependencies. Remove this implicit inclusion and do an explicit #include <netinet6/in6_var.h> when it is needed. OK mpi@ henning@
* replace rand(3)/random(3) calls with secure arc4random*()naddy2013-08-261-5/+6
| | | | | npppd ok yasuoka@ ok millert@
* Correct format string mismatches turned up by -Wformat=2guenther2013-08-221-2/+2
| | | | suggestions and ok millert@
* create realloc() loops around sysctl for array-based mibs, in programsderaadt2013-03-211-14/+16
| | | | | which want a "full" dump ok dlg