bgpd: clean up lp_release apiUse typed apis for the various structs that can release labels;
move the generic release code to a private common helper.
Signed-off-by: Mark Stapp <mjs@cisco.com>
mgmtd: add be client loopback connectionWhile we need to special case configuration handling (b/c the user changes
from the front end actually occur in mgmtd prior to sending to backends), we do
not need to special case handling of oper state and RPCs, so create a mgmtd
loopback connection to handle oper-state and RPCs.
Signed-off-by: Christian Hopps <chopps@labn.net>
lib: move `clear log cmdline-targets` to YANG RPCThis was being handled by vty to each daemon, but the correct way this should be
handled now is with YANG RPCs, so move to that.
Signed-off-by: Christian Hopps <chopps@labn.net>
zebra: Use zebra dplane for RTM neighbor message1) Move handling of RTM_NEWNEIGH, RTM_DELNEIGH, and RTM_GETNEIGH from
direct kernel_netlink processing to the dplane framework.
2) Refactor netlink_macfdb_change and netlink_ipneigh_change to populate
dplane contexts and enqueue them to zebra for processing.
3) Add zebra_neigh_dplane_update() in zebra_neigh.c to handle both IP and
MAC neighbor updates based on the opcode stored in the dpl...
zebra: Move neighbor handling helpers from rt_netlink.c to zebra_neigh.cRefactor neighbor handling helpers by relocating them
from rt_netlink.c to zebra_neigh.c.
1) Move functions for handling IPv4 link-local neighbor entries
(5549 support) to zebra_neigh_handle_5549.
2) Move helper functions is_mac_vni_mcast_group and
zebra_nbr_entry_state_to_zclient to zebra_neigh.c.
3) Static helper variables (e.g., ipv4_ll_buf) are defined in
zebra_neigh.c to support the...
lib: remove zlog tmp dirs by default at exitRemove zlog temp dirs for each process by default,
unconditionally. Split the tmp dir removal into its own
function so it can be called very very late during exit.
Signed-off-by: Mark Stapp <mjs@cisco.com>
tests: pim_autorp test luckily succeedsThe pim_autorp test is succeeding by luck as that
the 10.0.1.3 autorp is supposed to take over. The
10.0.0.2 one is supposed to go away. The test is
succeeding `most` of the time because 10.0.0.2 takes
5 seconds to time out. Under heavy load the timeout
does happen.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
pimd: Consolidate setting hold timeThe holdtime was not being set in the existing case
so let's do that.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra: Add code to get/set neighbor to pass up from dplaneIntroduce a set of accessor and mutator functions in
zebra_dplane.c and zebra_dplane.h for both MAC and neighbor
information within the dplane context.
1) Add functions to get and set MAC attributes: address, VLAN ID,
VNI, NHG ID, dst_present, sticky flag, VTEP IP, local_inactive,
dp_static, NDM state and flags.
2) Add functions to get and set neighbor attributes: IP address,
MAC, extern...
tests: Ensure that test_bgp_lu.py correctly waits for convergenceThe test was incorrectly issuing a `clear bgp ...` command and
then immediately checking the final results. If the clear
command was setup for future processing and the next show
command immediately comes in, then the test was not testing
what it thought it was. Modify the code to actually wait
for the clear to be processed and the peer to be back up.
Signed-off-by: Donald Sharp <sharpd@nvid...
bgpd: Release label from dest copy once freedWhen bgp is using a labelpool and is registering
to use a label, it requests one from the pool and then
stores the label directly on the dest for easier
lookup. When a clear is issued( or really ) anything
that would cause the dest to have no path_info's anymore
the label was released to the label pool, but the label
value was still being stored on the dest. Thus when
a new path_info is recei...
lib: poison json_object_object_get()Looks like this api is deprecated in some json-c versions;
try to poison it to prevent accidental use in FRR.
Signed-off-by: Mark Stapp <mjs@cisco.com>
pbrd: fix crash for inconsistent statusAfter `pbr_nht_add_individual_nexthop()` created the nghc, it did nothing
in the case of exhausted case ( by default 1000 pbrm's nexthops ). Then
it will enter into the inconsistent/bad status:
`pbrms` is with name but not in hash table.
`assert()` of checking this bad status is triggered later just as coredump
stack shows.
So just move the exhausted checking before creating the nhgc, and giv...
pbrd: cosmetic change for one nameTwo cosmetic changes:
- Use the obtained `pbrms->internal_nhg_name` instead of reconstructing it.
- Remove the unnecessary assignment of `pbrms->internal_nhg_name`.
Signed-off-by: anlan_cs <anlan_cs@126.com>
zebra: Add to `show int ..` if BGP configed RA or notAdd to the `show int XXX` command whether or not
BGP has configured RA for the interface or not.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: fitler results so new modules don't break testWhen new modules are added to mgmtd the ietf-yang-library output will
change, instead let's just pick 3 main keys one oper-only (frr-backend), one
config-only (frr-logging) and one that has both (frr-interface).
Signed-off-by: Christian Hopps <chopps@labn.net>
doc: Add a table entry for backup nexthops to the Feature MatrixCurrently BackupNexthops do not work in the linux/*BSD data planes.
It is required that a NOS implement it in their own way in some fashion
and this is not currently done.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra: Track whether or not the dplane can use backup nexthopsCurrently FRR has no ability to understand if the underlying
dplane has the ability to use backup nexthops. Currently
in the linux kernel the answer is `no`. But we have people
trying to use it as such. Let's start the adding of breadcrumbs
so that end operators can figure this out.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
*: Convert proto_redistnum to return a uint8_tThere are places that we are playing fast and loose
with signed -vs- unsigned integers. Let's convert
proto_redistnum to only return a uint8_t. Find
and fix all the places that matter. This was
found by coverity.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
lib: Add and use `ZEBRA_ROUTE_ERROR`The route_types is returning -1 which is not something
that should be returned. Let's return a ZEBRA_ROUTE_ERROR
to formally signify that something has gone wrong.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
doc: Show proper amount of ecmp needed for tests nowTests are starting to need to be compiled with a decent amount
of ecmp turned on. Let's document this.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tools: On startup/shutdown move bfdd earlier/laterBFDD is a daemon that is used by other daemons for
connectivity. On startup, move bfdd to immediately
after zebra so that it can be up and running earlier.
On shutdown, move it such that it is told to shutdown
after the daemons who are possibly using it so that
we don't end up with any weird race conditions on
bfdd notifications from zebra that the daemon
has lost connectivity.
Signed-off-by:...
nhrpd: hash_create does not failTesting that hash_create worked or not makes no sense,
as that a malloc failure crashes.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>