When implementing the bgp_packet_mpunreach_prefix a uint8_t array
of 3 bytes was created and then assigned to a label type, which
is 4 bytes and then various pointer work is done on it. Eventually
coverity is complaining that the 3 -vs- 4 bytes is not enough
to properly dereference it. Just make the uint8_t 4 bytes
and be done with it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Coverity believed that the bodylen value was read directly
from the incoming packet and then used as a loop variable.
Unfortunately it missed the fact that in babel_packet_examin
the bodylen was actually checked to ensure that it was long
enough. So instead of checking it 2 times, generate it one
time and let coverity figure it out from that.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_dump.h has function declarations that are
not properly aligned with our standard on how
to do so. Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_debug.h has function declarations that are
not properly aligned with our standard on how
to do so. Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_damp.h has function declarations that are
not properly aligned with our standard on how
to do so. Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_community.h has function declarations that are
not properly aligned with our standard on how
to do so. Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_clist.h has function declarations that are
not properly aligned with our standard on how
to do so. Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_attr.h has function declarations that are
not properly aligned with our standard on how
to do so. Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_aspath.h has function declarations that are
not properly aligned with our standard on how
to do so. Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_advertise.h has function declarations that are
not properly aligned with our standard on how
to do so. Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_zebra.h has function declarations that are
not properly aligned with our standard on how
to do so. Fix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The bgp_mpath.h file was missing some variable names. Let's
add them in to align with our standard for header files.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The maxpaths same_clusterlen value was a uint16_t
with a single bit being used. No other values are
being stored. Let's remove the bitfield and simplify
to a bool.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The `bgp no-rib` command cycles through all the bgp rib tables
and removes them from zebra. Modify the code so that FRR notices
that it is attempting to cycle through the safi's that are two level
tables. In addition these safi's cannot just blindly remove the routes
from the rib as that there are none explicitly.
This code just prevents the crash in bgpd. It does not properly cycle
through and remove the zebra changes made that are explicit to these afi's.
This should be handled as appropriate by the developers on these safi's when
it becomes important to them.
Fixes: #11178
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
description:
BMP Per Peer Headers of Route Monitoring messages with UPDATE and
WITHDRAW notificatiosn ( not the sync ones at Initiation) are
all typed as POST POLICY.
fix:
notify Pre policy UPDATES AND WITHDRAWS with Per Peer Header type set
to PRE POLICY (0)
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
In current code, `build_evpn_type2_prefix()` doesn't distinguish ARP
according to the `ip` parameter. The `ip` parameter from caller is
always non-NULL.
Be consistent and not confused, just remove the unnecessary check.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
The "add" parameter of `bgp_evpn_mh_route_update()` makes no sense.
Just remove it to clarify this function, and remove the relevant check
with "add" as well.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
When `bgp_evpn_new()` is called, the `bgp` parameter MUST be non-NULL,
remove this unnecessary check and remove the NULL check for returned
`struct bgpevpn *`, which should be non-NULL.
And modify `import_rt_new()` in the same way.
Signed-off-by: anlan_cs <vic.lan@pica8.com>