summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ospfd/lsupdate.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Do not use the pointer returned by ibuf_reserve() after calling anotherclaudio2020-05-061-5/+5
| | | | | | | | | | 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@
* Add point-to-point support for broadcast interfaces.remi2019-11-191-2/+2
| | | | | tested by Kapetanakis Giannis ok claudio@
* Improve logging when sending a packet fails.remi2019-07-151-5/+5
| | | | OK claudio@
* Fix typo, happend -> happenedjca2016-12-261-2/+2
|
* When comparing the LSA with the Ack, also check the age field. Thisbluhm2015-01-281-2/+9
| | | | | ensures that a LSA withdrawal is not acked by a previous update. From Florian Riehm; OK claudio@
* remove a stupid -Wstrict-prototype warning by making the hash functiontedu2015-01-221-2/+2
| | | | static. noticed by florian riehm
* simple to use siphash here. ok deraadttedu2014-12-181-6/+13
|
* for point-to-point interfaces we need to send lsupdates to themarkus2013-01-171-2/+4
| | | | | | interface address, since there is no DR and multicast messages to the DR will be ignored. see RFC 2328, 13.3(5) ok claudio@
* It was not possible to send out LS updates larger then the MTU.claudio2011-03-081-6/+26
| | | | | | | 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@
* Rename some imsg bits to make namespace collisions less likely buf tonicm2010-05-261-18/+18
| | | | | | ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE. ok henning gilles claudio jacekm deraadt
* sync ospfctl/ospfd with the common imsg code, making it lib ready as well.eric2009-06-061-3/+3
| | | | "looks ok" claudio@
* make ospfd's imsg lib ready as well.pyr2009-06-051-3/+3
| | | | ok claudio@
* When commiting the buf_left() change adding len to the check was dropped andclaudio2009-03-131-5/+5
| | | | so a warning later on could be hit in some cases. Found by dlg@ OK dlg@
* Implement buf_left() to make some some more buffer handling easier.claudio2009-01-311-6/+6
| | | | | | buf_left() returns the bytes left in a buffer. This makes the check to keep MD5_DIGEST_LENGTH bytes unallocated in some messages easier. From the buf cleanup diff that was OK norby@ and henning@
* Pass the buffer to send_packet() instead of spliting it up. This removesclaudio2009-01-311-2/+2
| | | | | some direct access to struct buf internals in the rest of ospfe. Based on a larger buffer cleanup diff that was OK norby@ henning@
* Correct the output of several error and debug messages.norby2008-02-111-2/+2
|
* remove unused variable, found by lint.norby2006-06-021-3/+3
|
* Remove useless debug message that gets triggered all the time in big networks.norby2006-05-291-4/+1
| | | | ok claudio@
* Kill unused function and add a ARGSUSED.claudio2006-04-251-7/+2
|
* The return value of the start/stop timer functions is almost never checked.claudio2006-03-131-5/+6
| | | | | | Switch them to void functions and check if evtimer_add/del fails -- in which case we fatal() as there is no useful way to recover in such an event. OK norby@
* Spaces and other minor cleanup.claudio2006-03-081-2/+2
|
* Rework the LSA cache and make it behave. Until now we only used the type,claudio2006-02-231-35/+31
| | | | | | | | | | id and adv router as hash and that resulted and weird behaviour. Because the age was not used in the compare it was almost impossible to MAXAGE some LSAs in busy networks. The result was a slowly growing retransmission queue and an ospf engine spending way to much time traversing these sometimes huge queues. Now we just hash the full lsa_hdr and so age is included. Additionally correctly age LSAs in the retransmission queues. ok ok ok ok ok ok and a lot of help (plus a busy OSPF network) norby@
* Correctly count the number of LSAs in the retransmission list. OK norby@claudio2006-02-211-1/+3
|
* Do not traverse the entire LS retransmission list to figure out how manynorby2006-02-191-5/+10
| | | | | | are present on it. ok claudio@
* ospfd does not need fd passing via the imsg framework so remove that codeclaudio2006-02-101-2/+2
| | | | and remove other unneeded functions that are only used in bgpd.
* Improve how ospfd copes with time changes.norby2006-01-051-2/+5
| | | | ok claudio@
* Instead of a simple timer per neighbor for the LS retransmition list useclaudio2005-12-291-54/+162
| | | | | | | a timewheel. All LSA updates are now first added to the queue and sent out later. This makes it possible to cluster multiple LSA updates into on OSPF packet. This gives a massive speedup when large databases need to be synced. Tested and OK norby@
* spacing mostlyderaadt2005-11-121-3/+1
|
* htons() instead of ntohs() when going from host to network.claudio2005-10-211-2/+2
|
* Revert part of rev 1.14. For now queue LSAs to all neighbors if the interfaceclaudio2005-10-211-8/+2
| | | | | | is in state BACKUP or DR -- even to the DR. This causes unneeded retransmission of LSAs but solves a problem with self originated ones. The BDR was no longer capable to reliably flood self originated LSA. Better solution will follow. Reported by stevesk@
* small cleanups while reading; ok claudio@stevesk2005-10-191-2/+2
|
* fix some spellings in comments.claudio2005-10-191-2/+2
|
* use string.h; ok claudio@stevesk2005-10-191-2/+2
|
* Fix a memory leak in the ospf engine. First of all ospfd did not track if aclaudio2005-10-131-3/+3
| | | | | | | | | LSA was already queued on nbr self. So after the first round -- where the lsa was queued -- ospfd would remove it again in a second run. That was not enough but the LSA was removed from the wrong neighbor -- nbr instead of iface->self. LIST_REMOVE does not track the queue and so that resulted in some strangeness (especially the lsa_cache did not get cleared). OK norby@
* Correctly queue ls updates on the retransmission lists.claudio2005-10-131-3/+12
| | | | | | First of all it is not clever to set queued before we actually queue something -- unless queued is set. If ospfd is running as BDR don't add updates to the retransmission list to the DR. OK norby@
* Correct function name in warning.claudio2005-10-121-2/+2
|
* typomsf2005-10-031-2/+2
| | | | ok claudio@
* Remove unneeded debugging stuff when handling LS updates.norby2005-05-261-7/+1
|
* Simplify and cleanup passive interface handling.norby2005-05-261-7/+1
| | | | ok claudio@
* Use the dynamic buffer API for packet generation and sending.claudio2005-04-051-20/+23
| | | | OK norby@
* The RFC never mentions anything about transfer, this should be transmit.norby2005-03-291-2/+2
| | | | | | From Jason Ackley (thanks). ok claudio@
* Remove bool cruft.norby2005-03-221-4/+4
| | | | ok claudio@
* Handle the retransmission queues correctly. Mainly iface state DROTHERclaudio2005-03-171-12/+68
| | | | | | | | needs to be handled specially because the backup DR does not send acks and so his retransmission queue fills up and does not get cleared. Also implement the retransmission timeout correctly. OK henning@ norby@ deraadt@
* mini KNFclaudio2005-02-091-2/+3
|
* If the router self is the originator of the LS update flood it outclaudio2005-02-091-2/+2
| | | | | no matter what. This solves an issue where self originated updates where not flooded because the router was the DR.
* KNFhenning2005-02-021-5/+5
|
* Change my email address to the OpenBSD one since Ericsson has nothing tonorby2005-01-281-2/+2
| | | | | do with this software, just happend to be my only valid email address at the time.
* Welcome ospfdclaudio2005-01-281-0/+447
started by Esben Norby some time ago by using the imsg/three process framework of bgpd. He implemented the basic concept plus the ospf finite state machines. Later I joined and helped him cleanup, debug and extend his work. Right now it is not particularly useful, major parts are still missing but is imported to allow more people to work on it. status: The basic protocol works for broadcast networks and the LS database is synchronized and updated. It is not possible to be DR or BDR on a network and other interface types like point-to-point are not yet supported. The shortest path tree is not calculated and so no routing information is exchanged with the kernel FIB. Not yet connected to the builds. OK henning@