summaryrefslogtreecommitdiff
path: root/usr.sbin/ripd
AgeCommit message (Collapse)Author
2023-07-03Use ibuf_data() and ibuf_size() instead of accessing struct ibuf.Claudio Jeker
OK tb@
2023-06-22Use new ibu API, switch from ibuf_seek() to ibuf_set().Claudio Jeker
Also use ibuf_data() and ibuf_size(). OK tb@
2023-03-08Delete obsolete /* ARGSUSED */ lint comments.Philip Guenther
ok miod@ millert@
2023-03-02improve the Nd lines such that the format is consistent for theJason McIntyre
various *d, *conf, *ctl files (where relevant) and simple; also makes "man -k routing" more useful; help from claudio and florian ok claudio florian millert
2022-05-06Relax the limitation of what is an acceptable unicast IP.Claudio Jeker
Remove the IN_BADCLASS() check which filters out the experimental IPv4 address space. Now there are no more experiments in IPv4 and so there is less reason for these network daemons to deny such an IP. Everything still disallows multicast IPs (224/4) and loopback (127/8) a few also disallow 0/8 but this is not consistent. In any case using 240/4 in production is a really bad idea but it is not up to this software to prevent you from being a fool. OK deraadt@ tb@
2021-12-13including sys/cdefs.h manually started as a result of netbsd trying toTheo de Raadt
macro-build a replacement for sccsid, and was done without any concern for namespace damage. Unfortunately this practice started infecting other code as others were unaware they didn't need the file. ok millert guenther
2021-10-15Don't declare variables as "unsigned char *" that are passed toChristian Weisgerber
functions that take "char *" arguments. Where such chars are assigned to int or passed to ctype functions, explicitly cast them to unsigned char. For OpenBSD's clang, -Wpointer-sign has been disabled by default, but when the parse.y code was built elsewhere, the compiler would complain. With help from millert@ ok benno@ deraadt@
2021-09-06repair missing paths on unveil failureTheo de Raadt
2021-01-19Like ospfd allocate the recv buffer with malloc() on first call.Claudio Jeker
This code assumes some alignment of the buffer which may not be the case with bss memory.
2021-01-19Forgot one IBUF_READ_SIZE to READ_BUF_SIZE change.Claudio Jeker
2021-01-19Do not use IBUF_READ_SIZE for the packet read buffer size. InsteadClaudio Jeker
define READ_BUF_SIZE like the other daemons.
2021-01-19Make the struct imsgev structs static and with that ripd -fno-common clean.Claudio Jeker
2021-01-19Remove the PROC_* enums and ripd_process, they are no longer needed.Claudio Jeker
Instead assign the process name directly to log_procname which was the last user of ripd_process.
2021-01-19Like in all other log.c file just use exit(1) in fatal() calls.Claudio Jeker
This log.c should be further synced with the other log.c files.
2021-01-19Move the interface demote out of if_del and into the only place whereClaudio Jeker
it is needed (the if_del call in ripe.c). With this the ripd_process check in ripe_demote_iface() can be removed.
2021-01-19Like in ospfd make the pkt_ptr a local static buffer.Claudio Jeker
2021-01-19Apply same cleanup to the control code as in ospfd.Claudio Jeker
Internalize control_state and ctl_conns.
2020-05-16list example files in FILES with a short description: generally, "ExampleJason McIntyre
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
2020-02-10briefly mention /etc/examples/ in the FILES section of all theIngo Schwarze
manual pages that document the corresponding configuration files; OK jmc@, and general direction discussed with many
2019-12-19Validate auth_offset before using it. If it's too big ripd will crash.remi
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@
2019-12-15Clear r_list if the interface is passive. Additionaly move the checkremi
for passive interface a bit further up so that the function can return earlier. Memory leak observed and reported by Jason Tubnor. OK benno@
2019-12-11Fix 2 memory leaks in error paths and a double-free (kroute_insert alreadyremi
frees kr if it detects a duplicate). From Hiltjo Posthuma OK benno@
2019-12-09Do not count up nentries in send_response() when the entry was skippedremi
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@
2019-12-09fix error message.remi
OK claudio@
2019-12-09iface is not used afterwards. It should have been removed in rev. 1.8.remi
OK claudio@
2019-08-08added /* no filesystem visibility */ above unveil("/", "") since "" is too easyRicardo Mestre
to misread. as per suggestion by and OK deraadt@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
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.
2019-05-12fix typodenis
OK claudio@ deraadt@
2019-05-10Delete superfluous #includes of <ifaddrs.h>, <net/if_dl.h>, and <net/if_enc.h>Philip Guenther
ok krw@, jsg@
2019-02-13(unsigned) means (unsigned int) which on ptrdiff_t or size_t or otherTheo de Raadt
larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
2018-12-31Add config option fib-priority to set a custom prio for routes ripdremi
insers into the kernel routing table. OK deraadt@
2018-11-11accept "interface ifX" without parameters. Extend the man page to showremi
an interface config example with and one without parameters. comment and OK claudio@
2018-11-10the default for triggered-updates is no.remi
OK claudio@
2018-11-04Pledge ripe and rde.remi
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@
2018-11-01- odd condition/test in PF lexerAlexandr Nedvedicky
(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@
2018-09-07replace malloc()+strlcpy() with strndup() in cmdline_symset().miko
"looks good" gilles@ halex@
2018-07-11Do for most running out of memory err() what was done for most runningKenneth R Westerback
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@
2018-07-09No need to mention which memory allocation entry point failed (malloc,Kenneth R Westerback
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@
2018-07-08Be consistent in warn() and log_warn() usage whenKenneth R Westerback
running out of memory. Next step, be correct *and* consistent. ok dennis@ tb@ benno@ schwarze@
2018-06-18remove the SECTIONS header, since a one line DESCRIPTION is a bit silly;Jason McIntyre
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
2018-04-26Plug leak in error case of the common 'varset' implementations.Kenneth R Westerback
ok benno@
2018-02-08Bump the read sockbuf of the routing socket to 2MB, may help reduce some ofClaudio Jeker
the desync cases. OK benno@
2017-07-24Unify ROUNDUP macros for parsing route messages.friehm
Use the macro from route(8) / ospf6d(8) since it works also with argument 0. OK claudio@
2017-03-21From a syslog perspective it does not make sense to log fatal andAlexander Bluhm
warn with the same severity. Switch log_warn() to LOG_ERR and keep fatal() at LOG_CRIT. OK reyk@ florian@
2017-01-17Nuke some whitespace that keeps poking me in the eye as I try toKenneth R Westerback
steal code.
2017-01-17Keep track of dead peers instead of freeing them right away.Jeremie Courreges-Anglas
This mimics what ospfd does, and avoids a (mostly harmless) use-after-free. Delay suggested by claudio@, ok florian@
2017-01-08Replace hand-rolled for(;;) traversal of ctl_conns TAILQ withKenneth R Westerback
TAILQ_FOREACH(). No intentional functional change. ok reyk@
2017-01-05Replace hand-rolled for(;;) emptying of 'symhead' TAILQ with moreKenneth R Westerback
modern TAILQ_FOREACH_SAFE(). No intentional functional change. ok millert@ bluhm@ gilles@
2017-01-05Replace symset()'s hand-rolled for(;;) traversal of 'symhead' TAILQKenneth R Westerback
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@
2016-12-23Support p2p links where endpoints aren't in the same subnet.Jeremie Courreges-Anglas
Diff from Piotr Durlej, similar diff from chris@, ok mpi@