Commit Graph

32667 Commits

Author SHA1 Message Date
Donatas Abraitis
3895ea777b
Merge pull request #13762 from anlancs/doc/pthread-typo
doc: Adjust pthread description
2023-06-12 11:13:49 +03:00
Christian Hopps
dac48df52a tests: add mgmtd config test
Testing early exits/ends from config files loaded with `vtysh -f cfgfile`
as well as `vtysh < cfgfile`, verify the same as non-mgmtd behavior.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-12 03:23:51 -04:00
Christian Hopps
79d40972fd lib: mgmtd: fix/stdize debug message macros
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-12 02:32:29 -04:00
Christian Hopps
f0fa4c0370 mgmtd: remove unused code
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-12 02:32:29 -04:00
Christian Hopps
0fc08fa738 lib: mgmtd: session create and destroy both short-circuit
For creation this is the first thing done so short-circuit just means inline
sync response. However, for destroy there could be commands in-flight, these
will be discarded when they match no session, and the state cleaned up
immediately when the message short-circuits.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-12 02:32:29 -04:00
Christian Hopps
4307fdd070 lib: mgmtd: avoid recursion with vty_close and add error log
Avoid recursion into vty_close() when being notified of a session closure that
happened inside vty_close().

If a vty is closed with outstanding config yet to be commited
issue a warning that it is being lost.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-12 02:32:29 -04:00
Christian Hopps
315e9032e4 vtysh: stop reading config file if user exits from root level.
This is required to make sure that we properly send the
XFRR_end_configuration tag to the daemons. Previously if the user had an
`exit` at the root level the parser would just drop out of the config
node and so XFRR_end_configuration, even if sent, would be ignored

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-12 02:32:29 -04:00
Christian Hopps
f7a2c2ab5a staticd: staticd no longer loads config files
We need to ignore SIGHUP rather than reload config now.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-12 02:02:18 -04:00
anlan_cs
eb678efed8 doc: Adjust pthread description
Refer to the latest code, modified the description of pthread.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-06-12 13:01:46 +08:00
Abhishek N R
0140d07739 pim6d: Correcting the help string
Max response time in the code is being used as decisecond but the user input is taken in millisecond.
Also yang expects the field to be in decisecond.
The below condition in yang is failing due to the mismatch in units.

```
units deciseconds;
must ". <= ../query-interval * 10";
```

Issue: #11892

