summaryrefslogtreecommitdiffstats
path: root/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: Add parameter names as a hint of what is expected.Donald Sharp2018-07-251-26/+28
| | | | | | | Add some parameter names to functions in table.h to give a clue as to what we expect people to pass in. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #2665 from chiragshah6/evpn_devRuss White2018-07-241-0/+2
|\ | | | | bgpd: support evpn nd ext community
| * bgpd: support evpn nd ext communityChirag Shah2018-07-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EVPN ND ext community support NA flag R-bit, to have proxy ND. Set R-bit in EVPN NA if a given router is default gateway or there is a local router attached, which can be determine based on local neighbor entry. Implement BGP ext community attribute to generate and parse R-bit and pass along zebra to program neigh entry in kernel. Upon receiving MAC/IP update with community type 0x06 and sub_type 0x08, pass the R-bit to zebra to program neigh entry. Set NTF_ROUTER in neigh entry and inform kernel to do proxy NA for EVPN. Ref: https://tools.ietf.org/html/draft-ietf-bess-evpn-na-flags-01 Ticket:CM-21712, CM-21711 Reviewed By: Testing Done: Configure Local vni enabled L3 Gateway, which would act as router, checked show evpn arp-cache vni x ip <ip of svi> on originated and remote VTEPs. "Router" flag is set. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | libs, daemons: use const in route-map applyMark Stapp2018-07-236-18/+25
| | | | | | | | | | | | | | Use 'const prefix *' in route-map apply apis; led to some corresponding changes in several daemons. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | Merge pull request #2652 from LabNConsulting/working/master/confdate_cleanupDonald Sharp2018-07-234-5/+5
|\ \ | | | | | | Simplify deprecation check
| * | lib: remove VERSION_TYPE_DEV from CONFDATE checksLou Berger2018-07-104-5/+5
| | | | | | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
* | | lib/compiler.h: Always define CPP_NOTICEChristian Franke2018-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | On old compilers CPP_NOTICE should be a macro evaluating to an empty statement, instead of being undefined. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | | Merge pull request #2608 from pacovn/PVS-Studio_dead_code_1Donald Sharp2018-07-193-6/+4
|\ \ \ | |_|/ |/| | eigrpd lib pimd zebra: dead code (PVS-Studio)
| * | eigrpd lib pimd zebra: dead code (PVS-Studio)F. Aragon2018-07-063-6/+4
| | | | | | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | | Merge pull request #2595 from pguibert6WIND/fix_netlink_rx_route_vrfnetnsDonald Sharp2018-07-131-12/+0
|\ \ \ | | | | | | | | zebra: upon RTM_NEWROUTE/DELROUTE, find appropriate interface
| * | | lib: remove if_lookup_by_index portion of code with unknown vrfPhilippe Guibert2018-07-101-12/+0
| | |/ | |/| | | | | | | | | | | | | | | | This function should be called with a known vrf_id. All other cases, the other API should be called. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | | zebra, libs: use const prefix ptrs in apisMark Stapp2018-07-112-22/+24
| | | | | | | | | | | | | | | | | | | | | Add 'const' to prefix args to several zebra route update, redistribution, and route owner notification apis. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | | libs: add ALL_NEXTHOPS_PTR iterator macroMark Stapp2018-07-101-0/+5
|/ / | | | | | | | | | | Because sometimes we have a pointer to a nexthop_group. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | Merge pull request #2630 from donaldsharp/hashablesRafael Zalamena2018-07-062-13/+7
|\ \ | | | | | | revert hash_walk/iterate optimizations
| * | lib: Add some documentationDonald Sharp2018-07-061-2/+6
| | | | | | | | | | | | | | | | | | | | | Add some documentation to hash_walk/iterate to tell people to not do something stupid. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | Revert "lib: A small optimization for the hash iterate and walk functions"Donald Sharp2018-07-061-11/+1
| | | | | | | | | | | | This reverts commit fc61644e440c875eefa222ab34d726c6281ca806.
* | | lib: add the pathname to get the realpath in case of failurePhilippe Guibert2018-07-061-2/+5
|/ / | | | | | | | | | | | | | | Sometimes, the file under /var/run/netns may not be authorised to be read ( because it is not read permission for frr user, for instance). so it is good to know what happened. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* / bgpd lib ospfd pimd ripngd: null chk (PVS-Studio)F. Aragon2018-07-032-8/+11
|/ | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* Merge pull request #2475 from ↵Russ White2018-07-021-2/+37
|\ | | | | | | | | LabNConsulting/working/master/no_vrf_socket_4l3mdev Don't open per vrf sockets when net.ipv4.tcp|udp_l3mdev_accept != 0
| * lib: don't open vrf specific socket when tcp|udp_l3mdev_accept != 0Lou Berger2018-06-181-2/+37
| | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
* | Merge pull request #2517 from pguibert6WIND/flowspec_other_optionsRuss White2018-06-291-0/+29
|\ \ | | | | | | Flowspec support other options
| * | bgpd: add an icmp flag for flowspec icmp entriesPhilippe Guibert2018-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some values for icmp type/code can not be encoded like port source or port destination. This is the case of 0 value that is authorized for icmp. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * | bgpd: support for flowspec fragment list into policy routingPhilippe Guibert2018-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The flowspec fragment attribute is taken into account to be pushed in BGP policy routing entries. Valid values are enumerate list of 1, 2, 4, or 8 values. no combined value is supported yet. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * | bgpd: support for enumerate pkt lenPhilippe Guibert2018-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | The packet length can be injected from fs entry with an enumerate list; the negation of the value is also taken into account. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * | *: add flowspec dscp handlingPhilippe Guibert2018-06-281-0/+2
| | | | | | | | | | | | | | | | | | Only one dscp value is accepted as filtering option. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * | bgpd, lib: share flags values for iptable configurationPhilippe Guibert2018-06-281-0/+10
| | | | | | | | | | | | | | | | | | | | | Those flags can be shared between BGP and Zebra. That is why those flags are moved to common pbr.h header file. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * | bgpd: support for flowspec tcp flagsPhilippe Guibert2018-06-281-0/+14
| | | | | | | | | | | | | | | | | | Ability to handle flowspec tcp flags. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | | Merge pull request #2532 from donaldsharp/various_stuffJafar Al-Gharaibeh2018-06-292-1/+15
|\ \ \ | | | | | | | | Redistribution and some extra developer debug code
| * | | lib, zebra: Add a bit of code to look at fifoDonald Sharp2018-06-282-1/+15
| |/ / | | | | | | | | | | | | | | | | | | When in a dev build add a bit of code to track max depth of a fifo and to allow zebra to report on it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* / / bgpd: null check (Coverity 1453455)F. Aragon2018-06-291-19/+3
|/ / | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | Merge pull request #2570 from ↵Quentin Young2018-06-271-2/+4
|\ \ | | | | | | | | | | | | pacovn/Coverity_1448386_Untrusted_value_as_argument lib: untrusted argument (Coverity 1448386)
| * | lib: untrusted argument (Coverity 1448386)paco2018-06-271-2/+4
| | | | | | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | | lib: null check (2) (Coverity 1451361)paco2018-06-272-2/+5
|/ / | | | | | | | | | | Additional correction to fa3016309b33395c02cf10e7e198517c5b81e55a Signed-off-by: F. Aragon <paco@voltanet.io>
* | Merge pull request #2559 from pacovn/Coverity_1302503_Logically_dead_codeQuentin Young2018-06-261-0/+1
|\ \ | | | | | | lib ospfd: dead code (Coverity 1302503 1302502)
| * | lib ospfd: dead code (Coverity 1302503 1302502)paco2018-06-261-0/+1
| | | | | | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | | Merge pull request #2503 from ↵Quentin Young2018-06-261-2/+5
|\ \ \ | | | | | | | | | | | | | | | | pacovn/Coverity_1469898_Uninitialized_scalar_variable lib: uninitialized variable (2) (Coverity 1469898)
| * | | lib: uninitialized variable (2) (Coverity 1469898)paco2018-06-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous correction (2c2d5cb397c140c05ad81e8c79273bd3af13b595) was not enough, so now it is ensured that the argument shift is not negative nor zero. Signed-off-by: F. Aragon <paco@voltanet.io>
* | | | Merge pull request #2463 from pacovn/Coverity_1452539_Out-of-bounds_accessQuentin Young2018-06-261-3/+2
|\ \ \ \ | |_|/ / |/| | | lib: out-of-bounds access (Coverity 1452539)
| * | | lib: out-of-bounds access (Coverity 1452539)paco2018-06-221-3/+2
| | |/ | |/| | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | | Merge pull request #2552 from qlyoung/remove-defun-deprecatedRenato Westphal2018-06-262-42/+0
|\ \ \ | | | | | | | | Remove DEFUN_DEPRECATED
| * | | lib: remove DEFUN_DEPRECATEDQuentin Young2018-06-251-3/+0
| | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * | | *: remove deprecated 'log trap' commandsQuentin Young2018-06-251-39/+0
| | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | | Merge pull request #2548 from ↵Jafar Al-Gharaibeh2018-06-251-1/+3
|\ \ \ \ | |/ / / |/| | | | | | | | | | | pacovn/Coverity_1453456_Unchecked_return_value_from_library lib: check return value (Coverity 1453456)
| * | | lib: check return value (Coverity 1453456)paco2018-06-251-1/+3
| | | | | | | | | | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | | | lib: null check (Coverity 1470150)paco2018-06-221-0/+3
|/ / / | | | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | | Merge pull request #2520 from donaldsharp/privs_smivsJafar Al-Gharaibeh2018-06-221-0/+13
|\ \ \ | | | | | | | | lib: Fix privs when using HAVE_CAPABILITIES
| * | | lib: Fix privs when using HAVE_CAPABILITIESDonald Sharp2018-06-211-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If your daemon does not need any special privileges and you are compiling with HAVE_CAPABILIES, the zprivs->change pointer will end up NULL due to the way zprivs_caps_init. So as a check let's add a NULL check for zprivs->change and set it to a function that will do nothing. This change prevents a crash if you raise privileges when your daemon needs no special privileges. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | Merge pull request #2449 from donaldsharp/lib_delayed_readLou Berger2018-06-226-11/+87
|\ \ \ \ | | | | | | | | | | Lib delayed read
| * | | | lib: Add --log-level to daemonsDonald Sharp2018-06-194-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to specify the designated log level at startup. --log-level <emergencies|alerts|critical|errors|warnings|notifications|informational|debugging> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | | lib: Remove special case code to use syslogDonald Sharp2018-06-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the special case code to use syslog for Cumulus. They can specify this via startup now instead of having a special compile flag for this option. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>