summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-02-27Revert "*: change hash_backet to hash_bucket"revert-5870-hash_backetDonald Sharp
2020-02-26*: change hash_backet to hash_bucketDonald Sharp
It's been a year search and destroy. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-26Merge pull request #5866 from qlyoung/fix-ipaddr-issetMark Stapp
lib: fix ipaddr_isset
2020-02-26lib: fix ipaddr_issetQuentin Young
Meaning inverted by mistake Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-25Merge pull request #5270 from NaveenThanikachalam/rmapDonald Sharp
lib: Optimizing route-maps
2020-02-20Merge pull request #5842 from qlyoung/fix-test-then-xfree-againDonatas Abraitis
lib: do not test before XFREE
2020-02-19lib: do not test before XFREEQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-19lib: don't allow to recurse inside route-map nodeRafael Zalamena
vtysh should handle going back up one level to try the command, there is no need to be able to recurse inside route-map. This also fixes a problem with northbound hitting the XPath queue limit of 8 nodes. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-19Merge pull request #5834 from opensourcerouting/route-map-fix-crashDonald Sharp
lib: fix route-map coverity scan issue
2020-02-19lib: fix route-map coverity scan issueRafael Zalamena
Use better TAILQ free idiom to avoid coverity scan warnings. This fixes the coverity scan issue 1491240 . Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-19Merge pull request #5809 from donaldsharp/vrf_nameDonatas Abraitis
Print out vrf name as well as id
2020-02-18Merge pull request #5651 from AnuradhaKaruppiah/evpn-pim-fixesPhilippe Guibert
EVPN-PIM: complete anycast (MLAG) VTEP support
2020-02-18Merge pull request #5813 from mjstapp/zapi_labels_use_nhDonald Sharp
*: encode zapi labels message using nexthops
2020-02-18lib: Optimizing route-maps - Part-3Naveen Thanikachalam
* This commit implements the code style suggestions from Polychaeta. * This commit also introduces a CLI to toggle the optimization and, a hidden CLI to display the contents of the constructed prefix tree. Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
2020-02-18lib: Optimizing route-maps - Part-2Naveen Thanikachalam
This commit introduces the logic that computes the best-match route-map index for a given prefix. Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
2020-02-18lib: Optimizing route-maps - Part-1Naveen Thanikachalam
* This commit introduces the building blocks. A per-route-map prefix tree is introduced. This tree will consist of the prefixes defined within the prefix-lists that are added to the match clause of that route-map. Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
2020-02-16lib: Fix so that `--enable-pcreposix` actually compilesDonald Sharp
The `--enable-pcreposix` configure option was not actually compiling properly. Follow pre-existing pattern for inclusion of regex.h or the pcreposix.h header. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-14*: encode zapi labels message using nexthopsMark Stapp
Use the zapi_nexthop struct with the mpls_labels zapi messages instead of the special-purpose (and more limited) nexthop struct that was being used. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-02-14lib: add missing command DESC for MLAG messagesAnuradha Karuppiah
This string is used in some logging for e.g. in zclient_read - >>>>>>>>>>>>>>>>>>>>>>>>>> if (zclient_debug) zlog_debug("zclient 0x%p command %s VRF %u", (void *)zclient, zserv_command_string(command), vrf_id); >>>>>>>>>>>>>>>>>>>>>>>>>> Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-02-14lib: Add vrf name to outputs/debugsDonald Sharp
Add some additional output/debug to code to allow us to see the vrf name instead of just the vrf id. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-14lib: Add a macro to allow for quick/easy display of vrf nameDonald Sharp
Add a quick macro to allow for safe dereference of the vrf since it may or may not exist in all cases. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-14lib: Format according to our standardDonald Sharp
A couple of functions needed to be reformated. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-13Merge pull request #5806 from ton31337/fix/remove_break_after_returnMark Stapp
*: Remove break after return
2020-02-13Merge pull request #5787 from karamalla0406/rmac_checkDonatas Abraitis
bgpd: RFC compliance wrt invalid RMAC, GWIP, ESI and VNI
2020-02-13*: Remove break after returnDonatas Abraitis
Just a deadcode. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-12Merge pull request #5794 from mjstapp/remove_nexthop_matched_flagQuentin Young
lib,zebra: remove unused MATCHED nexthop flag
2020-02-11lib,zebra: remove unused MATCHED nexthop flagMark Stapp
Remove an unused flag value from the nexthop struct. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-02-11bgpd: RFC compliance wrt invalid RMAC, GWIP, ESI and VNIKishore Aramalla
A route where ESI, GW IP, MAC and Label are all zero at the same time SHOULD be treat-as-withdraw. Invalid MAC addresses are broadcast or multicast MAC addresses. The route MUST be treat-as-withdraw in case of an invalid MAC address. As FRR support Ethernet NVO Tunnels only. Route will be withdrawn when ESI, GW IP and MAC are zero or Invalid MAC Test cases: 1) ET-5 route with valid RMAC extended community 2) ET-5 route no RMAC extended community 3) ET-5 route with Multicast MAC in RMAC extended community 4) ET-5 route with Broadcast MAC in RMAC extended community Signed-off-by: Kishore Aramalla <karamalla@vmware.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-06*: Replace s_addr 0 => INADDR_ANYDonatas 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-05lib: fix route-map YANG module on old gcc versionsRafael Zalamena
Copy the fix made in 'lib/if.c' to 'lib/routemap_northbound.c' so we can have a working YANG model when compiled with GCC version less than 5. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-05Merge pull request #5750 from qlyoung/fix-null-after-xfreeRenato Westphal
*: don't null after XFREE; XFREE does this itself
2020-02-04*: remove null check before XFREEQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-04zebra, lib: Remove return from void functionsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-04lib: fix route map northbound memory leakRafael Zalamena
Keep a list of hook contexts used by northbound so we don't lose the pointer when free()ing the route map index entry data. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04lib: add backward compatibility for route mapRafael Zalamena
Allow old CLI users to still print their configuration without migrating to northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04lib: fix route map generic error outputRafael Zalamena
Two fixes here: * Don't attempt to use `vty` pointer in vty; * When `vty` is unavailable output to log; Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04yang/lib: add filter model to codeRafael Zalamena
This fixes a warning on daemons that use route map about filter yang model not being included in the binary. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04lib: implement new route map CLIRafael Zalamena
Use the northbound back-end instead of the old route map CLI. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04lib: implement route map northboundRafael Zalamena
Based on the route map old CLI, implement the route map handling using the exported functions. Use a curry-like programming pattern avoid code repetition when destroying match/set entries. This is needed by other daemons that implement custom route map functions and need to pass to lib their specific destroy functions. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04lib: export route map structures and functionsRafael Zalamena
These exported items are going to be used by the new northbound CLI. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04Merge pull request #5653 from ↵Donald Sharp
slankdev/slankdev-bgpd-support-prefix-sid-srv6-l3vpn bgpd: additional Prefix-SID sub-types for supporting SRv6 l3vpn
2020-02-04Merge pull request #5746 from donaldsharp/bgp_saRuss White
Coverioty sa stuff
2020-02-04lib: Test return of fcntl in agentx.cDonald Sharp
The agentx.c code was calling fcntl but not testing return code and handling it, thus making SA unhappy. Fix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-03*: don't null after XFREE; XFREE does this itselfQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-01-30lib: Adding GR capabilites encode and decode.Santosh P K
For Graceful restart clients have to send GR capabilities library functions are added to encode capabilities and also for zebra to decode client capabilities. Co-authored-by: Santosh P K <sapk@vmware.com> Co-authored-by: Soman K S <somanks@vmware.com> Signed-off-by: Santosh P K <sapk@vmware.com>
2020-01-28Merge pull request #5210 from bisdhdh/masterRuss White
bgpd:BGP Graceful Restart Per Neighbor(BGPN) Feature.
2020-01-28Merge pull request #4773 from thozza/31-prefix-bcast-addrRuss White
ipv4_broadcast_addr() didn't comply with RFC3021