summaryrefslogtreecommitdiff
path: root/ospf6d
AgeCommit message (Collapse)Author
2020-04-27build: use VPATH for vtysh_scanDavid Lamparter
No need to put $(top_srcdir) everywhere. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-04-23Merge pull request #6262 from qlyoung/remove-sprintfDavid Lamparter
2020-04-21ospf6d: fix SA warningsMark Stapp
Clean up some SA warnings in use of ospf6_lsa_unlock() Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-04-20*: sprintf -> snprintfQuentin Young
Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-18ospf6d: Prevent use after freeDonald Sharp
ospf6_lsa_unlock may free the lsa data structure as such we cannot use the passed in data structure after freeing it. Provide a mechanism to know if the data has been freed using the same usage patterns of other _unlock functions in FRR. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-16Merge pull request #6247 from FRRouting/nb_conversionsDonald Sharp
Merge nb_converions branch to master
2020-04-16*: include vrf northbound module in initChirag Shah
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16*: move CLI node names to cmd_node->nameDavid Lamparter
And again for the name. Why on earth would we centralize this, just so people can forget to update it? Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: move CLI parent data to cmd_node->parent_nodeDavid Lamparter
Same as before, instead of shoving this into a big central list we can just put the parent node in cmd_node. Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: remove second parameter on install_node()David Lamparter
There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: remove cmd_node->vtyshDavid Lamparter
The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: clean up cmd_node initializersDavid Lamparter
... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-09ospf6d: stop looping thru same Inter-Area Router LSAsDon Slice
Processing loop uncovered when there are multiple ABRs also acting as ASBRs into the same area in ospf6. The problem was that when looking thru the list of Inter-area router entries, if the current entry being processed matched, it still merged next-hops and re-initiated the process. In this fix, if the route/path matches and the next-hops also match, there is no need to re-initiate the examine process. Ticket: CM-28900 Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2020-04-08*: Do not cast to the same typeDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-02bgpd, ospfd, ospf6d: long is not bool :(David Lamparter
... Oops ... (for context, the defaults code originally didn't have a dedicated "bool" variant and just used long for bools... I derp'd this when adding bool as a separate case :( ) Reported-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-01ospf6d: Recent changes in our build cause const to be respectedDonald Sharp
We are seeing this crash: New LWP 7673] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/usr/lib/frr/ospf6d -d -F datacenter -M snmp -A ::1'. Program terminated with signal SIGABRT, Aborted. (gdb) bt vtysh=vtysh@entry=0) at lib/command.c:1288 (gdb) The command entered is `debug ospf6 lsa inter-router examin`. Code inspection leads us to the fact that FRR is declaring the data as const but we are attempting to modify it, causing the crash. Remvoe the const of this set/get and let things work. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-13ospf6d: Fix spelling mistakes found by debian packagingDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-08*: Replace `sizeof something` to sizeof(something)Donatas Abraitis
Satisfy checkpatch.pl requirements (check for sizeof without parenthesis) Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-06*: Finish off the __PRETTY_FUNCTION__ to __func__Donald Sharp
FINISH IT Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-05*: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis
Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-13*: Remove break after returnDonatas Abraitis
Just a deadcode. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-10Merge pull request #5763 from ton31337/fix/return_without_parentRenato Westphal
*: Remove parenthesis on return for constants
2020-02-09*: Remove parenthesis on return for constantsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-05Merge pull request #5104 from opensourcerouting/route-map-nbv2Donald Sharp
lib: migrate route map to use northbound
2020-02-04*: remove null check before XFREEQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-04*: fix route map integrationRafael Zalamena
Add the appropriated code to bootstrap route map northbound for all daemons. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-03*: don't null after XFREE; XFREE does this itselfQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-01-21Merge pull request #5473 from yasuhiro-ohara-ntt/ospf6d-self-orig-maxage-fixSri Mohana Singamsetty
ospf6d: ospf6_flood.c: self-originated MaxAge LSAs to install and refresh.
2020-01-15doc: rename man pages to frr-*David Lamparter
The vrrpd one conflicts with the standalone vrrpd package; also we're installing daemons to /usr/lib/frr on some systems so they're not on PATH. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06ospfd: use new defaults mechanism (v2)David Lamparter
Some preprocessor constants converted to enums to make the names usable in the preprocessor. v2: better isolation between core and vty code to make future northbound conversion easier. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06lib: rename memory_vty.c to lib_vty.cDavid Lamparter
And memory_init() to lib_cmd_init(). Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-04ospf6d: ospf6_flood.c: self-originated MaxAge LSAs to install and refresh.Yasuhiro Ohara
Signed-off-by: Yasuhiro Ohara <yasu@nttv6.jp>
2019-12-02*: generously apply constDavid Lamparter
const const const your boat, merrily down the stream... Signed-off-by: David Lamparter <equinox@diac24.net>
2019-11-30*: make frr_yang_module_info constDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-11-30*: make all route_map_rule_cmd constDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-11-02*: Convert connected_free to a double pointerDonald Sharp
Set the connected pointer to set the pointer to NULL. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-29Merge pull request #5197 from SumitAgarwal123/BFD_ADMIN_DOWNRafael Zalamena
bfdd: Handling local and remote admin-down
2019-10-28bfdd: Handling local and remote admin-downSumitAgarwal123
Scenarios where this code change is required: 1. BFD is un-configured from BGP at remote end. Neighbour BFD sends ADMIN_DOWN state, but BFD on local side will send DOWN to BGP, resulting in BGP session DOWN. Removing BFD session administratively shouldn't bring DOWN BGP session at local or remote. 2. BFD is un-configured from BGP or shutdown locally. BFD will send state DOWN to BGP resulting in BGP session DOWN. (This is akin to saying do not use BFD for BGP) Removing BFD session administratively shouldn't bring DOWN BGP session at local or remote. Signed-off-by: Sayed Mohd Saquib sayed.saquib@broadcom.com
2019-09-30Merge pull request #5009 from donaldsharp/interface_deletionRuss White
lib, zebra: Allow for interface deletion when kernel event happens
2019-09-25ospf6d: Prevent use after freeDonald Sharp
the for (ALL_LSDB...) macro was iterating over lsa, when lsa had just been freed in these functions. Remove the macro and make the adjustments saving lsa_next before the free. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-24Merge pull request #4995 from opensourcerouting/ospf6d-iftypeRuss White
ospf6d: fix interface type handling
2019-09-20Merge pull request #4529 from donaldsharp/vrf_conversionsRenato Westphal
Vrf conversions
2019-09-19*: Convert zapi->interface_delete to ifp callbackDonald Sharp
Convert the callback of the interface_delete to the new ifp callback. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19*: Convert interface_down to interface down callbackDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19*: Convert from ->interface_up to the interface callbackDonald Sharp
For all the places we have a zclient->interface_up convert them to use the interface ifp_up callback instead. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19*: Switch all zclient->interface_add to interface create callbackDonald Sharp
Switch the zclient->interface_add functionality to have everyone use the interface create callback in lib/if.c Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19*: Add infrastructure to support zapi interface callbacksDonald Sharp
Start the conversion to allow zapi interface callbacks to be controlled like vrf creation/destruction/change callbacks. This will allow us to consolidate control into the interface.c instead of having each daemon read the stream and react accordingly. This will hopefully reduce a bunch of cut-n-paste stuff Create 4 new callback functions that will be controlled by lib/if.c create -> A upper level protocol receives an interface creation event The ifp is brand spanking newly created in the system. up -> A upper level protocol receives a interface up event This means the interface is up and ready to go. down -> A upper level protocol receives a interface down destroy -> A upper level protocol receives a destroy event This means to delete the pointers associated with it. At this point this is just boilerplate setup for future commits. There is no new functionality. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-17ospf6d: track explicit interface type configDavid Lamparter
If the interface doesn't exist in system, we'll default to broadcast and then later not change that when the interface comes up. Explicitly track whether the user configured the type and properly auto-set it if they didn't. Fixes: #3930 Fixes: #4873 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-17ospf6d: fix mistaken if_is_* instead of oi->typeDavid Lamparter
If the user configured an interface to be in a particular mode, we need to be consistent about that. No looking at if_is_pointopoint() or if_is_broadcast(). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-17ospf6d: interface state needs update even w/o areaDavid Lamparter
We can't skip reading interface state if there's no area yet, we'll be missing information later when the interface is configured. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>