summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2021-03-30Merge pull request #8311 from idryzhov/nb-sortingRuss White
Sort route-maps/access-lists/prefix-lists by sequence number in running-config
2021-03-30Merge pull request #8137 from Orange-OpenSource/ospf_lsRuss White
ospfd: Add Link State support
2021-03-30Merge pull request #8369 from idryzhov/filter-fixesRuss White
access-list and prefix-list fixes
2021-03-30lib: fix checking for duplicated prefix-list entriesIgor Ryzhov
Restore the behavior that was before the NB conversion. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-30lib: restore checks for duplicated prefix-list entriesIgor Ryzhov
The checks were incorrectly removed in commit 4d2f546f under the assumption that it is needed only in CLI. Actually the checks are needed for the case when the sequence number is explicitly set by a user. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-30lib: finish consolidation of prefix-list nb callbacksIgor Ryzhov
There was an attempt to consolidate the code in commit fae60215, but the work was not actually finished and some necessary checks were missed. Let's finish it. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-29lib: fix checking for duplicated access-list entriesIgor Ryzhov
Restore the behavior that was before the NB conversion. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-26Merge pull request #8317 from mjstapp/fix_short_printfrr_bufDavid Lamparter
2021-03-26Merge pull request #8154 from AnuradhaKaruppiah/evpn-mh-irb-2Patrick Ruddy
bgpd, lib, zebra: Complete support for sym-IRB with EVPN-MH
2021-03-25lib/zebra: zapi for installing EVPN nexthops from bgpAnuradha Karuppiah
EVPN nexthops are installed as remote neighs by zebra. This was earlier done only via VRF IPvX uni routes imported from EVPN routes. With EVPN-MH these VRF routes now reference a L3NHG which is setup based on the EAD and doesn't include the RMAC. To workaround that BGP now consolidates and maintains EVPN nexthops which are then sent to zebra. zebra sets up these nexthops as L3-VNI nh entries using a dummy type-1 route as reference. Ticket: CM-31398 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-03-25lib, bgpd: add a specific oid_copy function for IPv6 addrsPat Ruddy
Do not overload the v4 oid_copy_addr function for ipv6 coverity does not like this kind of thing. Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-03-24Merge pull request #8184 from opensourcerouting/bfd-bgp-napiIgor Ryzhov
bgpd,lib: rework BGP BFD integration
2021-03-23lib: enlarge the local buffer for printfrr extension tokensMark Stapp
Make the local buffer offered to printfrr extension tokens bigger; existing size wasn't quite enough for some of the more elaborate struct prefix types. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-23lib: small BFD session notifier improvementRafael Zalamena
Cache current monotime to avoid unnecessary calls. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-23lib: new BFD integration APIRafael Zalamena
New BFD protocol integration API with abstractions to fix most common protocol integration errors: - Set address family together with the source/destination addresses - Set the TTL together with the single/multi hop option - Set/unset profile/interface easily - Keep the arguments so we don't have to rebuild them every time - Install/uninstall functions that keep track of current state so the daemon doesn't have to - Reinstall when critical configuration changes (address, multi hop etc...) - Reconfigure BFD when the daemon restarts automatically - Automatically calls the user defined callback for session update - Shutdown handler for all protocols Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-23lib: Update Link State DatabaseOlivier Dugeon
Add new status for Vertex, Edge and Subnet to manage their respective states in the data base. Add new functions: - to register/unregister server and client - to show content of the Database (VTY and Json output) - to update and compare subnets - to clean vertex and ted from ORPHAN elements - to convert message or stream into a Link State Element and update Link State Database accordingly to message event Change Edge and Vertex key computation by using the host order systematically. This impact mostly key based on IPv4 addresses where `ntohl()` function must be used when searching a Vertex or Edge by key. Update the documentation accordingly Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-03-23lib: sort prefix-list commands by sequence-number in running-configIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-23lib: sort access-list commands by sequence-number in running-configIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-23lib: sort route-map commands by sequence number in running-configIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-23lib: add ability to sort CLI commands printed by NB layerIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-23lib: simplify nb_cli_show_dnode_cmdsIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-22lib: fix xref hash calculationDavid Lamparter
... to make it do what it says it does. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-22lib: add [XXXXX-XXXXX] log prefix & configDavid Lamparter
This logs the unique ID prefix from the xref that each log message call has, and adds on/off knobs for both EC and unique ID printing. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-22lib: remove flog() macroDavid Lamparter
It was only used in one place. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-22lib: get rid of flog() usage in NB codeDavid Lamparter
This parametrized use of flog with variable EC and priority doesn't mesh particularly well with the xref code & there isn't really much reason to not use fixed/constant calls like this. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-22lib: add bputs/bputch fbuf (bprintfrr) helpersDavid Lamparter
Just small utilities for when you already have a struct fbuf (i.e. when bprintfrr() is used to construct longer text from multiple pieces.) Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-22Merge pull request #8121 from opensourcerouting/macro-cleanupDonatas Abraitis
*: require ISO C11 + semicolons after file-scope macros
2021-03-17Merge pull request #8008 from chiragshah6/yang_nb5Santosh P K
[lib, yang] : multiple fixes in prefix-list northbound conversion
2021-03-17lib: temporary workaround for LabN CIDavid Lamparter
Accept macros without ; for LabN CI *only*. This is a bit hairy since we can't generate warnings for this, so it's very limited in both scope and duration. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after FRR_CFG_DEFAULT_*David Lamparter
... again ... Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after FRR_DAEMON_INFO & co.David Lamparter
... again ... Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after DEFINE_<typesafe...>David Lamparter
Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after DEFINE_QOBJ & co.David Lamparter
Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after DEFINE_HOOK & co.David Lamparter
See previous commit. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after DEFINE_MTYPE & coDavid Lamparter
Back when I put this together in 2015, ISO C11 was still reasonably new and we couldn't require it just yet. Without ISO C11, there is no "good" way (only bad hacks) to require a semicolon after a macro that ends with a function definition. And if you added one anyway, you'd get "spurious semicolon" warnings on some compilers... With C11, `_Static_assert()` at the end of a macro will make it so that the semicolon is properly required, consumed, and not warned about. Consistently requiring semicolons after "file-level" macros matches Linux kernel coding style and helps some editors against mis-syntax'ing these macros. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require ISO C11 (or C++11)David Lamparter
It's 2021... time to drop some 10yo compat stuff. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17snmp: change -std=gnu99 to -std=gnu11David Lamparter
The point of the `-std=gnu99` was to override a `-std=c99` that may be coming in from net-snmp. However, we want C11, not C99. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-15Merge pull request #8230 from donaldsharp/flex_moreMark Stapp
more switchover to using our builtin printf functionality
2021-03-14Merge pull request #7945 from volta-networks/feat_isis_snmpRenato Westphal
isisd: add support for read-only snmp mibs objects
2021-03-14Merge pull request #8160 from idryzhov/fix-show-yang-operRenato Westphal
lib: fix crash when iterating over nb operational data
2021-03-14*: remove remaining severity prefixesDavid Lamparter
Having a "warning:" prefix on a debug message is particularly dumb... Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-14lib: Convert to builtin printf functionalityDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-10Merge pull request #8124 from pguibert6WIND/ipsec_iptable_dplaneMark Stapp
zebra: move netfilter contexts to zebra dplane
2021-03-10zebra: move ipset and ipset_entry to zebra dplane contextsPhilippe Guibert
like it has been done for iptable contexts, a zebra dplane context is created for each ipset/ipset entry event. The zebra_dplane_ctx job is then enqueued and processed by separate thread. Like it has been done for zebra_pbr_iptable context, the ipset and ipset entry contexts are encapsulated into an union of structures in zebra_dplane_ctx. There is a specificity in that when storing ipset_entry structure, there was a backpointer pointer to the ipset structure that is necessary to get some complementary information before calling the hook. The proposal is to use an ipset_entry_info structure next to the ipset_entry, in the zebra_dplane context. That information is used for ipset_entry processing. The ipset name and the ipset type are the only fields necessary. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-03-09lib: use correct type in add_event xrefMark Stapp
the add_event api xref should use THREAD_EVENT, rather than THREAD_TIMER. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-09Merge pull request #6807 from opensourcerouting/xref-extractRuss White
xrefs extraction tool
2021-03-05lib: add ringbuf socket read functionRafael Zalamena
Implement new ringbuf function to do the proper socket reads without the need of intermediary buffers. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-03lib: consolidate plist nb callbacksChirag Shah
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-02Merge pull request #8175 from mjstapp/fix_printfrr_nullsRuss White
lib, bgpd: handle NULL inputs in printfrr extensions
2021-03-02isisd: support for snmplynne
Add support for read only mib objects from RFC4444. Signed-off-by: Lynne Morrison <lynne@voltanet.io> Signed-off-by: Karen Schoener <karen@voltanet.io>