Commit Graph

29152 Commits

Author SHA1 Message Date
Donatas Abraitis
af3b36a1e1
Merge pull request #11003 from anlancs/bgpd-mh-trival-remove
bgpd: correct one flag name on comment for evpn-mh
2022-04-12 09:00:08 +03:00
anlan_cs
9a8fc8f88d zebra: simplify one check for evpn-mh
An simplification for one check in
`zebra_evpn_mh_uplink_oper_flags_update()`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-12 01:26:54 -04:00
kuldeepkash
40c28c860a tests: Add multicast_pim_dr_nondr_test suite
1. Added test cases to test/verify multicast_pim_dr_nondr scenarios

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2022-04-12 02:39:39 +05:30
Igor Ryzhov
5c73173536
Merge pull request #11006 from opensourcerouting/fix/remove_&routemap_optimization_cmd
lib: Remove deprecated routemap_optimization_cmd
2022-04-11 23:22:41 +03:00
Donatas Abraitis
764402feba bgpd: Fix styling for aggregate_addressv4_cmd
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-11 17:53:42 +03:00
Donatas Abraitis
cacba915d0 bgpd: Add autocomplete for aggregate-address ... route-map X
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-11 17:47:52 +03:00
Donatas Abraitis
59136db5a7 bgpd: Send MED attribute when aggregate prefix is created
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-11 17:46:04 +03:00
Donatas Abraitis
5e1a1129f5
Merge pull request #11007 from mobash-rasool/fixes
pimd: correct the show ip igmp sources output
2022-04-11 14:28:15 +03:00
Mobashshera Rasool
e1f87dce0f pimd: correct the show ip igmp sources output
frr(config-if)# ip igmp join 232.1.1.1 10.10.10.10
frr(config-if)# do sh ip igmp sources
Interface        Address         Group           Source          Timer Fwd Uptime
ens192           232.1.1.1       10.10.10.10     04:10   N 00:00:10
frr(config-if)#

The above output is misaligned and is having Address field which is not
required here.

Fixing it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-11 00:17:11 -07:00
Donatas Abraitis
c90fab3c26 lib: Remove deprecated routemap_optimization_cmd
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-11 10:12:18 +03:00
Donald Sharp
747aa92e74 tests: Do not turn off multicast stream
The test is testing whether interface flaps are causing
the appropriate pim reactions.  Unfortunately the test
is turning off the multicast stream and the test also
has a keep alive timer of 15 seconds set on all routers.
Which of course means the test has 15 seconds(at most) to finish
testing.  This is not always possible given system loads.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-10 07:47:38 -04:00
Donald Sharp
184ab61ee3 tests: Fix test_multicast_pim_sm_topo3.py from generating a support bundle
The test_multicast_pim_sm_topo3.py test is both spending extra time
looking for state that will never occurr but also generating a support
bundle when it doesn't find it.  Fix the test to come to the correct
solution faster.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-10 07:47:18 -04:00
anlan_cs
b3ba21181a bgpd: correct one flag name on comment for evpn-mh
Correct flag name of `attr.es_flags` - ATTR_ES_L3_NHG_USE.

"bgp_path_info"s (Per "es-vrf") with this flag can use l3nhg.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-10 19:39:19 +08:00
Donald Sharp
efcd39d87b tests: Add a test case for a kernel route depending on a kernel route
Add a test case where a kernel route depends on a kernel route
and when you perturb an interface, ensure that FRR does not
loose the route.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-09 15:52:58 -04:00
Donald Sharp
c9e4abf81f zebra: Allow system routes to recurse through themselves
Currently if a end user has something like this:

Routing entry for 192.168.212.1/32
  Known via "kernel", distance 0, metric 100, best
  Last update 00:07:50 ago
  * directly connected, ens5

Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

K>* 0.0.0.0/0 [0/100] via 192.168.212.1, ens5, src 192.168.212.19, 00:00:15
C>* 192.168.212.0/27 is directly connected, ens5, 00:07:50
K>* 192.168.212.1/32 [0/100] is directly connected, ens5, 00:07:50

