Clean up compiler warnings; convert a linklist macro
to an inline to resolve one; clean up a side-effect in isisd.
Signed-off-by: Mark Stapp <mjs@cisco.com>
The `_once` loop variable will result in a `-Wshadow` warning when that
is turned on. Use `__COUNTER__` to give these variables distinct names,
like is already done with `_mtx_`.
(and because I touched it, clang-format wants it reformatted... ohwell.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit fixes two types of problems:
a) Avoidance of cleaning up memory when a instance is
hidden, thus causing it never to be freed on shutdown
b) In some instances bgp_create is called 2 times
for some code. We are double allocating memory
and dropping it on the second allocation.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
According to [RFC 2332, Section 5.1], if an NHS receives a packet that it would normally forward and the hop count is zero, it must send an error indication back to the source and drop the packet.
Signed-off-by: zmw12306 <zmw12306@gmail.com>
Currently, when the locator block and sid block differs, staticd would
still go ahead and request zebra to allocate the SID which it does if
there is atleast one match (from any locators).
Only when staticd tries to install the route, it sees that the locator
block and sid block are different and avoids installing the route.
Fix:
Check if the locator block and sid block match before even requesting
Zebra to allocate one.
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
A router-id MUST NOT consist of either all binary zeroes (0000000000000000 hexadecimal) or all binary ones (FFFFFFFFFFFFFFFF hexadecimal).
Signed-off-by: zmw12306 <zmw12306@gmail.com>
When all feasible routes to a destination are lost, but unexpired unfeasible routes exist, the node MUST send a seqno request to prevent starvation.
Signed-off-by: zmw12306 <zmw12306@gmail.com>
Modify route selection to check feasibility first, then fall back to non-feasible routes as per SHOULD requirement.
Signed-off-by: zmw12306 <zmw12306@gmail.com>
Section 4.1 of RFC8955 defines how the length field of flowspec NLRIs is encoded.
The method use implies a maximum length of 4095 for a single flowspec NLRI.
However, in bgp_flowspec.c, we check the length attribute of the bgp_nlri structure against this maximum value, which actually is the *total* length of all NLRI included in the considered MP_REACH_NLRI path attribute.
Due to this confusion, frr would reject valid announces that contain many flowspec NLRIs, when their cummulative length exceeds 4095, and close the session.
The proposed change removes that check entirely. Indeed, there is no need to check the length field of each invidual NLRI because the method employed make it impossible to encode a length greater than 4095.
Signed-off-by: Stephane Poignant <stephane.poignant@proton.ch>