summaryrefslogtreecommitdiff
path: root/nhrpd
AgeCommit message (Collapse)Author
2018-08-28*: add a vrf update hook to be informed of the vrf namePhilippe Guibert
The Vrf aliases can be known with a specific hook. That hook will then, from zebra propagate the information to the relevant zapi clients. The registration hook function is the same for all daemons. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-08-14*: rename ferr_ref -> log_refQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: rename zlog_fer -> flog_errQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: stop double initialization of ferrQuentin Young
* Stop double init of ferr * Fixup bugs in zebra ferr * Add missing init in ospfd Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: fix source file headers & includes for errcodesQuentin Young
* Use the correct license header * Stop headers from including themselves * Use uniform relative include conventions * Ensure that sources include what they use * Turn off clang-format around struct array blocks Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14nhrpd: Add NHRP_ERR_XXXX for zlog_err to zlog_ferr conversionDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-11*: ALLOC calls cannot failDonald Sharp
There is no need to check for failure of a ALLOC call as that any failure to do so will result in a assert happening. So we can safely remove all of this code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-02Merge pull request #2609 from pacovn/clang_scan_nhrpd_vici_initializationDonald Sharp
nhrpd: uninitialized variable (Clang scan)
2018-07-02Merge pull request #2604 from pacovn/PVS-Studio_odd_operator_usageQuentin Young
nhrpd: odd operator usage fix (PVS-Studio)
2018-07-02nhrpd: uninitialized variable (Clang scan)F. Aragon
Fix over 0a939f4f24fa34fea688482fbf57fb16eaf2a081 (there was a case not covered by previous fix) Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-02eigrpd nhrpd ospfd pimd: fomat fixes (PVS-Studio)F. Aragon
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-02nhrpd: odd operator usage fix (PVS-Studio)F. Aragon
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-29nhrpd: uninitialized variable (Clang scan)F. Aragon
This correction fixes two bugs detected by Clang scan: Bug Group: Logic error Bug Type: Assigned value is garbage or undefined File: nhrpd/vici.c Function: vici_parse_message Lines: 100, 105 Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18nhrpd: array limit check (cppcheck)paco
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-02-26*: Rename ZEBRA_FLAG_INTERNAL -> ZEBRA_FLAG_ALLOW_RECURSIONDonald Sharp
The ZEBRA_FLAG_INTERNAL flag is used to signal to zebra that the route being added, the nexthops for it can be recursively resolved. This name keeps throwing me off when I read it so let's rename to something that allows the developer to understand what is going on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-02-08*: Track vrfs per nexthop not per route entryDonald Sharp
Track the vfrs on a per nexthop basis instead of on a per route entry basis. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12*: Send/receive the nexthop vrf_idDonald Sharp
Modify the code to send and receive to/from zebra the nexthops vrf_id. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-27*: Make zapi route install Notifications optionalDonald Sharp
Allow the higher level protocol to specify if it would like to receive notifications about it's routes that it has installed. I've purposely made it part of zclient_new_notify because we need to track the routes on a per daemon basis only. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-24*: add missing \n in some help stringsRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-23*: Modify zclient_init to require privs dataDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-23nhrpd: Let struct zebra_privs_t be availableDonald Sharp
signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-10*: use the FOR_ALL_INTERFACES abstraction from babeldRenato Westphal
This improves code readability and also future-proofs our codebase against new changes in the data structure used to store interfaces. The FOR_ALL_INTERFACES_ADDRESSES macro was also moved to lib/ but for now only babeld is using it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-10*: introduce new rb-tree to optimize interface lookup by ifindexRenato Westphal
Performance tests showed that, when running on a system with a large number of interfaces, some daemons would spend a considerable amount of time in the if_lookup_by_index() function. Introduce a new rb-tree to solve this problem. With this change, we need to use the if_set_index() function whenever we want to change the ifindex of an interface. This is necessary to ensure that the 'ifaces_by_index' rb-tree is updated accordingly. The return value of all insert/remove operations in the interface rb-trees is checked to ensure that an error is logged if a corruption is detected. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-10*: use rb-trees to store interfaces instead of sorted linked-listsRenato Westphal
This is an important optimization for users running FRR on systems with a large number of interfaces (e.g. thousands of tunnels). Red-black trees scale much better than sorted linked-lists and also store the elements in an ordered way (contrary to hash tables). This is a big patch but the interesting bits are all in lib/if.[ch]. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-05nhrpd: Add hash table namesDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-29Merge pull request #1056 from opensourcerouting/oldbits-0Donald Sharp
"pathspace" options, vtysh-suid-cleanups, "vty_frame()"
2017-08-29*: remove empty "interface XYZ" config blocksDavid Lamparter
Using the previously-added vty_frame() support, this gets rid of all the pointless empty "interface XYZ" blocks that get added for any interface that shows up in the system (e.g. dummys, tunnels, etc.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-28*: remove ZEBRA_FLAG_{BLACKHOLE,REJECT} from APIDavid Lamparter
FLAG_BLACKHOLE is used for different things in different places. remove it from the zclient API, instead indicate blackholes as proper nexthops inside the message. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-23*: use zapi_route to send/receive redistributed routes as wellRenato Westphal
Some differences compared to the old API: * Now the redistributed routes are sent using address-family independent messages (ZEBRA_REDISTRIBUTE_ROUTE_ADD and ZEBRA_REDISTRIBUTE_ROUTE_DEL). This allows us to unify the ipv4/ipv6 zclient callbacks in the client daemons and thus remove a lot of duplicate code; * Now zebra sends all nexthops of the redistributed routes to the client daemons, not only the first one. This shouldn't have any noticeable performance implications and will allow us to remove an ugly exception we had for ldpd (which needs to know all nexthops of the redistributed routes). The other client daemons can simply ignore the nexthops if they want or consult just the first one (e.g. ospfd/ospf6d/ripd/ripngd). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-23nhrpd: unify ipv4/ipv6 zebra-tx functionsRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-23nhrpd: use the new API to send routes to zebraRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-23babeld/eigrpd/ldpd/nhrpd: add prefix length sanity checksRenato Westphal
Pulled from d917882. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-23babeld/nhrpd: ignore ipv6 srcdest routesRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-21Merge pull request #1009 from donaldsharp/show_cmdsDavid Lamparter
Show cmds
2017-08-21Merge pull request #929 from opensourcerouting/hooks-doc-irdpDonald Sharp
hook improvements, more hooks, doc example, IRDP cleanup
2017-08-21*: Add 'show debugging' command from vtyshDonald Sharp
Allow vtysh to query every daemon about its debugging status in one go. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-17nhrpd: use hop count 1 for registration requestsTimo Teräs
Cisco has a bug that it rejects packets with zero hop count. Use one to avoid potential forwarding of registration requests. Fixes #951 Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2017-08-15lib: replace if_add_hook with hook_* logicDavid Lamparter
This allows modules to register their own additional hooks on interface creation/deletion. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15*: centralize some exit cleanup into libfrrDavid Lamparter
Start creating a counterpart to frr_init and frr_late_init. Unfortunately, some daemons don't do any exit handling, this doesn't change that just yet. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-11nhrpd: fixes for clang scan-build issuesJorge Boncompte
Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
2017-08-10nhrpd: fix issues found by coverityJorge Boncompte
Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
2017-08-09Merge pull request #911 from opensourcerouting/non-recursive-2Donald Sharp
more non-recursive build, fix cross-compile, & doc build mangling
2017-08-04build: non-recursive nhrpdDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-04nhrp: fix assertion with negative holding timesJorge Boncompte
Correctly reset status or we later assert at nhrp_cache_free(). Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
2017-08-04nhrp: fix initialization and route redistribution registrationJorge Boncompte
nhrpd wasn't registering correctly with zebra for route redistribution. It wasn't neither parsing the right messages nor parsing them correctly too. Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
2017-08-04nhrp: initialize interfaces after VRFsJorge Boncompte
Interfaces depend logically of VRF, initialize one after another just in case in the future someone adds something to this functions. Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
2017-07-14nhrpd: enable -WerrorDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14*: fix GCC 7 warnings/issuesDavid Lamparter
The label initializer & nhrpd variable are just to shut up GCC 7, the other two are actual bugs. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>