summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
AgeCommit message (Collapse)Author
2023-12-13Use imsg_get_fd() to access the control fd.Claudio Jeker
OK tb@
2023-11-07iface->auth_key is not a real C string so use strnlen() to define the maximum.Claudio Jeker
This fixes the use of 8 char passwords with auth simple. Reported by Laurent CARON (lcaron at unix-scripts info) OK tb@
2023-07-03Use ibuf_data() instead of directly accessing ibuf->buf.Claudio Jeker
OK tb@
2023-06-21Remove extra newlinesClaudio Jeker
2023-06-20Update ospfd to use new ibuf api.Claudio Jeker
This mostly moves away from memcpy(ibuf_seek(buf, off, size), data, size) to ibuf_set(buf, off, data, size). Also ibuf_reserve() is replaced with ibuf_add_zero(). 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
2023-02-08usr.sbin: missing void to appease clang 15's -Wstrict-prototype.Theo Buehler
2022-12-28spelling fixes; from paul tagliamonteJason McIntyre
any parts of his diff not taken are noted on tech
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@
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
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-11-03log the interface along with the neighbour ID in various ospfd/ospf6dStuart Henderson
messages. ok remi@ benno@ if a neighbour is reachable over multiple network links, some problems may be related to the link itself rather than the neighbour, so knowing the interface can be important when trying to locate the source of a problem.
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-25r1.102 forgot to tweak the "redistribute rtlabel" part of the grammar.David Gwynne
fixes "redistribute rtlabel foo" without "depend on".
2021-01-19Allocate the recv buffer with malloc() on first call. This code assumesClaudio Jeker
some alignment of the buffer which may not be the case with bss memory.
2021-01-19Make the imsg event structures static, properly define ospfd_process andClaudio Jeker
rename nconf in the ospf engine to noeconf. This fixes the last common symbols in ospfd.
2021-01-19Internalize a few more things into the control code. Both control_stateClaudio Jeker
and ctl_conns are not really needed outside of control.c
2021-01-19Use a static pkt_ptr buffer instead of allocating it dynamically.Claudio Jeker
Removes another -fno-common issue from the build.
2021-01-19Use ospfe_imsg_compose_rde() instead of calling imsg_compose_event() withClaudio Jeker
a local export of iev_rde. Remove the extern in preperation of -fno-common cleanup.
2021-01-16Use struct ip_mreqn for the IP_MULTICAST_IF setsockopt. This wayClaudio Jeker
ospfd will pick the right interface to send out hello packets. Clear the struct ip_mreqn in all cases because not all fields are used. OK bluhm@ phessler@
2021-01-12Use the interface index of struct ip_mreqn in IP_ADD_MEMBERSHIP to sendClaudio Jeker
out packets. This way ospfd can work on interfaces that share the same IP. OK dlg@
2021-01-07Fix multiple shift/reduce conflicts in the parser because of the dependonClaudio Jeker
synatx element with its optional / empty element. While this is needed for redistribute statements it causes the conflicts in the interface sections since there the statement can not be empty (this conflicts with empty new lines handled in optnl). Add a dependonopt for redistribute statements and make depend on no longer optional. Also sync the curly bracket blocks (interface, area, ...) to be like set blocks and the blocks in bgpd. This should result in more flexible newline handling. Tested by sthen@, benno@, Kapetanakis Giannis OK benno@
2020-12-29getifaddrs() can return entries where ifa_addr is NULL. Check for thisSebastian Benoit
before accessing anything in ifa_addr. ok claudio@
2020-11-02print "depend on" information when available in "ospfctl sh int" output.David Gwynne
ok remi@
2020-11-02apply the "depend on" logic in the the default handling of rtr links.David Gwynne
this fixes the use of "depend on" in my situation, which is an Ethernet (broadcast) interface where I'm actually peering with multiple routers so i don't have "type p2p" set. with this the ospf peers now know how to route around my firewalls when their carp interfaces are in the backup state. discussed with claudio@ and jmatthew@ ok remi@
2020-10-05Remove redundant code and lets code looks similarjan
to the ospf6d counterpart. OK remi@
2020-09-16Stop removing the control socket on exit and tighten the unveil evenremi
further. This is in line with what other networking daemons do. ok mestre@
2020-08-20Use the ROUTE_FLAGFILTER setsockopt to filter out routing socket messagesJonathan Matthew
for L2 and broadcast routes, since we don't need them at all. ok kn@ remi@ dlg@
2020-06-26Replace SIMPLEQ concatenation loop with SIMPLEQ_CONCATbket
OK florian@, millert@, kn@
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-05-06Do not use the pointer returned by ibuf_reserve() after calling anotherClaudio Jeker
ibuf function. After the call the internal buffer may have moved by realloc() and so the pointer is invalid. Instead use ibuf_size() to get the current offset in the buffer and use ibuf_seek() later on to write back the updated lsa age into the buffer at the right spot. This fixes an issue seen by Richard Chivers on routers with many passive interfaces. OK stsp@ deraadt@
2020-04-23replace examples of "Ic arg Ic arg" with "Ic arg arg" and stop the spread;Jason McIntyre
2020-03-29Change space to tabdenis
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
2020-01-21Allow the interface setting "type p2p" to be configured globallz or perremi
area. Most of the other interface settings allow this. ok denis@
2020-01-08Area-wide interface parameters need to be defined before the interfacesremi
or they will have no effect. OK denis@
2019-11-23These dependon related lines fit better a bit further up.remi
No functional change. Suggested and OK claudio@
2019-11-19Add point-to-point support for broadcast interfaces.remi
tested by Kapetanakis Giannis ok claudio@
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-11-09Fix function name in error message.denis
input & OK claudio@
2019-08-12On broadcast and point-to-point interfaces only accept hello packets whenremi
the destination is 224.0.0.5 (AllSPFRouters). RFC 2328 sys in "9.5. Sending Hello packets" that hello packets are sent to the multicast address AllSPFRouters on broadcast and physical point-to-point networks. With this new check the test for AllDRouters is not needed anymore. ok benno@
2019-08-12Warn when a neighbor changes its source IP address. Either it is becauseremi
of a planned change or something bad is happening in the network. ok benno@
2019-07-15Improve logging when sending a packet fails.remi
OK claudio@
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-06-10less macro;Jason McIntyre
2019-06-10document that area can take a number as well as an idDavid Gwynne
reminded by and ok remi@
2019-06-07Allow specifying area by number as well as id. No change to outputs.David Gwynne
ok remi@ (who did the same change to ospfctl, ospf6d, and ospf6ctl) ok denis@ some grumbling from sthen@ and bluhm@ who didn't want output changed.
2019-05-16Do not change router-id on reload if unspecified.denis
OK remi@