summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
AgeCommit message (Collapse)Author
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@
2019-04-29Check that depend on interfaces are in the same rdomain. If they are notremi
the daemon wouldn't notice state changes for those interfaces. ok benno@
2019-04-23whitespace fixremi
2019-04-23Use the network address instead of the interface address for the "link id"remi
of P2P interfaces "stub net" LS. This is related to revision 1.77 of rde_spf.c. Problem reported by Mitchll Krome on tech@. ok benno@
2019-04-23For originating router LSAs for P2P interfaces check for linkstateremi
instead of IF_STA_POINTTOPOINT. This makes "passive" work on P2P interfaces. Also add the "depend on" logic. Bug reported by stsp@ ok stsp@ benno@
2019-04-04RFC 2328 mandates in 12.4.1.1 that the Link ID of the Type 3 link has toremi
be set to the subnet's IP address and not the interface address. Bug report and fix from Mitchell Krome. OK claudio@
2019-03-26The recently introduced "router-id changed" warning is a bit long.remi
Shorten it to better match the style of other log messages. ok jca@
2019-03-25Abort reload if router-id changedJeremie Courreges-Anglas
Additional code would be needed to support actually changing the router-id at runtime; for now be consistent and reject the new configuration to avoid users a "wtf" moment. From Mitchell Krome, input from benno@ and deraadt@, ok benno@
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-15For external LSAs the type (1 or 2) is encoded in the metric field. Do notremi
overwrite this when using "redistribute X set type 2 depend on ifX" and ifX is down. Problem reported for ospfd by Igor Podlesny. ok benno@
2019-01-14Improve error message when daemon is already running.Florian Obser
OK millert, deraadt, job
2019-01-02Send a router LSA update when an interface was removed.remi
OK claudio@
2018-12-28Add config option fib-priority to set a custom prio for routes ospfdremi
inserts into the kernel routing table. OK claudio@
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-10-29The parent process of ospfd is not supposed to write or execute files.remi
Unveil "/" readonly and allow to cleanup the control socket on exit. Just unveiling ospfd.conf is not possible since it can contain an arbitrary number of includes. ok benno@
2018-09-27whitepspace fixSebastian Benoit