summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/ospfd.c
AgeCommit message (Collapse)Author
2023-03-08Delete obsolete /* ARGSUSED */ lint comments.Philip Guenther
ok miod@ millert@
2021-09-06repair missing paths on unveil failureTheo de Raadt
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.
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-06-26Replace SIMPLEQ concatenation loop with SIMPLEQ_CONCATbket
OK florian@, millert@, kn@
2020-03-29Change space to tabdenis
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@
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-05-16Do not change router-id on reload if unspecified.denis
OK remi@
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-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-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-08-29Prevent ospfd from starting if another ospfd is already using the sameremi
socket. The check on the control socket happens early so that the rc scripts detect a failure. OK claudio@ florian@
2018-07-11Change the control socket to ospfd.sock.<rdomain>.remi
ok friehm@ jca@
2018-07-09Set log_setverbose(1) early to see debug logs during parsing the configremi
but only when -v is used. ok jca@ claudio@
2018-02-11Use the new route filter ROUTE_PRIOFILTER in ospfd. Usually we onlySebastian Benoit
need to see routes with a higher priority (lower value) than ospfds own routes. ok claudio, ok henning previous version, feedback from sthen
2018-02-09Style tweaksJeremie Courreges-Anglas
ok remi@ benno@
2018-02-05Introduce "depend on". This allows ospfd to set the metric dependentremi
on the status of another interface. in collaboration with benno@ jca@ OK benno@ jca@
2017-01-24sync log.c from relayd et al to ospfd.Sebastian Benoit
there is still a little difference regarding handling of the verbosity value that will be handled later. ok claudio@
2016-09-28'unneded stuff' -> 'unneeded stuff' in comments.Kenneth R Westerback
2016-09-04A few bits of stray leading/embedded/trailing whitespace spotted whileKenneth R Westerback
stealing code.
2016-09-03Simplify shutdown process.Renato Westphal
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@
2016-09-02work on making log.c similar in all daemons:Sebastian Benoit
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@
2016-02-02Remove setproctitle() for the parent process. Because rc.d(8) uses processStuart Henderson
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@
2015-12-05Pledge ospfd SE ("stdio inet mcast") and RDE ("stdio") move some codeClaudio Jeker
around to make it possible. Parent can't be pledged at the moment because of carp ioctl (carp demote). Putting it in so that people can test. OK benno@
2015-12-03imsg_read will return EAGAIN in some cases so prep code for it.Claudio Jeker
This is in the way for ospfd pledge so in it goes. OK benno@
2015-09-27As done for bgpd recently, rename if_mediatype to if_type in ospfd/ospf6d.Stefan Sperling
And some ifmedia64 fixes. "move forward" deraadt@
2015-07-20Fix a segfault at startup when if_change() ist called beforeSebastian Benoit
imsg_init() exposed by the second part of this diff which makes carp(4) interfaces be recognized to be in "backup" mode on start-up. Problem analyzed and fix provided by Johan Ymerson, thanks! ok claudio@, mpi@
2015-03-14When removing interfaces in the RDE we also need to remove all the RDEClaudio Jeker
neighbors that are part of that interface or we open us up to use after free situations like the one found by sthen@. Diff makes sense sthen@
2015-02-10Convert ospfd over to SOCK_CLOEXEC | SOCK_NONBLOCK and make the routeClaudio Jeker
socket non-blocking. Introduce the same trigger for partial rt msgs.
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2014-07-12Close connections when msgbuf_write() returns 0.Kenneth R Westerback
ok claudio@
2013-11-13from claudioSebastian Benoit
"Let msgbuf_write return -1 with errno EAGAIN. The users then must check if this was the case and readd the event or poll again. The current handling in the imsg code is wrong for sure." ok gilles, benno
2013-03-22whitespace tweak; gratuitous difference with ospf6dStuart Henderson
2011-08-20Decouple log_verbose() from log_init() so the verbose flag stays set withStuart Henderson
"ospfd -v" (previously only "-vd" worked). Feedback on earlier implementation from henning@ blambert@ claudio@, ok claudio@
2011-05-06Do not special case loopback interfaces on init. Instead force themClaudio Jeker
to IF_STA_LOOPBACK in if_act_start() this way they will repsect IFF_UP on startup. Also remove a now no longer needed workaround when reloading interfaces. Initial diff provided by Patrick Coleman. OK dlg@
2011-03-24Fix some memory leaks. Mainly better cleanup on shutdown but the v_nexthopClaudio Jeker
leak is a runtime one. OK bluhm@
2010-09-02remove trailing spaces and tabs from source code; no binary changesIgor Sobrado
(verified by both sthen@ and me). ok sthen@; "just commit it" claudio@
2010-05-14When merging interfaces after a config reload, the fsm state for interfacesStuart Henderson
is forced into IF_STA_NEW so that if_init() can be called to setup timers etc. When a loopback interface is added to the config, this means there's no way to get to the correct state. Fix by avoiding changing an existing IF_STA_LOOPBACK and forcing loopback interfaces to be passive (otherwise skipping the if_init on an active interface causes problems). ok claudio@
2010-02-19implement ospfctl fib reload.David Gwynne
this tells the daemon to resync the kernels list of interfaces and routes with the daemons list. this is very useful if the routing socket overflows and you want to sync things up again. lots and lots of help from claudio@ ok claudio@
2010-02-16Only merge interfaces that have the same address and netmask. Fixes a bugClaudio Jeker
with reloads when running ospfd on multiple aliases on the same interface. Is also needed to handle interface address changes in a much better way. OK dlg@, sthen@
2009-11-02Implement IMSG_CTL_LOG_VERBOSE to enable or disable debug logging on runtime.Claudio Jeker
It always annoyed me that in case of a problem I had to restart the ospf in forground debug mode and by doing so losing all routes at least twice. OK henning, sthen, michele
2009-06-06sync ospfctl/ospfd with the common imsg code, making it lib ready as well.Eric Faurot
"looks ok" claudio@
2009-06-05make ospfd's imsg lib ready as well.Pierre-Yves Ritschard
ok claudio@
2009-06-05Preliminary rdomain support, all hacked up by reyk@Claudio Jeker