summaryrefslogtreecommitdiffstats
path: root/nhrpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: don't null after XFREE; XFREE does this itselfQuentin Young2020-02-032-2/+0
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* doc: rename man pages to frr-*David Lamparter2020-01-151-1/+1
| | | | | | | | The vrrpd one conflicts with the standalone vrrpd package; also we're installing daemons to /usr/lib/frr on some systems so they're not on PATH. Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #5590 from qlyoung/fix-nhrp-underflowJafar Al-Gharaibeh2020-01-151-2/+4
|\ | | | | nhrpd: offset value not checked for min size
| * nhrpd: offset value not checked for min sizeQuentin Young2020-01-151-2/+4
| | | | | | | | | | | | | | | | If the extension offset points to a location within the packet header, we end up with an integer underflow leading to heap buffer read overflow. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #5528 from opensourcerouting/bmp-dns-fixingDonald Sharp2019-12-111-2/+2
|\ \ | | | | | | BMP: improve active outbound connection details
| * | lib,nhrpd,bgpd/bmp: pass resolver failure detailsDavid Lamparter2019-12-111-2/+2
| |/ | | | | | | | | | | | | | | To keep the calling code agnostic of the DNS resolver libary used, pass a strerror-style string instead of a status code that would need extra handling. Signed-off-by: David Lamparter <equinox@diac24.net>
* / lib: rename memory_vty.c to lib_vty.cDavid Lamparter2019-12-061-1/+0
|/ | | | | | And memory_init() to lib_cmd_init(). Signed-off-by: David Lamparter <equinox@diac24.net>
* *: generously apply constDavid Lamparter2019-12-021-1/+1
| | | | | | const const const your boat, merrily down the stream... Signed-off-by: David Lamparter <equinox@diac24.net>
* *: make frr_yang_module_info constDavid Lamparter2019-11-301-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: Convert connected_free to a double pointerDonald Sharp2019-11-021-1/+1
| | | | | | Set the connected pointer to set the pointer to NULL. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* nhrp: Make sure `no ip nhrp map <something>` works as expectedDonatas Abraitis2019-10-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | We passed peer as NULL and nothing happened. exit2-debian-9# conf exit2-debian-9(config)# int gre1 exit2-debian-9(config-if)# ip nhrp map 1.1.1.1 local exit2-debian-9(config-if)# ip nhrp map 2.2.2.2 3.3.3.3 exit2-debian-9(config-if)# do sh run ... ! interface gre1 ip nhrp map 1.1.1.1 local ip nhrp map 2.2.2.2 3.3.3.3 ! ... exit2-debian-9(config-if)# no ip nhrp map 1.1.1.1 exit2-debian-9(config-if)# do sh run ... ! interface gre1 ip nhrp map 2.2.2.2 3.3.3.3 ! Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* nhrpd: clean up SA warningMark Stapp2019-10-172-5/+6
| | | | | | | Try to signal to SA/clang more clearly to clean up an SA warning in the nhrp-specific linkedlist code. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* nhrpd: be more careful with linked listsMark Stapp2019-10-162-3/+6
| | | | | | | | NHRPD has its own linked-list implementation, and one of the apis is a little free and easy with pointers. Also be safer with one list iteration operation. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* *: Convert zapi->interface_delete to ifp callbackDonald Sharp2019-09-192-17/+1
| | | | | | | Convert the callback of the interface_delete to the new ifp callback. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert interface_down to interface down callbackDonald Sharp2019-09-192-13/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert from ->interface_up to the interface callbackDonald Sharp2019-09-192-13/+1
| | | | | | | For all the places we have a zclient->interface_up convert them to use the interface ifp_up callback instead. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Switch all zclient->interface_add to interface create callbackDonald Sharp2019-09-192-14/+1
| | | | | | | Switch the zclient->interface_add functionality to have everyone use the interface create callback in lib/if.c Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Add infrastructure to support zapi interface callbacksDonald Sharp2019-09-193-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | Start the conversion to allow zapi interface callbacks to be controlled like vrf creation/destruction/change callbacks. This will allow us to consolidate control into the interface.c instead of having each daemon read the stream and react accordingly. This will hopefully reduce a bunch of cut-n-paste stuff Create 4 new callback functions that will be controlled by lib/if.c create -> A upper level protocol receives an interface creation event The ifp is brand spanking newly created in the system. up -> A upper level protocol receives a interface up event This means the interface is up and ready to go. down -> A upper level protocol receives a interface down destroy -> A upper level protocol receives a destroy event This means to delete the pointers associated with it. At this point this is just boilerplate setup for future commits. There is no new functionality. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: split off c-ares code from nhrpdDavid Lamparter2019-07-036-233/+3
| | | | | | This is useful in other places too, e.g. for BMP outbound connections. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Revert "Ospf missing interface handling 2"Donald Sharp2019-06-241-2/+1
|
* *: change if_lookup_by_name() api with vrfPhilippe Guibert2019-06-121-1/+2
| | | | | | | | | | the vrf_id parameter is replaced by struct vrf * parameter. this impacts most of the daemons that look for an interface based on the name and the vrf identifier. Also, it fixes 2 lookup calls in zebra and sharpd, where the vrf_id was ignored until now. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* lib,bgpd,babeld,ripngd,nhrpd,bfdd: clean up SA warningsMark Stapp2019-06-061-2/+2
| | | | | | Clean up several SA warnings. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* lib: hashing functions should take const argumentsQuentin Young2019-05-144-8/+8
| | | | | | | | | | It doesn't make much sense for a hash function to modify its argument, so const the hash input. BGP does it in a couple places, those cast away the const. Not great but not any worse than it was. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use ZAPI_CALLBACK_ARGS macro for zapi handlersQuentin Young2019-05-033-34/+20
| | | | | | | | | | | | This macro: - Marks ZAPI callbacks for readability - Standardizes argument names - Makes it simple to add ZAPI arguments in the future - Ensures proper types - Looks better - Shortens function declarations Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: ZEBRA_NUM_OF -> array_sizeDavid Lamparter2019-04-184-6/+6
| | | | | | The latter is widely used, e.g. in the Linux kernel. Signed-off-by: David Lamparter <equinox@diac24.net>
* bfdd, nhrpd, pimd: When deleting an interface clean upDonald Sharp2019-03-291-2/+4
| | | | | | | | | | | When we delete an interface, we need to set the interface ifindex to an internal value so that we don't end up in a state where the re-addition of the same ifindex, due to a rename operation, causes an infinite loop. Fixes:#4007 Fix-Suggested-by: Saravanan K Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: compare pointer types to NULL, not 0Quentin Young2019-02-261-2/+2
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: Rename backet to bucketTim Bray2019-02-252-2/+2
| | | | | | Presume typo from original author Signed-off-by: Tim Bray <tim@kooky.org>
* build: fix a whole bunch of *FLAGSDavid Lamparter2019-01-301-2/+2
| | | | | | | | | - some target_CFLAGS that needed to include AM_CFLAGS didn't do so - libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all - consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@ - 2 dependencies were missing for clippy Signed-off-by: David Lamparter <equinox@diac24.net>
* *: Replace zclient_new with zclient_new_notifyDonald Sharp2018-11-121-1/+1
| | | | | | | It's been a year since we added the new optional parameters to instantiation. Let's switch over to the new name. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* yang, lib: add 'frr-interface.yang' and associated stub callbacksRenato Westphal2018-10-271-0/+1
| | | | | | | | | | | | | Introduce frr-interface.yang, which defines a model for managing FRR interfaces. Update the 'frr_yang_module_info' array of all daemons that will implement this module. Add automatically generated stub callbacks in if.c. These callbacks will be implemented in the following commit. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: add empty array of YANG modulesRenato Westphal2018-10-271-1/+5
| | | | | | | | | | FRR_DAEMON_INFO should now contain an array of 'frr_yang_module_info' structures describing the YANG modules implemented by the daemon. This array will be used by frr_init() function to load all YANG modules and initialize the northbound callbacks during the daemon initialization. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: Replace hash_cmp function return value to a boolDonald Sharp2018-10-194-4/+9
| | | | | | | | | The ->hash_cmp and linked list ->cmp functions were sometimes being used interchangeably and this really is not a good thing. So let's modify the hash_cmp function pointer to return a boolean and convert everything to use the new syntax. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: style for EC replacementsQuentin Young2018-09-132-10/+14
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* nhrpd: NHRP_[ERR|WARN] -> EC_NHRPQuentin Young2018-09-134-9/+9
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* nhrpd: missing operand addedF. Aragon2018-09-131-2/+3
| | | | | | Detected using -Wgnu-conditional-omitted-operand Signed-off-by: F. Aragon <paco@voltanet.io>
* Merge pull request #2977 from opensourcerouting/doc-fixDonald Sharp2018-09-091-1/+1
|\ | | | | build: fix not building docs w/o sphinx
| * build: fix not building docs w/o sphinxDavid Lamparter2018-09-091-1/+1
| | | | | | | | | | | | Can't build manpages without sphinx-build, oops... Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: fix config.h/zebra.h include orderDavid Lamparter2018-09-0814-1/+56
|/ | | | | | | | config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: cleanup .gitignore filesDavid Lamparter2018-09-081-1/+0
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* build: move vtysh & manpage listings to subdir.amDavid Lamparter2018-09-081-0/+2
| | | | | | | Since we're now building through one large Makefile, we can easily put things with their daemons and crossreference nicely. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: add a vrf update hook to be informed of the vrf namePhilippe Guibert2018-08-281-1/+1
| | | | | | | | 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>
* *: rename ferr_ref -> log_refQuentin Young2018-08-142-3/+3
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: rename zlog_fer -> flog_errQuentin Young2018-08-142-5/+5
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: stop double initialization of ferrQuentin Young2018-08-141-2/+0
| | | | | | | | * Stop double init of ferr * Fixup bugs in zebra ferr * Add missing init in ospfd Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: fix source file headers & includes for errcodesQuentin Young2018-08-142-21/+24
| | | | | | | | | | * 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>
* nhrpd: Add NHRP_ERR_XXXX for zlog_err to zlog_ferr conversionDonald Sharp2018-08-146-12/+102
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: ALLOC calls cannot failDonald Sharp2018-08-116-39/+29
| | | | | | | | 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>
* Merge pull request #2609 from pacovn/clang_scan_nhrpd_vici_initializationDonald Sharp2018-07-031-1/+1
|\ | | | | nhrpd: uninitialized variable (Clang scan)
| * nhrpd: uninitialized variable (Clang scan)F. Aragon2018-07-021-1/+1
| | | | | | | | | | | | | | Fix over 0a939f4f24fa34fea688482fbf57fb16eaf2a081 (there was a case not covered by previous fix) Signed-off-by: F. Aragon <paco@voltanet.io>