Signed-off-by: Abhishek N R <abnr@vmware.com>
2023-06-11 21:54:24 -07:00
Donatas Abraitis
b65f3326b3
Merge pull request #13752 from donaldsharp/fix_suppress_fib_test
tests: Fix missing assert for test case in bgp_suppress_fib
2023-06-11 21:40:09 +03:00
Igor Ryzhov
5b28833d38
Merge pull request #13675 from zmw12306/bfd_version_check
bfd:fix version bits check
2023-06-11 14:16:50 +03:00
Donatas Abraitis
6a6c31ecdf
Merge pull request #13743 from LabNConsulting/chopps/docker-ci-update
docker: ubuntu-ci 18.04 -> 22.04, topotest parallel run examples
2023-06-11 14:13:14 +03:00
mobash-rasool
a19aa56b95
Merge pull request #13727 from anlancs/pimd/cleanup-1
pimd: adjust the display for debug
2023-06-09 22:30:44 +05:30
G. Paul Ziemba
9e5c9e6d65 zebra: bugfix dplane priority sorting
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2023-06-09 06:58:20 -07:00
Donald Sharp
ae88ba4b52 tests: Fix missing assert for test case in bgp_suppress_fib
Test was attempting to test the 60.0.0.0 route but was querying
10.0.0.3 and ignoring the result.  Let's fix it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-09 09:25:29 -04:00
Christian Hopps
3c43eaa7d4 docker: ubuntu-ci 18.04 -> 22.04, topotest parallel run examples
Update the READMEs, and give example of a full parallel topotest run with
result extraction for analyze.py

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-09 03:19:20 -04:00
Christian Hopps
1a60c3e9a4
Merge pull request #13745 from FRRouting/revert-13509-bgp_nht_other_if_cases
Revert "bgpd: upon if up event, evaluate bnc with matching nexthop"
2023-06-09 03:07:07 -04:00
Jafar Al-Gharaibeh
e48e92e76c
Merge pull request #13734 from LabNConsulting/chopps/removeunused
remove mentions of socat
2023-06-08 23:46:45 -05:00
Jafar Al-Gharaibeh
d908ec51de
Merge pull request #13739 from donaldsharp/zebra_dplane_crash
zebra: Prevent crash because nl is NULL on shutdown
2023-06-08 23:44:55 -05:00
Donald Sharp
b295810d00
Revert "bgpd: upon if up event, evaluate bnc with matching nexthop" 2023-06-08 23:17:53 -04:00
Jafar Al-Gharaibeh
e631541b68
Merge pull request #13730 from anlancs/doc/thread-event-typo
doc: Adjust event system
2023-06-08 16:02:59 -05:00
Jafar Al-Gharaibeh
f34076da81
Merge pull request #13596 from Pdoijode/pdoijode/ospf-intf-json-changes
ospfd: json hierarchy change for "show ip ospf interface json"
2023-06-08 14:03:14 -05:00
Donatas Abraitis
d6878aacef
Merge pull request #13509 from pguibert6WIND/bgp_nht_other_if_cases
bgpd: upon if up event, evaluate bnc with matching nexthop
2023-06-08 20:19:48 +03:00
Donatas Abraitis
ff73a7bdbe
Merge pull request #13664 from routingrocks/pim_nb_fix
pimd: Change in PIM northbound error, when a path to RP is not found …
2023-06-08 20:16:32 +03:00
Donatas Abraitis
f158bb770d
Merge pull request #13364 from zmw12306/bfd_auth
bfd: fix missing Authentication in control pkt
2023-06-08 20:12:29 +03:00
Quentin Young
cb827d9f55
Merge pull request #13650 from opensourcerouting/feature/bgpd_default_originate_route_map_timer
bgpd: Add an ability to control default-originate route-map timer
2023-06-08 12:05:35 -04:00
Donald Sharp
977d7e24ff zebra: Prevent crash because nl is NULL on shutdown
When shutting down the main pthread was first closing
the sockets associated with the dplane pthread and
then telling it to shutdown the pthread at a later point
in time.  This caused the dplane to crash because the nl
data has been freed already.  Change the shutdown order
to stop the dplane pthread *and* then close the sockets.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-08 12:03:49 -04:00
Christian Hopps
1ee5a52d1b
Merge pull request #13645 from idryzhov/bfd-nb-destroy
bfdd: remove redundant nb destroy callbacks
2023-06-08 11:19:40 -04:00
Christian Hopps
17054f373e doc: update doc removing socat req + remove unused tests code
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-08 11:03:18 -04:00
Jafar Al-Gharaibeh
87d347e66d
Merge pull request #13726 from LabNConsulting/chopps/fixpim6topotest
tests: fixing pim6 topotest bugs
2023-06-08 08:47:15 -05:00
Christian Hopps
b28bc2561e tests: convert old pim test to more cleanly use pytest fixture
This is a good way to run a per-test background helper process. Here the
helper object is created before the test function requesting it (through param
name match), and then cleaned up after the test function exits (pass or failed).

A context manager is used to further guarantee the cleanup is done.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-08 04:55:32 -04:00
Christian Hopps
efedb18976 tests: fixing pim6 topotest bugs
- Remove use of bespoke socat
- Use ipv6 support in mcast-tester.py
- do not run processes in the background behind munet/micronet's
  back with `&` (ever) -- use popen or the helper class

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-08 04:55:32 -04:00
Donatas Abraitis
99bd15405c
Merge pull request #13421 from mobash-rasool/igmp-ups2
pimd, pim6d: re-arrange some code and pimv6 deletion flow fix
2023-06-08 10:46:38 +03:00
anlan_cs
82ff709263 doc: Adjust event system
Refer to the latest code, modify the description of event system.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-06-08 15:41:34 +08:00
Donatas Abraitis
1c7d8fa8c3
Merge pull request #13390 from ryndia/master
ospfd: ospf_route.c memory leak fix
2023-06-08 10:02:28 +03:00
Sarita Patra
49a6c85563 pim6d: "show ipv6 pim state" not displaying when OIL is empty
Problem:
-------
The cli "show ipv6 pim state" is not displaying when outgoing
interface list is empty.
This is fixed now.

Before Fix:
----------
frr# show ipv6 pim state json
{
  "ffaa::5":{
    "1100::10":{
      "ens224":{
      },
      "installed":1,
      "isRpt":false,
      "refCount":1,
      "oilListSize":0,
      "oilRescan":0,
      "lastUsed":0,
      "packetCount":40,
      "byteCount":3080,
      "wrongInterface":1
    }
  }
}

frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
 Active  Source  Group  RPT  IIF  OIL

After fix:
---------
Case 1:
- "show ipv6 pim state" output for 1 mroute with 1 oil.

frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
 Active  Source    Group    RPT  IIF     OIL
 1       1100::10  ffaa::5  n    ens224  ens256( J   )

Case 2:
- "show ipv6 pim state" output for 1 mroute with multiple oil.

frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
 Active  Source    Group    RPT  IIF     OIL
 1   1100::10   ffaa::5   n   ens224   ens192( J   )
                                       ens256( J   )
Case 3:
- "show ipv6 pim state" output for 1 mroute with no oil

frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
 Active  Source    Group    RPT  IIF     OIL
 1       1100::10  ffaa::5  n    ens224

