summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-03-06*: Finish off the __PRETTY_FUNCTION__ to __func__Donald Sharp
FINISH IT Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-05Merge pull request #5916 from mjstapp/fix_gmtimeQuentin Young
*: use gmtime_r exclusively
2020-03-05*: use gmtime_r, localtime_r exclusivelyMark Stapp
Stop using gmtime() or localtime() everywhere. Signed-off-by: Mark Stapp <mjs@voltanet.io>
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-03-04*: Use true/false instead of 1/0 when assigning variable for bool typeDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-04*: Return bool type for bool functionsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-04*: Use short version of bool expressionsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-28*: change hash_backet to hash_bucketDonald Sharp
It's been a year search and destroy. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-28Merge pull request #5859 from donaldsharp/clang_latestMark Stapp
Clean up clang latest SA warnings
2020-02-27Merge pull request #5857 from mjstapp/embed_nhg_in_nheStephen Worley
zebra,lib: Embed lib nexthop-group in zebra hash entry
2020-02-27Revert "*: change hash_backet to hash_bucket"Jafar Al-Gharaibeh
This reverts commit 3895c42a2eb534a70ef25412547e798c1c1ef5a1. LabN CI update needs to be coordinated before merging this Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2020-02-27lib: Cleanup set but unused variablesDonald Sharp
There existed some variables set but never used. Clean this up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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-25lib: use const in nexthop_group copy apiMark Stapp
Add some const to the nhg copy api. Signed-off-by: Mark Stapp <mjs@voltanet.io>
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>