summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ripd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* list example files in FILES with a short description: generally, "Examplejmc2020-05-161-4/+4
| | | | | | | configuration file.", but occasionally something else fit better; at the same time, try to make the format for FILES more consistent; original diff from clematis
* briefly mention /etc/examples/ in the FILES section of all theschwarze2020-02-101-3/+5
| | | | | manual pages that document the corresponding configuration files; OK jmc@, and general direction discussed with many
* Validate auth_offset before using it. If it's too big ripd will crash.remi2019-12-191-1/+9
| | | | | | | | | | | RFC 2082, chapter 3.1 sys about the offset: A 16 bit offset from the RIP-2 header to the MD5 digest (if no other trailer fields are ever defined, this value equals the RIP-2 Data Length). Problem reported by Hiltjo Posthuma. OK claudio@ deraadt@ benno@
* Clear r_list if the interface is passive. Additionaly move the checkremi2019-12-151-10/+14
| | | | | | | | | for passive interface a bit further up so that the function can return earlier. Memory leak observed and reported by Jason Tubnor. OK benno@
* Fix 2 memory leaks in error paths and a double-free (kroute_insert alreadyremi2019-12-112-4/+5
| | | | | | | frees kr if it detects a duplicate). From Hiltjo Posthuma OK benno@
* Do not count up nentries in send_response() when the entry was skippedremi2019-12-091-3/+3
| | | | | | | | because of split-horizon simple. This fixes empty response packages sent out by ripd. Adapt send_request() to follow the same layout. Input and OK claudio@
* fix error message.remi2019-12-091-2/+2
| | | | OK claudio@
* iface is not used afterwards. It should have been removed in rev. 1.8.remi2019-12-091-2/+1
| | | | OK claudio@
* added /* no filesystem visibility */ above unveil("/", "") since "" is too easymestre2019-08-081-1/+2
| | | | | | to misread. as per suggestion by and OK deraadt@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-12/+12
| | | | | | 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.
* fix typodenis2019-05-121-2/+2
| | | | OK claudio@ deraadt@
* Delete superfluous #includes of <ifaddrs.h>, <net/if_dl.h>, and <net/if_enc.h>guenther2019-05-101-2/+1
| | | | ok krw@, jsg@
* (unsigned) means (unsigned int) which on ptrdiff_t or size_t or otherderaadt2019-02-131-3/+3
| | | | | | larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
* Add config option fib-priority to set a custom prio for routes ripdremi2018-12-316-19/+40
| | | | | | insers into the kernel routing table. OK deraadt@
* accept "interface ifX" without parameters. Extend the man page to showremi2018-11-112-4/+8
| | | | | | an interface config example with and one without parameters. comment and OK claudio@
* the default for triggered-updates is no.remi2018-11-101-3/+3
| | | | OK claudio@
* Pledge ripe and rde.remi2018-11-045-15/+16
| | | | | | | | | | Use unveil to remove file system access for the parent proc. Also remove control_cleanup as discussed on tech@. It allows to fully remove fs access (ripd does not support reload). It's not an issue for ripd and ripctrl if an unused socket file is lying around. reads OK for claudio@ and mestre@
* - odd condition/test in PF lexersashan2018-11-011-2/+3
| | | | | | | | | | | | | | (and other lexers too) This commit rectifies earlier change: in the lex... even inside quotes, a \ followed by space or tab should expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). OK deraadt@, OK millert@
* replace malloc()+strlcpy() with strndup() in cmdline_symset().miko2018-09-071-9/+4
| | | | "looks good" gilles@ halex@
* Do for most running out of memory err() what was done for most runningkrw2018-07-111-3/+3
| | | | | | | | out of memory log_warn(). i.e. ("%s", __func__) instead of manual function names and redundant verbiage about which wrapper detected the out of memory condition. ok henning@
* No need to mention which memory allocation entry point failed (malloc,krw2018-07-091-4/+4
| | | | | | | | | calloc or strdup), we just need to log that we ran out of memory in a particular function. Recommended by florian@ and deraadt@ ok benno@ henning@ tb@
* Be consistent in warn() and log_warn() usage whenkrw2018-07-081-3/+3
| | | | | | | | running out of memory. Next step, be correct *and* consistent. ok dennis@ tb@ benno@ schwarze@
* remove the SECTIONS header, since a one line DESCRIPTION is a bit silly;jmc2018-06-181-4/+4
| | | | | | | use a more general text for the sections, and avoid the catchup issue that was trying to document how many there were; ok benno rob
* Plug leak in error case of the common 'varset' implementations.krw2018-04-261-1/+3
| | | | ok benno@
* Bump the read sockbuf of the routing socket to 2MB, may help reduce some ofclaudio2018-02-081-2/+2
| | | | the desync cases. OK benno@
* Unify ROUNDUP macros for parsing route messages.friehm2017-07-241-4/+4
| | | | | | Use the macro from route(8) / ospf6d(8) since it works also with argument 0. OK claudio@
* 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@
* Nuke some whitespace that keeps poking me in the eye as I try tokrw2017-01-171-2/+2
| | | | steal code.
* Keep track of dead peers instead of freeing them right away.jca2017-01-173-15/+28
| | | | | This mimics what ospfd does, and avoids a (mostly harmless) use-after-free. Delay suggested by claudio@, ok florian@
* Replace hand-rolled for(;;) traversal of ctl_conns TAILQ withkrw2017-01-081-7/+9
| | | | | | | | TAILQ_FOREACH(). No intentional functional change. ok reyk@
* Replace hand-rolled for(;;) emptying of 'symhead' TAILQ with morekrw2017-01-051-3/+2
| | | | | | | | modern TAILQ_FOREACH_SAFE(). No intentional functional change. ok millert@ bluhm@ gilles@
* Replace symset()'s hand-rolled for(;;) traversal of 'symhead' TAILQkrw2017-01-051-5/+7
| | | | | | | | | | | with more modern TAILQ_FOREACH(). This what symget() was already doing. Add paranoia '{}' around body of symget()'s TAILQ_FOREACH(). No intentional functional change. ok bluhm@ otto@
* Support p2p links where endpoints aren't in the same subnet.jca2016-12-231-10/+12
| | | | Diff from Piotr Durlej, similar diff from chris@, ok mpi@
* Document the -s option, descr adapted from ospfd/ospfctljca2016-10-131-2/+5
| | | | Noticed by Sebastien Leclerc, ok deraadt@
* Simplify shutdown process.renato2016-09-033-70/+42
| | | | | | | | | | | | | On shutdown, there's no need to use kill(2) to kill the child processes. Just closing the IPC sockets will make the children receive an EOF, break out from the event loop and then exit. Tha advantages of this "pipe teardown" are: * simpler code; * no need to pledge "proc" in the parent process; * removal of a (hard to trigger) PID reuse race condition. ok benno@ claudio@
* work on making log.c similar in all daemons:benno2016-09-028-108/+134
| | | | | | | move daemon-local functions into new logmsg.c, and reduce the (mostly whitespace) differences so that log.c's can be diffed easily. ok claudio@, feedback from henning@, deraadt@, reyk@
* Allow specifying an alternate socket path.jca2016-08-025-20/+28
| | | | | This allows one to run multiple ripd instances, for example to serve multiple rdomains. Diff from Nima GHOTBI, ok claudio@ florian@ benno@
* remove bogus attributes on fatal* spotted by guenther@benno2016-07-191-5/+3
|
* add format attributes to log functionsbenno2016-07-182-12/+20
| | | | ok florian@ claudio@
* do not allow whitespace in macro names, i.e. "this is" = "a variable".benno2016-06-211-1/+9
| | | | | | | | change this in all config parsers in our tree that support macros. problem reported by sven falempin. feedback from henning@, stsp@, deraadt@ ok florian@ mikeb@
* Remove setproctitle() for the parent process. Because rc.d(8) uses processsthen2016-02-021-4/+1
| | | | | | titles (including flags) to distinguish between daemons, this makes it possible to manage multiple copies of a daemon using the normal infrastructure by symlinking rc.d scripts to a new name. ok jung@ ajacoutot@, smtpd ok gilles@
* EAGAIN handling for imsg_read. OK henning@ benno@claudio2015-12-054-15/+16
|
* As done for bgpd recently, rename if_mediatype to if_type in ripd.stsp2015-09-273-10/+10
| | | | | And some ifmedia64 fixes. "move forward" deraadt@
* use file system path (.Pa) semantic markup macros where appropriate.sobrado2015-07-271-4/+4
| | | | ok jmc@
* Like bgpd and ospfd filter routes by RTF_LLINFO and RTF_BROADCAST and useclaudio2015-07-171-3/+14
| | | | the RTF_CONNECTED to know if a route is connected or not.
* Use sizeof(u_short) in the first check since there are RT messages thatclaudio2015-02-111-2/+2
| | | | | are less then sizeof(*rtm) bytes long (e.g. interface announcements). Found the hard way by phessler@
* Sync kroute code with what we do in ospfd/bgpd (EAGAIN handling).claudio2015-02-101-1/+6
|
* Add SOCK_CLOEXEC | SOCK_NONBLOCK to two more socket calls.claudio2015-02-092-4/+6
|
* More session_socket_blockmode() removal. While there make the main UDPclaudio2015-02-094-45/+16
| | | | socket non-blocking by default.
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-163-7/+6
| | | | | | | | | 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)