summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
AgeCommit message (Collapse)Author
2013-03-22whitespace tweak; gratuitous difference with ospf6dStuart Henderson
2013-03-22reinstate code to announce routes to backup carp interfaces. this was removedStuart Henderson
in a cleanup in r1.83, but we do still want to announce these (with a high metric), so that a specific route to the relevant network is maintained during failover. ok florian@ claudio@
2013-03-11handle ECONNABORTED errors from accept(). In many code blocks they can beTheo de Raadt
ignored silently and without aborting, much like EINTR and EWOULDBLOCK are. ok's from various maintainers of these directories...
2013-03-06sync yyerror() with version in bgpd so that it logs to syslog when daemonized.Stuart Henderson
ok florian@
2013-03-06When dumping config, just print "passive" for passive interfaces ratherStuart Henderson
than showing hello timers/keys. ok florian@
2013-01-17improve snapshot handling:Markus Friedl
- don't start a new snapshot if we are already in NBR_STA_SNAP - ignore IMSG_DB_SNAPSHOT and IMSG_DB_END unless we are in NBR_STA_SNAP - add new IMSG_LS_SNAP message so we can distinguish it from IMSG_LS_UPD. this way we can ignore them if we are not in NBR_STA_SNAP ok claudio@
2013-01-17do not send IMSG_LS_UPD if we have no links; ok claudioMarkus Friedl
2013-01-17ignore the nbr_adj_timer if we are not forming adjacencies; ok claudioMarkus Friedl
2013-01-17transmit correct state to RDE; ok claudioMarkus Friedl
2013-01-17allow two minutes until neighbor adjacencies are formed; ok claudio@Markus Friedl
2013-01-17for point-to-point interfaces we need to send lsupdates to theMarkus Friedl
interface address, since there is no DR and multicast messages to the DR will be ignored. see RFC 2328, 13.3(5) ok claudio@
2013-01-17the peer might still send more DD messages, even if the RDE hasMarkus Friedl
processed all received DDs (dd_pending == 0), so we need to check for state != NBR_STA_XCHNG; ok claudio@
2013-01-17the event NBR_EVT_SEQ_NUM_MIS is not defined in state NBR_STA_XSTRTMarkus Friedl
(would change back to NBR_STA_XSTRT anyway) ok claudio@
2012-09-26last stage of rfc changes, using consistent Rs/Re blocks, and moving theJason McIntyre
references into a STANDARDS section;
2012-09-18The if (!better && !equal) check is redundant as the same conditionAlexander Bluhm
is checked a few lines below again. Fewer checks make the code more readable. ok stsp@
2012-08-29bump reference to rfc 1583 to rfc 2328;Jason McIntyre
2012-05-14Don't display a nonsense uptime for an inactive interface. ldpd fix fromStuart Henderson
Rafael Zalamena on tech@, I also applied it to ospfd. ok phessler@
2012-04-24take a stab at documenting when arguments need quoted, and valid macroJason McIntyre
characters; prompted by a diff from robert peichaer org thanks gilles and henning for feedback ok deraadt zinke
2012-04-11delete excessive evtimer_pending; ok claudioTheo de Raadt
2012-04-10Handle file descriptor exhaustion in the accept() case.Theo de Raadt
ok claudio
2012-04-04Both LSA_TYPE_AREA_OPAQ and LSA_TYPE_AS_OPAQ can be found when traversingClaudio Jeker
the LSDB. So adjust SPF calculation to not trigger a fatal. Problem found and fix tested by Chris Wopat
2011-09-16Rather than reloading kernel routes immediately when an RTM_DESYNC is seen,Stuart Henderson
set (or extend) a timer and only reload when this expires. Avoids repeatedly dumping full kernel routes (thus generating more load) when the machine has problems keeping up with messages on the route socket. (if you see lots of repeated "reloading interface list and routing table" in ospfd logs, this will help). Suggestions/ok claudio@.
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-07-04LINK_STATE_IS_UP() cleanup userland part. There is no need to specialClaudio Jeker
case carp(4) interfaces anymore. LINK_STATE_IS_UP() almost always does the right job. OK deraadt@ henning@ This needs a -current kernel or link state may be not reported correctly.
2011-06-21Convert SO_RTABLE's protocol level to the SOL_SOCKET; ok claudioMike Belopuhov
2011-05-24Fix nexthop calculation for directly connected P2P links. connectedClaudio Jeker
may only be set on directly connected networks but not on router nodes which are used by the P2P links. Fix for PR 6597. OK sthen@
2011-05-09First bits to support opaque LSA. Type-9, 10 and 11 are LSA that canClaudio Jeker
hold about any data you like and is used for things like greaceful reload. Implement the basic redistribute logic and LSDB handling but the data sent is currently not looked at. Tested and OK sthen@
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-05-02More spring cleaningClaudio Jeker
2011-05-02Wrap some long lines and other cleanup. No functional change.Claudio Jeker
2011-05-02Some KNF, some other cleanup, fix some fatalx() messages.Claudio Jeker
No functional change
2011-04-30no need to escape |, pointed out by jmc@Stuart Henderson
"it's worth killing, if just to stop it being copied all over the place"
2011-03-25Rewrite the lsack generation. Make it more like the lsupdate code.Claudio Jeker
Removes some of the rather strange packet handling. Tested by a few especially sthen@
2011-03-24Fix some memory leaks. Mainly better cleanup on shutdown but the v_nexthopClaudio Jeker
leak is a runtime one. OK bluhm@
2011-03-08It was not possible to send out LS updates larger then the MTU.Claudio Jeker
Change the code in such a way that single huge LSA get fragmented but avoid IP fragmentation when packing multiple ones. Problem found and fix tested by Benjamin Papillon. Tested & OK sthen@
2011-03-08Instead of using IBUF_READ_SIZE as upper bound when building variousClaudio Jeker
packets use a better upper bound based on IP_MAXPACKET. Also change one IBUF_READ_SIZE to READ_BUF_SIZE since that is what the rest of the code uses. Tested and OK sthen@
2011-03-04Indent block correctly.Claudio Jeker
2011-02-02s/microseconds/milliseconds/, from Stijn on bugs@.Stuart Henderson
"whichever one is a thousandth of a second is the one i am ok with" dlg@
2011-01-18When fixing conflicts make sure the right vertex is passed to lsa_merge()Claudio Jeker
so that the correct sequence number is used for the LSA. So re-lookup the vertex before calling lsa_merge(). Problem found and diff OK bluhm@
2011-01-17Fix redistribution of overlapping routes (e.g 10/8 and 10.0/16).Claudio Jeker
Select a different LS ID in case of a conflict. The most specific route keeps the LS ID the others will try their broadcast addr first and then count down. The redistributed asext LSA are now stored in a RB tree to make this all work. Tested by a few people no problems seen so far.
2011-01-12Kill struct rroute and move the metric to struct kroute. ThisClaudio Jeker
disturbed me for a long time and makes upcomming work a bit easier. OK sthen@, phessler@
2010-12-13Do not use a carp address as ospf router id because it is not unique.Alexander Bluhm
ok claudio@
2010-10-14kr_redistribute() needs to be called with the head node of a multipathClaudio Jeker
chain. Fix kroute_insert() and rtmsg_process() to correctly do this. OK bluhm@
2010-10-01Reword a commentClaudio Jeker
2010-09-25When counting the lsa also build the sum of the ls_checksums. This can beClaudio Jeker
used to quickly verify if two LSDBs are in sync. Other systems do the same. OK dlg@
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-08-03fix linecount bug with comments spanning multiple linesHenning Brauer
problem reported with the obvious fix for bgpd by Sebastian Benoit <benoit-lists at fb12.de>, also PR 6432 applied to all the others by yours truly. ok theo isn't it amazing how far this parser (and more) spread?
2010-07-19When removing an announced prefix inherit the metric and ext_tag from theClaudio Jeker
LSA that is currently in the tree. Pruning with default metrics is bad since the checksum of the LSA is different and therefor an additional update cycle is needed to convince the other systems. OK bluhm@, sthen@
2010-07-19lsa_refresh() was able to resurect dead LSA resulting in zombie anouncements.Claudio Jeker
Make sure that if the LSA is managed by this router that we force timed-out LSA to stay timed out which causes them to be pruned in the secound round. This problem can show up when not exactly the same LSA is pruned because the checksum is used as tiebreaker resulting in indeterministic selection of which LSA is considered newer. OK bluhm@, sthen@
2010-07-14handle RTM_DESYNC. if the kernel says we're out of sync with the kernelDavid Gwynne
routing table and interface list, do a reload of the kernel state. ive been running this in production for 2 or 3 weeks. tested by sthen@ ok sthen@ claudio@ deraadt@ code written by andrew sallaway at the univeristy of queensland.