summaryrefslogtreecommitdiffstats
path: root/nhrpd/nhrp_peer.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: Replace hash_cmp function return value to a boolDonald Sharp2018-10-191-1/+2
| | | | | | | | | 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>
* nhrpd: missing operand addedF. Aragon2018-09-131-2/+3
| | | | | | Detected using -Wgnu-conditional-omitted-operand Signed-off-by: F. Aragon <paco@voltanet.io>
* *: fix config.h/zebra.h include orderDavid Lamparter2018-09-081-0/+4
| | | | | | | | 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>
* *: ALLOC calls cannot failDonald Sharp2018-08-111-12/+12
| | | | | | | | 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>
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-061-165/+242
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* nhrpd: Add hash table namesDonald Sharp2017-09-051-1/+3
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* nhrpd: fix issues found by coverityJorge Boncompte2017-08-101-1/+5
| | | | Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
* *: fix GCC 7 switch/case fallthrough warningsDavid Lamparter2017-07-141-1/+3
| | | | | | Need a comment on these. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: update hash_create(), hash_create_size()Quentin Young2017-07-021-1/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* nhrp: improve CIE prefix length handlingTimo Teräs2017-05-181-3/+8
| | | | | | | | | | | RFC2332 states that prefix length MUST be 0xff for unique bindings. However, it seems at least some Cisco firmwares use host prefix length instead (which on wire level makes sense). Relax the handling of prefix length to treat all value longer than address length as 0xff. Additionally treat 0x00 the same way too, this is required by the RFC. This also fixes the prefix length address family to be checked against protocol address. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* *: remove THREAD_ON macros, add nullity checkQuentin Young2017-05-091-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way thread.c is written, a caller who wishes to be able to cancel a thread or avoid scheduling it twice must keep a reference to the thread. Typically this is done with a long lived pointer whose value is checked for null in order to know if the thread is currently scheduled. The check-and-schedule idiom is so common that several wrapper macros in thread.h existed solely to provide it. This patch removes those macros and adds a new parameter to all thread_add_* functions which is a pointer to the struct thread * to store the result of a scheduling call. If the value passed is non-null, the thread will only be scheduled if the value is null. This helps with consistency. A Coccinelle spatch has been used to transform code of the form: if (t == NULL) t = thread_add_* (...) to the form thread_add_* (..., &t) The THREAD_ON macros have also been transformed to the underlying thread.c calls. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* nhrp: fix potential crash when vici profile name is not configuredTimo Teräs2017-04-251-0/+2
|
* nhrp: fix protocol address family parsing on receiveTimo Teräs2017-04-251-9/+19
| | | | See bugzilla #948
* nhrpd: Fix value set but never used.Donald Sharp2017-03-311-1/+0
| | | | | | The nbma_addr value is set but never used. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* nhrpd: adapt to API changesDavid Lamparter2017-03-071-0/+2
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* nhrpd: implement next hop resolution protocolTimo Teräs2017-03-071-0/+860
This provides DMVPN support and integrates to strongSwan. Please read README.nhrpd and README.kernel for more details. [DL: cherry-picked from dafa05e65fe4b3b3ed5525443f554215ba14f42c] [DL: merge partially resolved, this commit will not build.] Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>