summaryrefslogtreecommitdiff
path: root/usr.sbin/rad
AgeCommit message (Collapse)Author
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-05-13RFC 4861 4.1 allows router solicitations from the unspecified addressFlorian Obser
(::). A short survey suggests that some systems respond with a multicast router advertisement and other don't. Andrew Forgue pointed out a usecase for this, booting a UEFI system over http in an IPv6 network only. ("IPv6 support for UEFI IPv6 booting" on bugs@ a long time ago) There is also no downside in allowing this, any host on the layer 2 network can solicit a router advertisement. OK phessler
2021-03-02remove uneeded md5.h includeJonathan Gray
ok florian@
2021-03-01off by one in bounds testJonathan Gray
ok florian@
2021-02-27Path #defines are traditionally prefixed with _PATH.Florian Obser
Pointed out by deraadt
2021-02-23previous commit mismanaged the control fdTheo de Raadt
ok claudio
2021-01-19Get rid of inet_net_pton and inet_net_ntop.Florian Obser
This is not an api that seems to have caught on (especially the AF_INET6 variant), maybe we can get rid of it entirely. It is not difficult to hand-roll the AF_INET6 variant. OK tb
2021-01-19Make imsg event structs static to fix -fno-common.Florian Obser
Follows claudio's lead in ospfd et al. Problem reported by mortimer.
2021-01-19Move control_state and ctl_conns to control.c, it's not neededFlorian Obser
elsewhere and unbreaks -fno-common. Inspired by claudio Problem reported by mortimer
2021-01-19No need for a global rad_process; unbreaks -fno-common.Florian Obser
Problem reported by mortimer
2021-01-18Remove unused variable in an effort to make this -fno-common clean.Florian Obser
2020-12-29getifaddrs() can return entries where ifa_addr is NULL. Check for thisSebastian Benoit
before accessing anything in ifa_addr. florian@ mentioned this might be a problem in slaacd(8) and rad(8) after claudio@ fixed it in bgpd, so i went looking... ok claudio@
2020-12-01Remove useless void cast annotation.Florian Obser
2020-12-01Let rad(8) handle all rdomains in a single daemon, similar to previousFlorian Obser
work in slaacd. Suggested / requested by tb who showed me previous work by reyk which unfortunately predated my work in slaacd and followed a different pattern to that done in slaacd. Testing & OK tb
2020-11-27Check if the interface has an IPv6 link-local address before using it.Florian Obser
Problem noted by & OK tb
2020-06-26Replace SIMPLEQ concatenation loops with SIMPLEQ_CONCATbket
As a result *ra_rdnss and *ra_dnssl are not used any more, and can be removed. While here remove spurious space. OK florian@, millert@
2020-05-20Include interface name in warning when a RA is recieved from a non-link-localClaudio Jeker
address OK sthen@ florian@ benno@
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-03-30Use defines instead of raw numbers for intervals specified by RFCFlorian Obser
4861. No binary change. While here consistently use #define<tab> instead of #define<space>.
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-11-10Consistently use _rcctl enable foo_ in examples, it's simpler and lessLandry Breuil
error prone than manually editing rc.conf.local, and also works to enable ipsec and accounting. tweak from schwarze@ to use the \(dq\(dq syntax for quotes in '.Dl foo_flags="" lines' instead of \&"\&". while at it, fix a reference to a bogus /dev/dhclient.conf file that recently snuck in. ok jmc@ deraadt@ schwarze@
2019-10-18Plug mem leak in error path; ok florian@ who also spotted the rad caseOtto Moerbeek
2019-09-07Do not try to send router advertisements on interfaces that have no link.Florian Obser
Keeps log noise down on carp backup interfaces. Reported by matthieu Previous version OK deraadt Input & OK benno
2019-09-06this bit about soii and link-local addresses is no longer needed sinceSebastian Benoit
florian@ removed soii for link-local adresses in sys/netinet6/in6_ifattach.c rev 1.114 ok florian@ sthen@ kn@
2019-08-08Fix a bunch of typos in various man pages.Frederic Cambus
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-10Delete superfluous #includes of <ifaddrs.h>, <net/if_dl.h>, and <net/if_enc.h>Philip Guenther
ok krw@, jsg@
2019-04-12Unbreak listening for prefix changes.Florian Obser
Found the hard way by naddy OK deraadt, phessler
2019-03-31Avoid calling dup2(oldd, newd) when oldd == newd. In that case theYASUOKA Masahiko
descriptor keeps CLOEXEC flag then it will be closed unexpectedly by exec(). ok tedu florian
2019-03-15Only accept one ICMPv6 and one route socket.Florian Obser
This caught a missing break where the ICMPv6 socket was also used as the route socket for a short while. OK pamela
2019-03-15Correctly interlock config reloads imsgs.Florian Obser
Only accept a new config reload if it's not currently running and on accept a config reload end if one is currently running. OK pamela
2019-03-15Do not accept a control socket if we already have one.Florian Obser
OK pamela
2019-03-12fix line breakpamela
OK florian@
2019-03-12In the manner of recent changes to unwind(8) and slaacd(8), make imsgpamela
processing more paranoid. Call fatalx() for imsg size mismatches or unexpected/missing imsg fd. OK florian@
2019-03-11Change fatal() to fatalx() where errno is not set.pamela
tweak and OK florian@
2019-03-02Introduce the IMSG_DATA_SIZE() macro to replace recurring math on ↵pamela
imsg.hdr.len to shorten and simplify code. OK florian@
2019-03-01trailing whitespaceFlorian Obser
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
2019-01-29We don't need IMSG_SHUTDOWN, we can just close the sockets.Florian Obser
pointed out by deraadt
2019-01-22PF_ROUTE -> AF_ROUTE in the scattered sock()/setsockopt() callsKenneth R Westerback
where the "wrong" #define was used. ok dlg@
2019-01-02minor tweaks;Jason McIntyre
2018-11-28Discovered prefixes should not override explicitly configuredFlorian Obser
prefixes. That way one can have multiple prefixes configured on an interface and set "autonomous address-configuration no" in rad.conf to tell clients to not form addresses from some of these prefixes. Pointed out by Ross L Richardson (openbsd AT rlr.id.au), thanks! OK phessler
2018-11-21Allow rad(8) to watch interface groups; e.g. "interface tap" in rad.conf.Reyk Floeter
OK florian@, additional review from kn@
2018-11-16Don't fatal if IPV6_LEAVE_GROUP fails.Reyk Floeter
The underlying interface might have been destroyed or detached and rad(8) will just cope with that. OK florian@
2018-11-09Document interactions of rad(8), carp(4), and SOII:Stefan Sperling
When running rad(8) on top of carp(4), ifconfig carp0 -soii is a good idea. ok florian@ jmc@
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-16If a prefix without length was specifed in the config file, thenAlexander Bluhm
128 was used. This does not make much sense for rad(8). Change the default prefixlen to 64. OK florian@
2018-09-16With prefixlen 128, mask_prefix() in rad(8) caused a stack overflowAlexander Bluhm
in the config parser. Add an out of bounds check for the in6_addr. OK florian@
2018-09-07replace malloc()+strlcpy() with strndup() in cmdline_symset().miko
"looks good" gilles@ halex@