And FRR does a link flap, it refigures the route and rejects the default
route:

2022/04/09 16:38:20 ZEBRA: [NZNZ4-7P54Y] default(0:254):0.0.0.0/0: Processing rn 0x56224dbb5b00
2022/04/09 16:38:20 ZEBRA: [ZJVZ4-XEGPF] default(0:254):0.0.0.0/0: Examine re 0x56224dbddc20 (kernel) status: Changed Installed flags: Selected dist 0 metric 100
2022/04/09 16:38:20 ZEBRA: [GG8QH-195KE] nexthop_active_update: re 0x56224dbddc20 nhe 0x56224dbdd950 (7), curr_nhe 0x56224dedb550
2022/04/09 16:38:20 ZEBRA: [T9JWA-N8HM5] nexthop_active_check: re 0x56224dbddc20, nexthop 192.168.212.1, via ens5
2022/04/09 16:38:20 ZEBRA: [M7EN1-55BTH]         nexthop_active: Route Type kernel has not turned on recursion
2022/04/09 16:38:20 ZEBRA: [HJ48M-MB610]         nexthop_active_check: Unable to find active nexthop
2022/04/09 16:38:20 ZEBRA: [JPJF4-TGCY5] default(0:254):0.0.0.0/0: After processing: old_selected 0x56224dbddc20 new_selected 0x0 old_fib 0x56224dbddc20 new_fib 0x0

So the 192.168.212.1 route is matched for the nexthop but it is not connected and
zebra treats it as a problem.  Modify the code such that if a system route
matches through another system route, then it should work imo.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-09 13:17:14 -04:00
Donatas Abraitis
6e37924b05 bgpd: Show conditional advertisement timers in neighbor CLI output
```
spine1-debian-11# sh ip bgp neighbors 192.168.0.1
BGP neighbor is 192.168.0.1, remote AS 65001, local AS 65000, external link
Hostname: exit1-debian-11
  BGP version 4, remote router ID 192.168.10.123, local router ID 192.168.100.1
  BGP state = Established, up for 00:00:32
  Last read 00:00:30, Last write 00:00:30
  Hold time is 180, keepalive interval is 60 seconds
  Configured conditional advertisements interval is 5 seconds
  Time until conditional advertisements begin is 4 seconds
```