Case 4:
- "show ipv6 pim state" output for multiple mroute with multiple oil

frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
 Active  Source  Group    RPT  IIF     OIL
 1       *       ff05::2  y    ens224  pim6reg(I    )
                                       ens192(I    )
 1       *       ffaa::5  y    ens224  pim6reg(I    )
                                       ens192(I    )

Issue: #13070

Signed-off-by: Sarita Patra <saritap@vmware.com>
2023-06-07 23:57:56 -07:00
Christian Hopps
71231d304f tests: mcast-tester.py handles IPv6
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-08 02:39:09 -04:00
anlan_cs
beb7c1a710 pimd: adjust the display for debug
The vrf name should be separated when it is displayed. And remove
unnecessary space after number.

Before:
```
pim_upstream_sg_running: (100.100.1.100,232.100.100.100)x is not installed in mroute
pim_upstream_del(pim_ifchannel_delete): Delete (100.100.1.100,232.100.100.100)[x] ref count: 1 , flags: 1048585 c_oil ref count 2 (Pre decrement)
```

After:
```
pim_upstream_sg_running: (100.100.1.100,232.100.100.100)[x] is not installed in mroute
pim_upstream_del(pim_ifchannel_delete): Delete (100.100.1.100,232.100.100.100)[x] ref count: 1, flags: 1048585 c_oil ref count 2 (Pre decrement)
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-06-08 10:21:49 +08:00
Donald Sharp
f1128c8232
Merge pull request #13624 from Keelan10/bgp_flowspec-leak-fix
bgpd: Free temp memory
2023-06-07 17:36:03 -04:00
Donatas Abraitis
78981a80c7 bgpd: Implement neighbor X addpath-tx-best-selected command
When using `addpath-tx-all` BGP announces all known paths instead of announcing
only an arbitrary number of best paths.

With this new command we can send N best paths to the neighbor. That means, we
send the best path, then send the second best path excluding the previous one,
and so on. In other words, we run best path selection algorithm N times before
we finish.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-07 22:27:29 +03:00
Donatas Abraitis
0ec8b2d869 tests: Test neighbor X addpath-tx-best-selected command
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-07 22:27:28 +03:00
Donatas Abraitis
db731ec639 doc: Add neighbor addpath-tx-best-selected command
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-07 22:19:40 +03:00
anlan_cs
c33473f822 pimd: Fix wrong protocol for SSM
Consider LHR in `SSM` case, and its `oif` goes from up to down.
As the `oif` changes down, the `channel_oil` is still wrongly reserved
with `PIM_OIF_FLAG_PROTO_STAR` protocol.

The mechanism of adding `STAR` protocol for <S,G> entry without `oif`
is introduced by commit `2164ed5`, which should be only used for ASM.

PR #13699 wants to clean this `STAR` protocol after the `oif` becomes up
again. That case is for SSM, as the `oif` changes down, the `channel_oil`
should be removed, so the fix of that PR is wrong.

In `pim_ifchannel_delete()` we should check the `ch->parent` before that
mechanism of adding `STAR` protocol. If `ch->parent` is NULL, we should
skip that mechanism with SSM.

Fixes #13696

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-06-07 22:15:29 +08:00
David Lamparter
c82ddede8a
Merge pull request #11560 from patrasar/fix_pim6_state_on_prune 2023-06-07 15:39:45 +02:00
Mobashshera Rasool
b25286add3 pimd, pim6d: Move mld/igmp deletion code to a common api
Move the mld/igmp deletion common code to api pim_gm_interface_delete
code for IPv6 deletion(gm_ifp_teardown) for MLD was missing in this flow
Making the code common fixes this too.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2023-06-07 00:01:05 -07:00
Mobashshera Rasool
692b1f3e97 pimd, pim6d: Rename and move api pim_cmd_interface_delete
Rename pim_cmd_interface_delete to pim_pim_interface_delete
and move the api to pimd/pim_iface.c

Changed the return type of the api from int to void.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2023-06-06 23:59:55 -07:00
Mobashshera Rasool
e7356fdba1 pimd, pim6d: Move api pim_if_membership_clear
Move pim_if_membership_clear api from pimd/pim_nb_config.c
to pimd/pim_iface.c
Also fixed curly braces warning
WARNING: braces {} are not necessary for single statement blocks
1773: FILE: /tmp/f1-127504/pim_iface.c:1773:

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2023-06-06 23:58:29 -07:00
Donatas Abraitis
7f0c12d5b3
Merge pull request #13622 from kuldeepkash/bgp_always_compare_med
tests: Adding bgp_always_compare_med testuite
2023-06-07 09:36:15 +03:00
Donatas Abraitis
d5497d1eac
Merge pull request #13693 from chiragshah6/fdev2
tools: fix list value remove in frr-reload
2023-06-07 09:22:46 +03:00