Commit Graph

29152 Commits

Author SHA1 Message Date
Igor Ryzhov
32931e1af8 isisd: fix running-config for fast-reroute
YANG leaf means "enable" while CLI command is "disable".
So we should use "no" when the leaf is "true", not "false".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-12-03 18:16:24 +03:00
Donald Sharp
22108570e3
Merge pull request #10164 from SaiGomathiN/name_change
pimd: Modifying members of pim_interface to accommodate IPv6 changes
2021-12-03 09:30:04 -05:00
Donald Sharp
7f5faf7c76 pimd: Clean up switch statement to our standards
Fixup the switch statement to not have a default statement
with a enum as the case.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-12-03 07:58:47 -05:00
Donatas Abraitis
a4051cb283 tests: Test if BGP session is up additionally for route_server_client setup
Lower connect timer to 5 seconds as well.

```
FAILED test_bgp_route_server_client.py::test_bgp_route_server_client - AssertionError: Cannot see BGP GUA next hop from r3 in r1
```

```
2021-12-02 14:41:21,115 INFO: topolog.r1: vtysh command => "show bgp 2001:db8:f::3/128 json"
2021-12-02 14:41:21,115 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh  -c "show bgp 2001:db8:f::3/128 json" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2021-12-02 14:41:21,159 INFO: topolog.r1: vtysh result:
	{
	}
```

At least can't reproduce a failure locally (before managed to catch it).

Ran >2000 times, no failure.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-12-03 10:03:07 +02:00
Sai Gomathi
ea7d74d702 pimd: Modifying members of pim_interface to accommodate IPv6 changes
Modifying the members of pim_interface which are to be used
for both IPv4 and IPv6 to common names(for both MLD and IGMP).

Issue: #10023

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-12-02 23:12:58 -08:00
Stephen Worley
f6f16b6073 zebra: add optional NHG ID output to show ip ro
Add optional NHG ID output to `show ip route` dumps. We have
this in json output already as nexthopGroupID but nice
to have the option in a normal dump as well. Not including in main
output for now to avoid breaking screen scrapers.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2021-12-02 11:28:37 -05:00
Russ White
90f88bbc94
Merge pull request #10110 from idryzhov/if-yang-remove-vrf
lib, yang: remove vrf from the interface list key
2021-12-02 08:33:05 -05:00
Rafael Zalamena
82f7d8cd2c
Merge pull request #9940 from pguibert6WIND/misc_topotests
simplify some topotests config with naming default vrf
2021-12-02 09:19:45 -03:00
Donald Sharp
d047ba78d2
Merge pull request #9708 from mobash-rasool/new_b
pimd: hello sent stats counter change and new flag addition to decide hello send
2021-12-02 04:05:03 -05:00
Donatas Abraitis
0da8c0876c
Merge pull request #9942 from mjstapp/fix_bgp_lu_rmap_in
bgpd: clearer safi handling for BGP-LU route updates
2021-12-01 20:42:55 +02:00
Donatas Abraitis
4548e72307
Merge pull request #10150 from donaldsharp/kill_daemon
tests: Fix Daemon Killing to actually notice when a deamon dies
2021-12-01 20:42:19 +02:00
Mark Stapp
907707db48 bgpd: clearer safi handling for BGP-LU route updates
Don't hide the LABELED_UNICAST safi when processing route
updates; map it where necessary (to use the UNICAST table
for instance).

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2021-12-01 07:56:38 -05:00
Donatas Abraitis
e2144103f8
Merge pull request #9878 from pguibert6WIND/resolver_vrf
lib: resolver per vrf support
2021-12-01 08:12:33 +02:00
Russ White
f1f6716d4a
Merge pull request #9610 from iqras23/best_path
bgpd: VRF-Lite fix best path selection
2021-11-30 16:14:34 -05:00
Donatas Abraitis
60563d0e62 bgpd: Handle Delete status when peers flapping for BMP
Memory leak when doing quickly: clear ip bgp * or [no] neighbor X shutdown.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-30 20:30:59 +02:00
Donald Sharp
ece7f50d65
Merge pull request #10131 from lyq140/patch-5
pimd: fix igmp user config
2021-11-30 12:38:44 -05:00
Russ White
be8a6654b9
Merge pull request #10143 from donaldsharp/lib_kernel_routes
test: Fix addKernelRoute looking for positive results
2021-11-30 09:52:11 -05:00
Olivier Dugeon
be95145ebc topotests: Add new IS-IS Traffic Engineering tests
Test the new Link State Traffic Engineering feature in IS-IS.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-11-30 15:22:28 +01:00
Olivier Dugeon
ed6189a9b5 isisd: Add Link State Traffic Engineering support
Add Link State TED features to isis_te.c and new CLI to export LS TED and
show LS TED to IS-IS.