```
    "bgpTimerConfiguredConditionalAdvertisementsSec":5,
    "bgpTimerUntilConditionalAdvertisementsSec":1,
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-09 18:12:36 +03:00
Russ White
d6d890a656
Merge pull request #10919 from donaldsharp/lost_kernel_routes
zebra: Allow multiple connected routes to be choosen for kernel routes
2022-04-09 11:09:40 -04:00
Donatas Abraitis
c0945b7828 bgpd: Allow setting BGP [large]community in route-maps
Before:
```
spine1-debian-11(config-route-map)# bgp community alias 65001:65001 test1
spine1-debian-11(config)# route-map rm permit 10
spine1-debian-11(config-route-map)# set community 65001:65001
% Malformed communities attribute
```

After:
```
spine1-debian-11(config)# bgp community alias 65001:65001 test1
spine1-debian-11(config)# route-map rm permit 10
spine1-debian-11(config-route-map)# set community 65001:65001
spine1-debian-11(config-route-map)#
```

Same for large-communities.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-09 17:34:06 +03:00
Donald Sharp
6d0fa5c228 watchfrr: Send operational state to systemd
When watchfrr has noticed issues, send operational state
to systemd so operators issuing `systemd status frr` can
see a more nuanced state of the daemon.

Add the `--operational-timeout X` value to the cli. After
the daemon has been restarted and communication re-established
wait this time before reporting to systemd that the daemon
is up and running.

Default value of 60 seconds was choosen to allow some small
delay in reporting so that, if the daemon is in a crash loop
status will not ping pong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-08 15:56:17 -04:00
Donatas Abraitis
9118301e48 bgpd: Do not forget to update conditional advertisements rmaps for peer-groups
When the peer is configured for the first time:
```
neighbor P1 peer-group
neighbor P1 remote-as external
neighbor P1 advertise-map ADV exist-map EXIST
neighbor 10.10.10.1 peer-group P1
```

Conditional advertisements route-maps are not updated and cond. advertisements
do not work until FRR restarted. BGP sessions clear does not help.

Or even changing peer-group for a peer, causes this bug to kick in.

```
no neighbor 10.10.10.1
neighbor 10.10.10.1 peer-group P2
```

With this fix, cond. advertisements start working immediatelly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-08 22:43:01 +03:00
mobash-rasool
ef362a5156
Merge pull request #10981 from opensourcerouting/vty-wrmem-newline
vtysh: remove extraneous newline
2022-04-08 22:09:16 +05:30
Donatas Abraitis
3ccddc2566 bgpd: Use autocomplete for route-map under conditional advertisements CLI
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-08 16:54:22 +03:00
Donald Sharp
050d644400 doc: Add show ip nht.. documentation
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-08 08:18:39 -04:00
Donald Sharp
91a5a6e75c tests: Add a test to ensure that FRR does not loose kernel routes
Add a test case to ensure that Kernel routes are not lost
when there are multiple overlapping connected routes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-08 08:15:20 -04:00
Donald Sharp
48dc861028 zebra: Allow multiple connected routes to be choosen for kernel routes
This bug should only really affect kernel routes.  To reproduce:

a) Have multiple connected routes that point to the same prefix
swp8  up      default         169.254.0.250/30
swp9  up      default         169.254.0.250/30

b) Have a kernel route that uses one of those connected routes
7.6.2.8 via 169.254.0.249 dev swp8 proto static
(But have it choose a non-selected connected nexthop)

c) Introduce an event that causes the rib table to be reprocessed,
say a unrelated interface going up / down

  This causes the route to be lost with this message:
2022/03/28 21:21:53 ZEBRA: [YXCJP-0WZWV] netlink_nexthop_msg_encode: ID (3454): 169.254.0.249, via swp8(1383) vrf default(0)
2022/03/28 21:21:53 ZEBRA: [YF2E6-J60JH] nexthop_active: 169.254.0.249, via swp8 given ifindex does not match nexthops ifindex found found: directly connected, swp9

Effectively the nexthop that zebra is choosing would not be the one
that the kernel route has choosen and FRR removes the route:
022/03/28 21:21:53 ZEBRA: [NM15X-X83N9] rib_process: (0:254):7.6.2.8/32: rn 0x56042e632e90, removing re 0x56042e6316e0
2022/03/28 21:21:53 ZEBRA: [Y53JX-CBC5H] rib_unlink: (0:254):7.6.2.8/32: rn 0x56042e632e90, re 0x56042e6316e0
2022/03/28 21:21:53 ZEBRA: [KT8QQ-45WQ0] rib_gc_dest: (0:?):7.6.2.8/32: removing dest from table

What is happening?

Zebra is not looking at all connected routes and if any of them
would have the appropriate ifindex and just blindly rejecting
the route.

So when nexthop resolution happens and it matches a connected
route and the dest->selected nexthop ifindex does not match, let's sort
through the rest of them and see if any of them match and if so
let's keep the route.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-08 08:15:20 -04:00
Donatas Abraitis
b4bdcf45d5
Merge pull request #10982 from donaldsharp/enum_watchfrr
Enum watchfrr
2022-04-08 14:58:36 +03:00
David Lamparter
4f977c8e77 pimd: remove pim_interface->options
I should've removed this in #10960.  It's a hazard in terms of
forgetting to adjust PRs/other changes that might accidentally still
reference the field.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-08 10:30:24 +02:00
Philippe Guibert
ae59cfd796 isisd: add bfd information on isis neighbor show command
Add bfd information on show isis neighbor command.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-04-08 09:06:01 +02:00
Donald Sharp
e09284ca09
Merge pull request #10979 from opensourcerouting/pim-ssm-clean
lib, pimd: small cleanup in multicast addr helpers (SSM & co.)
2022-04-07 13:08:01 -04:00
David Lamparter
edae23ff58 vtysh: remove extraneous newline
vtysh_client_execute() expects just a string without a newline; the
newline is passed through and ends up in logging output where newlines
are not quite wanted.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-07 17:55:35 +02:00
Donald Sharp
c3db4ca8ed watchfrr: Convert daemon_state_t to an enum instead of a typedef
Align watchfrr with our coding standard

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-07 08:57:42 -04:00
Donald Sharp
f1692c510b watchfrr: Rename restart_phase_t to enum restart_phase
This will align with our coding standards.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-07 08:57:42 -04:00
David Lamparter
95793341ab pimd: use SSM check helper
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-07 14:00:40 +02:00
David Lamparter
eeec411244 lib, pimd: add a bunch of address helpers
Just simple helpers to get a scope value, never-forward, and is-SSM for
a given address.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-07 14:00:36 +02:00
anlan_cs
bce8bf5844 bgpd: cosmetic change for evpn-mh
Two cosmetic change -
1) Remove unnecessary local variable - `es_vtep` used in one condition.
2) Remove unused variable - `es_cnt`. `proc_cnt` has already taken `es`
   into account.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-07 06:10:36 -04:00
sarita patra
eed4433df4 pim6d: Handle mrib_nexthop_addr zclient_lookup_nexthop
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:56:31 -07:00
sarita patra
265dec6ab8 pim6d: Adjust IPV6 zclient_lookup_read_pipe
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:51:20 -07:00
sarita patra
ebbecd2106 pim6d: Adjust IPV6 zclient_lookup_nexthop_once
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:49:58 -07:00
sarita patra
eed74896d4 pim6d: Adjust IPV6 zclient_read_nexthop
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:48:13 -07:00
sarita patra
dac86a0a2d pim6d: Handle mrib_nexthop_addr & pim_zlookup_nexthop in pim_nht
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:58 -07:00
sarita patra
cbe1dbba30 pim6d: modify nexthop_addr to pim_addr in pim_zlookup_nexthop
Currently pim_zlookup_nexthop is of type struct prefix, but it's always
a /32 host prefix. So changing it to pim_addr in order to support both
IPV4 and IPV6.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:58 -07:00
sarita patra
641ac7c7d3 pim6d: Display mrib_nexthop_addr with %pPA
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:58 -07:00
sarita patra
d8a2f46667 pim6d: Handle mrib_nexthop_addr in pim_upstream
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:58 -07:00
sarita patra
7b94245256 pim6d: Adjust mrib_nexthop_addr igmp_mtrace code
In this PR, we are handling the igmp_mtrace code
after mrib_nexthop_addr modified from prefix
to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:37:12 -07:00
sarita patra
0332b088d3 pim6d: Adjust mrib_nexthop_addr msdp code
In this PR, we are handling the msdp code
after mrib_nexthop_addr modified from prefix
to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:36:42 -07:00
sarita patra
34a466b78c pim6d: Adjust mrib_nexthop_addr rpf code
In this PR, we are handling the pim_rpf code
after mrib_nexthop_addr modified from prefix
to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:35:12 -07:00
sarita patra
a1bc5746a9 pim6d: modify mrib_nexthop_addr from prefix to pim_addr
Currently mrib_nexthop_addr is of type struct prefix, but it's always
a /32 host prefix. So changing it to pim_addr in order to support both
IPV4 and IPV6.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-06 22:34:38 -07:00
Igor Ryzhov
5451fbc192
Merge pull request #10927 from bobuhiro11/refactor_srv6_locator_chunks
bgpd: refactor type of srv6_locator_chunks list
2022-04-06 21:36:39 +03:00
Donald Sharp
b277f22c93
Merge pull request #10971 from opensourcerouting/fix/rpki_nits
bgpd: RPKI memory leak
2022-04-06 07:41:53 -04:00
Donatas Abraitis
1b2095d120 bgpd: Delay returning RPKI instance as running
Start a separate timer which does the sync with the RPKI manager until
returns the synced status.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-06 10:35:37 +03:00