summaryrefslogtreecommitdiff
path: root/proto/ospf
AgeCommit message (Collapse)Author
2020-11-24Some minor sl_allocz() cleanupsOndrej Zajicek (work)
2020-11-18OSPFv3: Fix intra-area-prefix-LSA origination on DROndrej Zajicek (work)
When a new link-LSA is originated, we need to notify intra-area-prefix-LSA handling, like when a new link-LSA is received. Otherwise a new network prefix added to a DR is not propagated immediately. Thanks to Bala Sajja for the bugreport.
2020-11-08BFD: Allow per-request session optionsOndrej Zajicek (work)
BFD session options are configured per interface in BFD protocol. This patch allows to specify them also per-request in protocols requesting sessions (currently limited to BGP).
2020-08-31OSPF: Fixed a debug assertMaria Matejka
2020-08-12OSPF: Skip out-of-state packets earlierOndrej Zajicek (work)
Sometimes multicast OSPF packet is received when neighbor adjacency is not established. Such packet should be ignored earlier in packet processing as otherwise it causes strange error messages when OSPFv3 authentication is enabled.
2020-06-28Show info from multiple protocols when protocol is not specifiedOndrej Zajicek (work)
Most commands like 'show ospf neighbors' fail when protocol is not specified and there are multiple instances of given protocol type. This is annoying in BIRD 2, as many protocols have IPv4 and IPv6 instances. The patch changes that by showing output from all protocol instances of appropriate type. Note that the patch also removes terminating cli_msg() call from these commands and moves it to the common iterating code.
2020-06-10OSPF: Fix bad header length testOndrej Zajicek (work)
Thanks to Slava Aseev for the thorough bugreport.
2020-06-02OSPF: setting list node to zero before enlistingMaria Matejka
2020-05-26OSPF: Fix handling of unnumbered PtPsOndrej Zajicek (work)
This issue has a long history. In 2012, we changed data field for unnumbered PtP links from iface id (specified by RFC) to IP address based on reports of bugs in Quagga that required it, and we used out-of-band information to distinquish unnumberred PtPs with the same local IP address. Then with OSPF graceful restart implementation, we found that we can no longer use out-of-band information, and we need to use only LSAdb info for routing table calculation, but i forgot to finish handling of this case, so multiple unnumbered PtPs with the same local IP addresses were broken. Considering that even recent Mikrotik RouterOS has broken next hop calculation that depends on IP address in PtP link data field, we cannot just switch back to the iface id for unnumbered PtP links. The patch makes two changes: First, it goes back to use out-of-band (position) info for distinguishing local interfaces in SPF when graceful restart is not enabled, while still uses LSAdb-only approach for SPF calculation when graceful restart is enabled. Second, it adds OSPF interface option 'ptp address', which controls whether IP address or iface id is used in data field. It is enabled by default except for unnumbered PtP links with enabled graceful restart. Thanks to Kenth Eriksson for the bugreport and Joakim Tjernlund for suggestions.
2020-05-01Nest: Added const to ea_show just to declare that this shouldn't really ↵Maria Matejka
change anything
2020-05-01OSPF: Zero-initialization of a temporary neighborMaria Matejka
2020-05-01OSPF: Adding a note about a static analyzer result.Maria Matejka
2020-05-01OSPF: variable-length array of size 0 replaced by alloca()'d pointerMaria Matejka
NULL pointer is safer than a random pointer onto stack if this function gets changed and eventually broken.
2020-04-09Configuration strings are constant.Maria Matejka
This is merely a const propagation. There was no problem in there.
2020-01-09OSPF: Fix bad initialization of tx_hdrlen fieldOndrej Zajicek (work)
Function ifa_tx_hdrlen() uses fields autype and passwords, so it must be called after these are set. Thanks to Kenth Eriksson for the bugreport.
2019-08-29OSPF: Fix 'show ospf lsadb' cmd without proto argOndrej Zajicek (work)
It crashed when used without protocol argument. Thanks to Alexander for the bugreport.
2019-07-24Merge remote-tracking branch 'origin/mq-filter-stack'Ondrej Zajicek (work)
2019-07-23OSPF: Fix formatting of 'show ospf neighbors'Ondrej Zajicek (work)
The formatting was broken when too short router-id was used.
2019-07-17BFD: Support for VRFsOndrej Zajicek (work)
Allow multiple BFD instances in separate VRFs, dispatch BFD requests according to VRFs. Thanks to Alexander Zubkov for notice and patches.
2019-07-15Merge remote-tracking branch 'origin/master' into mq-filter-stackMaria Matejka
2019-07-10OSPF: Fix handling of NSSA option flagsOndrej Zajicek (work)
Per RFC 3101, N-bit signalling NSSA support should be used only in Hello packets, not in DBDES packets. BIRD since 2.0.4 verifies N-bit in neighbor structure, which is learned from DBDES packets, therefore NSSA-LSAs are not propagated to proper implementations of RFC 3101. This patch fixes that. Both removing the check and removing N-bit from DBDES packet. This will fix compatibility issues with proper implementations, but causes compatibility issues with BIRD 2.0.4.
2019-07-10Merge branch 'master' into mq-filter-stackMaria Matejka
2019-07-09OSPF: Minor fix in graceful restartOndrej Zajicek (work)
Most LSA origination is blocked in ospf_update_topology(), this fix blocks LSA origination from ospf_rt_spf().
2019-07-09OSPF: Update DR when local priority changesOndrej Zajicek (work)
When priority is reconfigured locally, we need to trigger DR election. (recommiting, was reset by the previous commit)
2019-07-09OSPF: Fix handling of external routes on graceful restartOndrej Zajicek (work)
We need to flush learned external LSAs a bit later than other LSAs (after first feed after end of the graceful restart) to avoid flap of external routes.
2019-07-04OSPF: Update DR when local priority changesOndrej Zajicek (work)
When priority is reconfigured locally, we need to trigger DR election.
2019-07-03Merge branch 'master' into mq-filter-stackMaria Matejka
2019-07-03Dynamic attributes definition split whether it is bitmask or not.Maria Matejka
2019-06-30OSPF: Support for graceful restartOndrej Zajicek (work)
Implement OSPFv2 (RFC 3623) and OSPFv3 (RFC 5187) graceful restart, for both restarting and helper sides. Graceful restart is initiated by 'graceful down' command.
2019-05-17Lexer now returns known sym / unknown sym / keywordMaria Matejka
2019-04-12OSPFv3: Fix some overlooked cases in IPv4 modeOndrej Zajicek (work)
Prefixes with max length (/32) were not handled properly. Thanks to bauen1 for the bugreport.
2019-03-18Merge branch 'master' into HEADMaria Matejka
2019-03-14Nest: Update handling of temporary attributesOndrej Zajicek (work)
The temporary atttributes are no longer removed by ea_do_prune(), but they are undefined by store_tmp_attrs() protocol hooks. This fixes several bugs where temporary attributes were removed when they should not or not removed when they should be. The flag EAF_TEMP is no longer needed and was removed. Update all protocol make_tmp_attrs() / store_tmp_attrs() hooks to use helper functions and to handle unset attributes properly. Also fix some related bugs like improper handling of empty eattr list.
2019-03-06OSPF: Improved handling of tmpattrsOndrej Zajicek (work)
Keep track of whether OSPF tmpattrs are actually defined for given route (using flags in rte->pflags). That makes them behave more like real eattrs so a protocol can define just a subset of them or they can be undefined by filters. Do not set ospf_metric2 for other than type 2 external OSPF routes and do not set ospf_tag for non-external OSPF routes. That also fixes a bug where internal/inter-area route propagated from one OSPF instance to another is initiated with infinity ospf_metric2. Thanks to Yaroslav Dronskii for the bugreport.
2019-02-20Filter + Config: Fix bugs, tests and split symbols by typeMaria Matejka
2019-02-20Filter refactoring: dropped the recursion from the interpreterMaria Matejka
This is a major change of how the filters are interpreted. If everything works how it should, it should not affect you unless you are hacking the filters themselves. Anyway, this change should make a huge improvement in the filter performance as previous benchmarks showed that our major problem lies in the recursion itself. There are also some changes in nest and protocols, related mostly to spreading const declarations throughout the whole BIRD and also to refactored dynamic attribute definitions. The need of these came up during the whole work and it is too difficult to split out these not-so-related changes.
2019-02-17OSPF: Reset LSAs during area type changeOndrej Zajicek (work)
When area is reconfigured to a different type, we need to flush LSAs as they may not be valid (e.g. NSSA-LSA for non-NSSA area). Also, when we have have just one OSPF area and that changes type, we could restart OSPF as there is no state to keep anyway. That solves issue with different handling of external routes exported to OSPF based of main area type.
2019-02-13OSPF: Basic support for DN-bit handling (RFC 4576)Ondrej Zajicek (work)
External LSAs originated by OSPF routers with VPN-PE behavior enabled are marked by DN flag and they are ignored by other OSPF routers with VPN-PE enabled.
2019-02-09OSPF: Do not originate Router-Information LSAOndrej Zajicek (work)
As we do not have much usage for it yet.
2019-02-03OSPF: Send direct acknowledgements as unicastOndrej Zajicek (work)
Direct acknowledgements should be send as unicast to a corresponding neighbor. Only delayed acks should be send as multicast to all/designated routers.
2019-02-03OSPF: Reject duplicate DBDES packets after dead intervalOndrej Zajicek (work)
Master may free last DBDES packet immediately. Slave must wait dead interval before freeing last DBDES packet and then reject duplicate DBDES packets with SeqNumberMismatch.
2019-02-03OSPF: DD seqnum should be initialized only for first attemptsOndrej Zajicek (work)
After SeqNumberMismatch/BadLSReq, we should continue with the old seqnum++. The old code tries to do that by n->adj, but it was set nowhere.
2019-02-03OSPF: Reject DBDES packets with non-matching MTUOndrej Zajicek (work)
As it is specified in RFC 2328. The old code just provided warning.
2019-01-26Doc: Remove doc for already removed optionOndrej Zajicek (work)
2019-01-24OSPF: Opaque LSAs and Router Information LSAOndrej Zajicek (work)
Add support for OSPFv2 Opaque LSAs (RFC 5250) and for Router Information LSA (RFC 7770). The second part is here mainly for testing opaque LSAs.
2018-12-17OSPF: Fix wrong LSA collisions detectionOndrej Zajicek (work)
In some circumstances (old LSA flushed but not acknowledged and not removed) origination of a new LSA may wrongly triggers LSA collision code. The patch fixes that. Thanks to Asbjorn Mikkelsen for the bugreport and @mdelagueronniere for the original patch.
2018-12-14Doc: Rename code documentation files back to DocOndrej Zajicek (work)
2018-12-12Update RFC referencesOndrej Zajicek (work)
Progdoc comments do not allow SGML tags
2018-12-10OSPF: Fix reconfiguration of vlinksOndrej Zajicek (work)
Fix crash during reconfiguration of OSPF config with vlinks. When vlink is reconfigured, a generic iface-reconfiguration code is used, which in one place supposes that it is running on a regular iface. Thanks to Cybertinus for a bugreport.
2018-12-04Terminology cleanup: The import_control hook is now called preexport.Jan Maria Matejka
Once upon a time, far far away, there were the old Bird developers discussing what direction of route flow shall be called import and export. They decided to say "import to protocol" and "export to table" when speaking about a protocol. When speaking about a table, they spoke about "importing to table" and "exporting to protocol". The latter terminology was adopted in configuration, then also the bird CLI in commit ea2ae6dd0 started to use it (in year 2009). Now it's 2018 and the terminology is the latter. Import is from protocol to table, export is from table to protocol. Anyway, there was still an import_control hook which executed right before route export. One thing is funny. There are two commits in April 1999 with just two minutes between them. The older announces the final settlement on config terminology, the newer uses the other definition. Let's see their commit messages as the git-log tool shows them (the newer first): commit 9e0e485e50ea74c4f1c5cb65bdfe6ce819c2cee2 Author: Martin Mares <mj@ucw.cz> Date: Mon Apr 5 20:17:59 1999 +0000 Added some new protocol hooks (look at the comments for better explanation): make_tmp_attrs Convert inline attributes to ea_list store_tmp_attrs Convert ea_list to inline attributes import_control Pre-import decisions commit 5056c559c4eb253a4eee10cf35b694faec5265eb Author: Martin Mares <mj@ucw.cz> Date: Mon Apr 5 20:15:31 1999 +0000 Changed syntax of attaching filters to protocols to hopefully the final version: EXPORT <filter-spec> for outbound routes (i.e., those announced by BIRD to the rest of the world). IMPORT <filter-spec> for inbound routes (i.e., those imported by BIRD from the rest of the world). where <filter-spec> is one of: ALL pass all routes NONE drop all routes FILTER <name> use named filter FILTER { <filter> } use explicitly defined filter For all protocols, the default is IMPORT ALL, EXPORT NONE. This includes the kernel protocol, so that you need to add EXPORT ALL to get the previous configuration of kernel syncer (as usually, see doc/bird.conf.example for a bird.conf example :)). Let's say RIP to this almost 19-years-old inconsistency. For now, if you import a route, it is always from protocol to table. If you export a route, it is always from table to protocol. And they lived happily ever after.