IS-IS LSPs are parse each time a new LSP event occurs in order to update
accordingly the Link State Traffic Engineering Database. LS TED could be
exported through the ZAPI Opaque message (see sharpd as example).

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-11-30 15:22:28 +01:00
Olivier Dugeon
d9884a758c isisd: Prepare IS-IS for Link State support
In order to provide Link State Traffic Engineering features to IS-IS, this
patch adds some modifications to base IS-IS:

- Solve bug in lsp iterate function to avoid infinite loop in isis_lsp.c by
  adding condition to recurse call
- Add new trigger event to parse LSP in isis_lsp.c
- Add new TE debug flag to track Traffic Engineering events in isisd.[c,h]
- Correct small bug in isis_tlvs.c where delay and min/max delay are not
  correctly handle
- Handle Opaque LSA Traffic Engineering Zebra API in isis_zebra.[c,h]

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-11-30 15:22:28 +01:00
Olivier Dugeon
8693b4d66e lib: Update Link State functions to handle IPv6
In order to add Link State Traffic Engineering to IS-IS, Link State library
should have been updated:

- Correct Node and Edge RB Tree comparison functions to support key > 32 bits
- Change Subnet RB Tree comparison function to take into account host part of
  the prefix i.e. 10.0.0.1/24 and 10.0.0.2/24 are considered as different
- Add new function to convert IS-IS ISO system ID into Vertex or Edge key that
  take into account Endianness architecture
- Correct Vertex and Edge creation and search function accordingly
- Add extra Adjacency entries in Link State Attributes for IPv6 Segment Routing
- Update send/received and show TED functions accordingly

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-11-30 15:22:28 +01:00
Olivier Dugeon
173f8887cc isisd: Add support for RFC6119 (IPv6 TE in IS-IS)
- Add advertisement of Global IPv6 address in IIH pdu
 - Add new CLI to set IPv6 Router ID
 - Add advertisement of IPv6 Router ID
 - Correctly advertise IPv6 local and neighbor addresses in Extended IS and MT
   Reachability TLVs
 - Correct output of Neighbor IPv6 address in 'show isis database detail'
 - Manage IPv6 addresses advertisement and corresponiding Adjacency SID when
   IS-IS is not using Multi-Topology by introducing a new ISIS_MT_DISABLE
   value for mtid (== 4096 i.e. first reserved flag set to 1)

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-11-30 15:22:28 +01:00
Russ White
0536fea8d2
Merge pull request #10146 from ton31337/fix/acl_bmp
bgpd: Add autocomplete for access-list under BMP node
2021-11-30 07:11:00 -05:00
Russ White
b9ee4f1057
Merge pull request #10145 from donaldsharp/pim_verify_intf_statistics
tests: Allow interface statistics to be gathered with some delay
2021-11-30 07:10:21 -05:00
Donatas Abraitis
62228769ef
Merge pull request #10149 from donaldsharp/zebra_restart
zebra: Prevent thread usage of data after it being freed
2021-11-30 09:14:10 +02:00
Quentin Young
23b2f11a47
Merge pull request #9798 from abuibrahim/master
fix broken northbound confd
2021-11-30 00:17:28 -05:00
Donald Sharp
c9f92703bc tests: Fix Daemon Killing to actually notice when a deamon dies
Lot's of the GR topotests kill daemons in order to test code
that deals with crashing daemons.  Under heavy system load
it was noticed that a kill command was sent and if told to
wait we would sleep 2 seconds send another kill command and
call it good.  This was causiing issues when subsuquent
json commands would get errors like `lost connection to daemon`
as the daemon finally shut down after some time due to load.

