summaryrefslogtreecommitdiffstats
path: root/bgpd/subdir.am (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-06-06doc: Document RFC8212 under `Displaying BGP Information` sectionDonatas Abraitis1-1/+7
Looks like people don't find what does it mean (Policy) at first shot, let's try giving more hints here. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-05mgmtd: rm unused/unneeded code add couple commentsChristian Hopps6-123/+38
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-05ldpd: changes for code maintainabilitysri-mohan11-51/+40
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2023-06-05tests: mgmtd: add prologue to bigconf testsChristian Hopps3-4/+24
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-05tests: fix some broken loggingChristian Hopps5-100/+166
- make sure we close and remove all handlers for named logs on each reuse. - test module level exec.log no longer truncated to last test case output - cleanup the log names, and make sure they are present in all exec logs - keep separate exec logs for each pytest worker when running in distributed mode - disabled code due to CI infra can't handle it: add per test case exec logs Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-05mgmtd: Fix up some coverity issuesDonald Sharp1-2/+1
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-05bgpd: entry->any is never trueDonald Sharp3-88/+26
The only places entry->any could ever be set to true was when str was NULL. Unfortunately with the way our CLI works str is impossible to be NonNULL. The entry->any value *used* to work prior to commit e961923c7217b935027107cad30c35c3907c936f but it was changed back in 2016 and no-one has noticed the changed ability. Let's just admit that there are no users of this and remove this dead code. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-05tests: Rename a test to test_bgp_gr_functionality_topo3.pyDonald Sharp1-0/+0
Since the test was not named test_bgp_gr_functionality_topo3.py pytest was not picking it up to run. Let's run it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-05ldpd: changes for code maintainabilitysri-mohan12-37/+20
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2023-06-04tests: pause (with CLI) at step() functions when run with --pauseChristian Hopps1-0/+3
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-04lib: mgmtd: remove abstraction layer and other cleanupChristian Hopps3-345/+140
Code is no longer using a global FE "client context", and instead creates client objects, rename the structure and it's uses to reflect this. Remove an obfuscating abstraction layer whose existence was entirely based on using a uintptr_t rather than a pointer to an declared-only struct. Change multi-duty "params" structure into a single duty callbacks one. Remove unsupported API code. Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-04lib: mgmtd: remove obfuscating abstraction layer and other cleanupChristian Hopps3-468/+292
Remove an obfuscating abstraction layer whose existence was entirely based on using a uintptr_t rather than a pointer to an declared-only struct. As the code is no longer using a global FE "client context", and instead create client objects, rename the structure and it's uses to reflect this. Change init "params" structure into a single use callbacks one. Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-02bgpd: Give more data when state machine fails to change stateDonald Sharp1-3/+3
When a state machine transition fails, bgpd would output data about what happened, but not necessarily give the reason why. Add that data to the output. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01bgpd: Fix typo in debug messageanlan_cs1-3/+3
Cosmetic change for the debug messages, mainly on the parentheses. Before: ``` [ZJYCS-KQYD6] VRF vrf-debug(140): Rcvd NH update 50.50.50.0/24(0)0) - metric 300/300 #nhops 2/1 flags Valid Reg Static Static Exact [VZJVD-D7GXM] parse nexthop update(50.50.50.0/24(0)(VRF vrf-debug)): bnc info not found for nexthop cache [NSWTE-81HEK] parse nexthop update(50.50.201.0/31(0)(VRF vrf-debug)): bnc info not found for import check ``` After: ``` [ZJYCS-KQYD6] VRF vrf-debug(140): Rcvd NH update 50.50.50.0/24(0)(0) - metric 300/300 #nhops 2/1 flags Valid Reg Static Static Exact [VZJVD-D7GXM] parse nexthop update 50.50.50.0/24(0)(VRF vrf-debug): bnc info not found for nexthop cache [NSWTE-81HEK] parse nexthop update 50.50.201.0/31(0)(VRF vrf-debug): bnc info not found for import check ``` Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-06-01tests: new mgmt_startup tests are failing due to insufficient timeDonald Sharp2-5/+5
The tests are failing due to heavily loaded system and insufficient time for large configs to be handled. Increasing the time allows the tests to complete locally for me under heavy load. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01eigrpd: dest_addr does not need to be set to NULLDonald Sharp1-3/+0
All paths of the loop set dest_addr at the start of the loop. No need to set it to NULL to immediately set it too something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01bgpd: vpn_policy_getafi can return AFI_MAXDonald Sharp1-0/+2
Let's account for vpn_policy_getafi having a failure situation and back out of the whole thing gracefully. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01bgpd: blnc cannot be NULL at if statement timeDonald Sharp1-7/+6
It is impossible for the blnc statement to ever be NULL at line 1470 as that the if statement at 1453 guarantees it to be set to something. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01zebra: Consolidate the stream_failure section with normal returnDonald Sharp1-2/+0
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01zebra: No need to set msg to NULLDonald Sharp1-2/+0
The msg value is always reset to something new before it is used inside the mutex. No need to set it to NULL. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01bgpd: community_list_set str is always non nullDonald Sharp2-8/+8
When calling community_list_set the str variable is always non NULL. As such let's treat it as such. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01tests: re-style isis_sr_flex_algo_topo1Louis Scalbert1-60/+81
Re-style isis_sr_flex_algo_topo1. Cosmetic change. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-01isisd: fix wrongly disabled flex-algoLouis Scalbert1-7/+21
A configured flex-algo algorithm may remain in disabled state after its definition is advertised on the area. It happens sometimes that, in isis_sr_flex_algo_topo1 topotest step 4 or 8, flex-algo 203 is disabled. It depends on the following sequence: 1. Flex-algo 203 is configured on a remote router to be re-advertised. 2. A LSP is received on the local router and contains the algo 203 definition. 3. The local router re-builds its own LSP with lsp_build(). 4. local router isis_run_spf() recomputes the algo 203 SPF tree. A 1. 2. 3. 4. sequence results in a working test. The reception of the remote LSP (2.) does not trigger the built of the local LSP. If for some reasons, the sequence is 1. 3. 4. 2. 4., isis_run_spf() will not knows that flex-algo 203 has been re-enabled because flex_algo_get_state() only returns the state from the local LSP. Compare in sequence step 4. the flex-algo state from the local LSP with the actual state. If the state is not the same, request a new local LSP generation and quits the re-computation of algo SPF tree. The SPF tree will be recomputed just after the built of the local LSP. Fixes: 3f55b8c621 ("isisd: fix disabled flex-algo on race condition") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-01tests: fix mpls table check in isis_sr_flex_algo_topo1Louis Scalbert1-1/+28
Some test steps result in removing some entries in the MPLS forwarding table. However, these steps pass before the entries are actually removed. Use the exact JSON comparison so that the removal of the entries is checked. Fixes: 1a61ef95b2 ("tests: add isis_sr_flex_algo_topo1 for flex-algo") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-01zebra: Unlock the route node when sending route notificationsDonald Sharp2-5/+18
When using a context to send route notifications to upper level protocols, the code was using a locking function to get the route node. There is no need for this to be locked as such FRR should free it up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-01ldpd: changes for code maintainabilitysri-mohan11-39/+33
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2023-05-31ospf6d: Prevent redundant LSA generation before interface goes downDavid Ward1-1/+0
Commit 76249532faad ("ospf6d: Handle Premature Aging of LSAs") added a duplicate call to OSPF6_INTRA_PREFIX_LSA_EXECUTE_TRANSIT(), when the interface state changes to "Down". Fixes: #1738 Signed-off-by: David Ward <david.ward@ll.mit.edu>
2023-05-31lib: fix vtysh core when handling questionmarkYuan Yuan1-2/+6
When issue vtysh command with ?, the initial buf size for the element is 16. Then it would loop through each element in the cmd output vector. If the required size for printing out the next element is larger than the current buf size, realloc the buf memory by doubling the current buf size regardless of the actual size that's needed. This would cause vtysh core when the doubled size is not enough for the next element. Signed-off-by: Yuan Yuan <yyuanam@amazon.com>
2023-05-31doc: Update reference table for current and upcoming release datesDonatas Abraitis1-9/+9
Keep only 3 release dates, current and two upcoming. On the next release, just update one, instead of multiple (zero point looking too much in the future). Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-05-31mgmtd: xpath is already NULL in the failure pathDonald Sharp1-9/+2
There is no way that xpath can ever be anything but NULL in the failure path with the goto's. Let's just remove the goto's and return immediately. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-05-31bgpd: fix bgpd core when unintern attrYuan Yuan1-0/+4
When the remote peer is neither EBGP nor confed, aspath is the shadow copy of attr->aspath in bgp_packet_attribute(). Striping AS4_PATH should not be done on the aspath directly, since that would lead to bgpd core dump when unintern the attr. Signed-off-by: Yuan Yuan <yyuanam@amazon.com>
2023-05-31ospfd, ospf6d: fix time_t truncationRenato Westphal4-4/+5
Change timestamp parameter from int to time_t to avoid truncation. Found by Coverity Scan (CID 1563226 and 1563222) Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-05-30tests: Actually loop if ping failsDonald Sharp1-1/+2
The usage of run_and_expect doesn't work if the function being called as the run part asserts. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-05-30mgmtd: fix possible race btw read config and backend connectionChristian Hopps2-42/+9
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30zebra: use ifindex vs ifp to avoid use-after-free on shutdownChristian Hopps2-7/+17
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30zebra: avoid unneeded vxlan work on shutdownChristian Hopps1-1/+3
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30tests: add unified config testsChristian Hopps8-197/+311
- simple unified test - unified test with late backend startup test Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30pim6d: Fix crash in ipv6 pim commandSarita Patra1-3/+5
Problem: Execute the below commands, pim6d core happens. interface ens193 ip address 69.0.0.2/24 ipv6 address 8000::1/120 ipv6 mld ipv6 pim We see crash only if the interface is not configured, and we are executing PIM/MLD commands. RootCause: Interface ens193 is not configured. So, it will have ifindex = 0 and mroute_vif_index = -1. Currently, we don't enable MLD on an interface if mroute_vif_index < 0. So, pim_ifp->MLD = NULL. In the API pim_if_membership_refresh(), we are accessing pim_ifp->MLD NULL pointer which leads to crash. Fix: Added NULL check before accessing pim_ifp->MLD pointer in the API pim_if_membership_refresh(). Issue: #13385 Signed-off-by: Sarita Patra <saritap@vmware.com>
2023-05-30mgmtd: address review commentsChristian Hopps4-14/+8
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30mgmtd: fix clang uninit warningChristian Hopps1-1/+3
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30tests: add some more mgmtd testsChristian Hopps8-0/+418
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30mgmtd: cleanup BE xpath subscription and matching codeChristian Hopps5-241/+261
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30lib: mgmtd: fix memleaksChristian Hopps3-2/+7
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30lib: mgmtd: add manual vty server start option and use itChristian Hopps6-21/+44
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30lib: mgmtd: fixes for startup config file processingChristian Hopps5-51/+136
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30mgmtd: Add note to SETCFG_REQ and debug loggingChristian Hopps1-2/+11
- convert impossible situation into assert Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30mgmtd: simplify early config build removing unused codeChristian Hopps4-181/+74
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30mgmtd: fix reading of config file[s]Christian Hopps8-86/+211
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-28lib, zebra: Ensure that the ifp->node existsDonald Sharp2-0/+4
On removal, ensure that the ifp->node is set to a null pointer so that FRR does not use data after freed. In addition ensure that the ifp->node exists before attempting to free it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-05-28pimd: When doing json output do not output non-json stringsDonald Sharp1-2/+2
When entering some show commands that use json in pimd when the interface cannot be found do not output non-json format in that case. Signed-off-by: Donald Sharp <sharpd@nvidia.com>