Modify the kill the daemon function to notice that the daemon
was not actually killed and if we need to wait wait some
more time for it too happen

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-29 20:55:30 -05:00
Donald Sharp
14fb032999
Merge pull request #10147 from ton31337/fix/bgp_packet_set_size
bgpd: bgp_packet_set_size int to void
2021-11-29 17:14:19 -05:00
Donald Sharp
c3343a755f zebra: Prevent thread usage of data after it being freed
On startup we create a thread timer event to do a rib sweep
of the system.  On shutdown we never stopped this timer and
as such we have a situation where a thread event could be run
on shutdown after the data for it has been freed.  Here is the
crash I am seeing:

(gdb) bt
(gdb)

Save the thread data in zebra_router and stop the thread so we don't
accidently do work on shutdown we don't mean to.  In this case
it happened in our topotests with some severe system load.
Essentially we happened to kill the zebra daemon just as the
graceful_restart timer popped here.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-29 15:51:45 -05:00
Donatas Abraitis
65baedcade bgpd: bgp_packet_set_size int to void
stream size is never checked anywhere in the code, just convert to void.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-29 21:23:53 +02:00
Donatas Abraitis
5c75768966 bgpd: Add autocomplete for access-list under BMP node
```
home-spine1.donatas.net(config-bgp-bmp)# ipv6 access-list ?
  ACCESSLIST_NAME  Access list name
     test4 test6
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-29 21:18:56 +02:00
Donald Sharp
3d7d6e9ada tests: Allow interface statistics to be gathered with some delay
Currently under system load tests that use verify_pim_interface_traffic
immediately after a interface down/up event are not giving any time
for pim to receive and process the data from that event.  Give
the test some time to gather this data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-29 12:11:43 -05:00
Russ White
31ccdb903f
Merge pull request #9703 from donaldsharp/splitup_bgp_gr
tests: Split up the bgp GR topotests
2021-11-29 11:05:51 -05:00
Russ White
85d1d680ab
Merge pull request #10018 from ckishimo/ospf6d_bitN
ospf6d: check N-bit in Hello packet
2021-11-29 11:05:11 -05:00
Russ White
5c24a442d9
Merge pull request #10105 from ton31337/feature/rfc9072
bgpd: Implement rfc9072
2021-11-29 10:46:58 -05:00
Donald Sharp
93d664c26a test: Fix addKernelRoute looking for positive results
Under heavy system load, we are sometimes seeing this
output for addKernelRoute:

2021-11-28 16:17:27,604 INFO: topolog: [DUT: b1]: Running command: [ip route add 224.0.0.13 dev b1-f1-eth0]
2021-11-28 16:17:27,604 DEBUG: topolog.b1: LinuxNamespace(b1): cmd_status("['/bin/bash', '-c', 'ip route add 224.0.0.13 dev b1-f1-eth0']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2021-11-28 16:17:27,967 DEBUG: topolog.b1: LinuxNamespace(b1): cmd_status("['/bin/bash', '-c', 'ip route']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2021-11-28 16:17:28,243 DEBUG: topolog: ip route
70.0.0.0/24 dev b1-f1-eth0 proto kernel scope link src 70.0.0.1
Signed-off-by: Donald Sharp <sharpd@nvidia.com>

This tells us that the ip route add succeeded but when looking for it
the system failed to immediately find it.  Why is this happening?
Probably we are under heavy system load and the two different
commands, 'ip route add..' and 'ip route show' are being executed
on different cpu's and the data has not been copied to the different
cpu yet in the kernel.  This is not necessarily something normally
seen but entirely possible.  Giving the system a few extra seconds
for the kernel to execute/work the memory barrier system seems
prudent for long term success of our programming.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-29 08:42:03 -05:00
Donatas Abraitis
5fee827d32
Merge pull request #10042 from wangshengjun/dev_bgp
bgpd: do not set the 'BGP_NEXTHOP_REGISTERED/BGP_NEXTHOP_UNREGISTERD'…
2021-11-29 09:39:29 +01:00
Donatas Abraitis
77a16940e3
Merge pull request #10137 from idryzhov/vtysh-rpki
vtysh: add missing rpki node when showing config
2021-11-29 08:37:02 +01:00
wangshengjun
a652203835 bgpd: do not set the 'BGP_NEXTHOP_REGISTERED/BGP_NEXTHOP_UNREGISTERD' zclient send failed
Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>
2021-11-29 09:52:09 +08:00
Yamato Sugawara
559f4b2f2a zebra: Add support for json output in srv6 locator detail command
Signed-off-by: Yamato Sugawara <yamato.sugawara@linecorp.com>
2021-11-28 23:53:41 +00:00
Igor Ryzhov
cb3fa0a612
Merge pull request #10124 from ton31337/feature/vty_json 2021-11-29 02:11:29 +03:00
Igor Ryzhov
eebb826040 vtysh: add missing rpki node when showing config
Before:
```
frr version 8.2-dev
frr defaults traditional
hostname frr
rpki
 rpki polling_period 20
 rpki cache 192.0.2.1 8080 preference 1
service integrated-vtysh-config
!
```

After:
```
frr version 8.2-dev
frr defaults traditional
hostname frr
service integrated-vtysh-config
!
rpki
 rpki polling_period 20
 rpki cache 192.0.2.1 8080 preference 1
exit
!
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-11-29 00:37:38 +03:00
Donald Sharp
b38b873c61 tests: Allow ripng_topo1 to converge a bit faster
Modify the timers uses to send updates/hello's every
1 seconds instead of 5.  Allowing this test to converge
faster under heavy system load.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-28 08:46:48 -05:00
Donatas Abraitis
c786485164
Merge pull request #10134 from donaldsharp/isis_topo1_vrf_fix
tests: Fix isis_topo1_vrf to wait a tiny bit for zebra route install
2021-11-27 23:13:30 +01:00
Donald Sharp
2451958e54 tests: Fix isis_topo1_vrf to wait a tiny bit for zebra route install
During repeated runs I am seeing this test fail to run successfully.
Upon inspecting the output:
            {
              "prefix":"10.0.10.0/24",
              "prefixLen":24,
              "protocol":"isis",
              "vrfId":6,
              "vrfName":"r1-cust1",
              "selected":true,
              "destSelected":true,
              "distance":115,
              "metric":10,
              "queued":true,

We can see that the route is still queued.  Under heavy system
load and not ensuring that isis has time to send the route to
zebra and for zebra to install the route, this test can fail.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-27 13:12:50 -05:00
Russ White
d41e9fe0cb
Merge pull request #9203 from opensourcerouting/bgpd-show-json
bgpd: add "json" option to a few more show commands
2021-11-27 08:30:04 -05:00
Donatas Abraitis
c48349e346 *: Remove redundand braces for single statement blocks
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-27 11:20:59 +02:00
Donatas Abraitis
0e57e37925
Merge pull request #10127 from idryzhov/ospf-asbr-instance
ospfd: fix summary-address deletion
2021-11-27 10:20:02 +01:00
Igor Ryzhov
7d5ce80b42
Merge pull request #10106 from ton31337/fix/missing_llgr_cap_handling
bgpd: Add missing LLGR capability handling stuff
2021-11-26 18:42:32 +03:00
Igor Ryzhov
fa36b3d125
Merge pull request #10126 from SaiGomathiN/cleanup
pimd: removing no caller functions
2021-11-26 17:24:38 +03:00