]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 years agowatchfrr: Add some more information to `show watchfrr` 10993/head
Donald Sharp [Wed, 6 Apr 2022 13:18:47 +0000 (09:18 -0400)]
watchfrr: Add some more information to `show watchfrr`

To allow people to know the state of watchfrr from vtysh,
let's add a bit more data to the output.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #11028 from ton31337/fix/pass_non_transitive_communities_via_rsclient
Russ White [Fri, 15 Apr 2022 20:04:04 +0000 (16:04 -0400)]
Merge pull request #11028 from ton31337/fix/pass_non_transitive_communities_via_rsclient

bgpd: Pass non-transitive ext-communities between Route Server and RS clients

3 years agobgpd: Pass non-transitive ext-communities between Route Server and RS clients 11028/head
Donatas Abraitis [Wed, 13 Apr 2022 17:40:30 +0000 (20:40 +0300)]
bgpd: Pass non-transitive ext-communities between Route Server and RS clients

https://datatracker.ietf.org/doc/html/rfc7947#section-2.2

Optional recognized and unrecognized BGP attributes,
   whether transitive or non-transitive, SHOULD NOT be updated by the
   route server (unless enforced by local IXP operator configuration)
   and SHOULD be passed on to other route server clients.

By default LB ext-community works with iBGP peers. When we receive a route
from eBGP peer, we can send LB ext-community to iBGP peers.

With this patch, allow sending LB ext-community to iBGP/eBGP peers if they
are set as RS clients.

FRR does not send non-transitive ext-communities to eBGP peers, but for
example GoBGP sends and if it's set as RS client, we should pass those attributes
towards another RS client.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10910 from donaldsharp/doc_nht
Sri Mohana Singamsetty [Wed, 13 Apr 2022 19:28:43 +0000 (12:28 -0700)]
Merge pull request #10910 from donaldsharp/doc_nht

doc: Add `show ip nht..` documentation

3 years agoMerge pull request #10978 from anlancs/bgpd-cleanup-6
Russ White [Wed, 13 Apr 2022 19:27:39 +0000 (15:27 -0400)]
Merge pull request #10978 from anlancs/bgpd-cleanup-6

bgpd: cosmetic change for evpn-mh

3 years agoMerge pull request #10996 from donaldsharp/watchfrr_systemd_interactions
Sri Mohana Singamsetty [Wed, 13 Apr 2022 19:26:15 +0000 (12:26 -0700)]
Merge pull request #10996 from donaldsharp/watchfrr_systemd_interactions

watchfrr: Send operational state to systemd

3 years agoMerge pull request #10987 from opensourcerouting/fix/bgp_conditional_advertisements_r...
Russ White [Wed, 13 Apr 2022 19:00:14 +0000 (15:00 -0400)]
Merge pull request #10987 from opensourcerouting/fix/bgp_conditional_advertisements_rmap_change_peer_groups

bgpd: Do not forget to update conditional advertisements rmaps for peer-groups

3 years agoMerge pull request #11024 from anlancs/bgpd-fix-missing-newline
Russ White [Wed, 13 Apr 2022 18:56:00 +0000 (14:56 -0400)]
Merge pull request #11024 from anlancs/bgpd-fix-missing-newline

bgpd: fix wrong check for default VRF

3 years agoMerge pull request #11025 from anlancs/bgpd-remove-l3nhg-control
Russ White [Wed, 13 Apr 2022 18:55:29 +0000 (14:55 -0400)]
Merge pull request #11025 from anlancs/bgpd-remove-l3nhg-control

bgpd: remove unnecessary l3nhg knob for evpn-mh

3 years agoMerge pull request #11010 from opensourcerouting/feature/reuse_bgp_attr_set_community...
Russ White [Wed, 13 Apr 2022 18:54:30 +0000 (14:54 -0400)]
Merge pull request #11010 from opensourcerouting/feature/reuse_bgp_attr_set_community_for_flags

bgpd: Reuse bgp_attr_set_[el]community() for setting attribute flags

3 years agoMerge pull request #11009 from opensourcerouting/fix/med_for_aggregate-address
Russ White [Wed, 13 Apr 2022 18:53:14 +0000 (14:53 -0400)]
Merge pull request #11009 from opensourcerouting/fix/med_for_aggregate-address

bgpd: aggregate-address fixes

3 years agoMerge pull request #11013 from opensourcerouting/fix/convert_bgp_peer_sort_t_to_enum
Russ White [Wed, 13 Apr 2022 18:52:58 +0000 (14:52 -0400)]
Merge pull request #11013 from opensourcerouting/fix/convert_bgp_peer_sort_t_to_enum

bgpd: typedef enum to enum

3 years agoMerge pull request #10935 from anlancs/zebra-mh-esi-warning
Donatas Abraitis [Wed, 13 Apr 2022 12:45:07 +0000 (15:45 +0300)]
Merge pull request #10935 from anlancs/zebra-mh-esi-warning

zebra: adjust the warnings for ESI of evpn-mh

3 years agoMerge pull request #10931 from g-balaji1/pimv6-ssm-cmds
mobash-rasool [Wed, 13 Apr 2022 10:20:31 +0000 (15:50 +0530)]
Merge pull request #10931 from g-balaji1/pimv6-ssm-cmds

pim6d: Addition of ipv6 ssmpingd config commands

3 years agoMerge pull request #10972 from iqras23/default_originate
Donatas Abraitis [Wed, 13 Apr 2022 10:13:00 +0000 (13:13 +0300)]
Merge pull request #10972 from iqras23/default_originate

bgpd: Metric not set with default route

3 years agobgpd: remove unnecessary l3nhg knob for evpn-mh 11025/head
anlan_cs [Wed, 13 Apr 2022 09:11:18 +0000 (05:11 -0400)]
bgpd: remove unnecessary l3nhg knob for evpn-mh

Remove unnecessary `install_l3nhg` knob because it has already
been controlled by the command: "[no$no] use-es-l3nhg".

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agobgpd: fix wrong check for default VRF 11024/head
anlan_cs [Wed, 13 Apr 2022 08:51:38 +0000 (04:51 -0400)]
bgpd: fix wrong check for default VRF

Currently the warning is wrong:
```
root#show bgp vrf default vni
BGP instance for VRF default not foundACC1(config)#
```

Two changes for "show bgp vrf VRFNAME vni [json]":
- Correct the default VRF check
- Add newline for warning

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoMerge pull request #10969 from donaldsharp/test_multicast_remove_support_bundle_colle... 11026/head
mobash-rasool [Wed, 13 Apr 2022 06:42:41 +0000 (12:12 +0530)]
Merge pull request #10969 from donaldsharp/test_multicast_remove_support_bundle_collection

tests: Fix test_multicast_pim_sm_topo3.py from generating a support b…

3 years agobgpd: Metric not set with default route. 10972/head
Abhinay Ramesh [Fri, 18 Feb 2022 07:36:45 +0000 (07:36 +0000)]
bgpd: Metric not set with default route.

Description:
- When default route is originated using the
  neighbor default-originate command, MED is
  not set as part of the update message
  attribute.

- Changes are done to set the MED value and MED
  flag for default route.

Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
3 years agobgpd: Apply frrbot styling 11013/head
Donatas Abraitis [Tue, 12 Apr 2022 19:15:17 +0000 (22:15 +0300)]
bgpd: Apply frrbot styling

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Convert bpacket_attr_vec_type to enum
Donatas Abraitis [Tue, 12 Apr 2022 08:42:27 +0000 (11:42 +0300)]
bgpd: Convert bpacket_attr_vec_type to enum

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Convert bgp_attr_parse_ret_t to enum
Donatas Abraitis [Tue, 12 Apr 2022 08:40:11 +0000 (11:40 +0300)]
bgpd: Convert bgp_attr_parse_ret_t to enum

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Convert vpn_policy_direction_t to enum
Donatas Abraitis [Tue, 12 Apr 2022 08:34:27 +0000 (11:34 +0300)]
bgpd: Convert vpn_policy_direction_t to enum

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Convert bgp_policy_type_e to enum
Donatas Abraitis [Tue, 12 Apr 2022 08:32:23 +0000 (11:32 +0300)]
bgpd: Convert bgp_policy_type_e to enum

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Convert bgp_peer_sort_t to enum
Donatas Abraitis [Tue, 12 Apr 2022 08:29:40 +0000 (11:29 +0300)]
bgpd: Convert bgp_peer_sort_t to enum

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Fix styling, drop braces for single statement block 11010/head
Donatas Abraitis [Tue, 12 Apr 2022 19:12:16 +0000 (22:12 +0300)]
bgpd: Fix styling, drop braces for single statement block

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Reuse bgp_attr_set_ecommunity() for setting attribute flags
Donatas Abraitis [Tue, 12 Apr 2022 08:06:52 +0000 (11:06 +0300)]
bgpd: Reuse bgp_attr_set_ecommunity() for setting attribute flags

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Reuse bgp_attr_set_[l]community() for setting attribute flags
Donatas Abraitis [Mon, 11 Apr 2022 15:09:35 +0000 (18:09 +0300)]
bgpd: Reuse bgp_attr_set_[l]community() for setting attribute flags

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10994 from opensourcerouting/fix/autocomplete_for_advertise_map
Russ White [Tue, 12 Apr 2022 18:40:33 +0000 (14:40 -0400)]
Merge pull request #10994 from opensourcerouting/fix/autocomplete_for_advertise_map

bgpd: Use autocomplete for route-map under conditional advertisements CLI

3 years agoMerge pull request #10999 from opensourcerouting/fix/bgp_aliases_with_community
Russ White [Tue, 12 Apr 2022 18:37:58 +0000 (14:37 -0400)]
Merge pull request #10999 from opensourcerouting/fix/bgp_aliases_with_community

bgpd: Allow setting BGP [large]community in route-maps

3 years agoMerge pull request #11000 from opensourcerouting/feature/show_conditional_adv_timer_i...
Mark Stapp [Tue, 12 Apr 2022 15:54:16 +0000 (11:54 -0400)]
Merge pull request #11000 from opensourcerouting/feature/show_conditional_adv_timer_in_neighbor_cli

bgpd: Show conditional advertisement timers in neighbor CLI output

3 years agoMerge pull request #10989 from opensourcerouting/pim-options-remove
mobash-rasool [Tue, 12 Apr 2022 15:40:44 +0000 (21:10 +0530)]
Merge pull request #10989 from opensourcerouting/pim-options-remove

pimd: remove pim_interface->options

3 years agopim6d: Addition of ipv6 ssmpingd config commands 10931/head
Balaji Gurudoss [Mon, 4 Apr 2022 13:01:50 +0000 (18:31 +0530)]
pim6d: Addition of ipv6 ssmpingd config commands

Signed-off-by: Balaji Gurudoss <G_Balaji1@dell.com>
3 years agoMerge pull request #11003 from anlancs/bgpd-mh-trival-remove
Donatas Abraitis [Tue, 12 Apr 2022 06:00:08 +0000 (09:00 +0300)]
Merge pull request #11003 from anlancs/bgpd-mh-trival-remove

bgpd: correct one flag name on comment for evpn-mh

3 years agoMerge pull request #11006 from opensourcerouting/fix/remove_&routemap_optimization_cmd
Igor Ryzhov [Mon, 11 Apr 2022 20:22:41 +0000 (23:22 +0300)]
Merge pull request #11006 from opensourcerouting/fix/remove_&routemap_optimization_cmd

lib: Remove deprecated routemap_optimization_cmd

3 years agobgpd: Fix styling for aggregate_addressv4_cmd 11009/head
Donatas Abraitis [Mon, 11 Apr 2022 14:53:42 +0000 (17:53 +0300)]
bgpd: Fix styling for aggregate_addressv4_cmd

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Add autocomplete for `aggregate-address ... route-map X`
Donatas Abraitis [Mon, 11 Apr 2022 14:47:52 +0000 (17:47 +0300)]
bgpd: Add autocomplete for `aggregate-address ... route-map X`

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Send MED attribute when aggregate prefix is created
Donatas Abraitis [Mon, 11 Apr 2022 14:46:04 +0000 (17:46 +0300)]
bgpd: Send MED attribute when aggregate prefix is created

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #11007 from mobash-rasool/fixes
Donatas Abraitis [Mon, 11 Apr 2022 11:28:15 +0000 (14:28 +0300)]
Merge pull request #11007 from mobash-rasool/fixes

pimd: correct the show ip igmp sources output

3 years agopimd: correct the show ip igmp sources output 11007/head
Mobashshera Rasool [Mon, 11 Apr 2022 07:14:22 +0000 (00:14 -0700)]
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>
3 years agolib: Remove deprecated routemap_optimization_cmd 11006/head
Donatas Abraitis [Mon, 11 Apr 2022 07:12:18 +0000 (10:12 +0300)]
lib: Remove deprecated routemap_optimization_cmd

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agotests: Do not turn off multicast stream 10969/head
Donald Sharp [Sun, 10 Apr 2022 11:47:01 +0000 (07:47 -0400)]
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>
3 years agotests: Fix test_multicast_pim_sm_topo3.py from generating a support bundle
Donald Sharp [Tue, 5 Apr 2022 13:26:18 +0000 (09:26 -0400)]
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>
3 years agobgpd: correct one flag name on comment for evpn-mh 11003/head
anlan_cs [Sun, 10 Apr 2022 08:03:24 +0000 (16:03 +0800)]
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>
3 years agobgpd: Show conditional advertisement timers in neighbor CLI output 11000/head
Donatas Abraitis [Sat, 9 Apr 2022 14:52:46 +0000 (17:52 +0300)]
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>
3 years agoMerge pull request #10919 from donaldsharp/lost_kernel_routes
Russ White [Sat, 9 Apr 2022 15:09:40 +0000 (11:09 -0400)]
Merge pull request #10919 from donaldsharp/lost_kernel_routes

zebra: Allow multiple connected routes to be choosen for kernel routes

3 years agobgpd: Allow setting BGP [large]community in route-maps 10999/head
Donatas Abraitis [Fri, 8 Apr 2022 19:57:47 +0000 (22:57 +0300)]
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>
3 years agowatchfrr: Send operational state to systemd 10996/head
Donald Sharp [Wed, 6 Apr 2022 13:13:51 +0000 (09:13 -0400)]
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>
3 years agobgpd: Do not forget to update conditional advertisements rmaps for peer-groups 10987/head
Donatas Abraitis [Thu, 7 Apr 2022 20:01:02 +0000 (23:01 +0300)]
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>
3 years agoMerge pull request #10981 from opensourcerouting/vty-wrmem-newline
mobash-rasool [Fri, 8 Apr 2022 16:39:16 +0000 (22:09 +0530)]
Merge pull request #10981 from opensourcerouting/vty-wrmem-newline

vtysh: remove extraneous newline

3 years agobgpd: Use autocomplete for route-map under conditional advertisements CLI 10994/head
Donatas Abraitis [Fri, 8 Apr 2022 13:54:22 +0000 (16:54 +0300)]
bgpd: Use autocomplete for route-map under conditional advertisements CLI

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agodoc: Add `show ip nht..` documentation 10910/head
Donald Sharp [Mon, 28 Mar 2022 12:45:32 +0000 (08:45 -0400)]
doc: Add `show ip nht..` documentation

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add a test to ensure that FRR does not loose kernel routes 10919/head
Donald Sharp [Wed, 30 Mar 2022 13:13:12 +0000 (09:13 -0400)]
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>
3 years agozebra: Allow multiple connected routes to be choosen for kernel routes
Donald Sharp [Tue, 29 Mar 2022 14:55:34 +0000 (10:55 -0400)]
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>
3 years agoMerge pull request #10982 from donaldsharp/enum_watchfrr
Donatas Abraitis [Fri, 8 Apr 2022 11:58:36 +0000 (14:58 +0300)]
Merge pull request #10982 from donaldsharp/enum_watchfrr

Enum watchfrr

3 years agopimd: remove pim_interface->options 10989/head
David Lamparter [Fri, 8 Apr 2022 08:30:24 +0000 (10:30 +0200)]
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>
3 years agoMerge pull request #10979 from opensourcerouting/pim-ssm-clean
Donald Sharp [Thu, 7 Apr 2022 17:08:01 +0000 (13:08 -0400)]
Merge pull request #10979 from opensourcerouting/pim-ssm-clean

lib, pimd: small cleanup in multicast addr helpers (SSM & co.)

3 years agovtysh: remove extraneous newline 10981/head
David Lamparter [Thu, 7 Apr 2022 12:44:23 +0000 (14:44 +0200)]
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>
3 years agowatchfrr: Convert daemon_state_t to an enum instead of a typedef 10982/head
Donald Sharp [Wed, 6 Apr 2022 14:44:41 +0000 (10:44 -0400)]
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>
3 years agowatchfrr: Rename restart_phase_t to `enum restart_phase`
Donald Sharp [Wed, 6 Apr 2022 13:21:37 +0000 (09:21 -0400)]
watchfrr: Rename restart_phase_t to `enum restart_phase`

This will align with our coding standards.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: use SSM check helper 10979/head
David Lamparter [Thu, 7 Apr 2022 11:51:35 +0000 (13:51 +0200)]
pimd: use SSM check helper

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib, pimd: add a bunch of address helpers
David Lamparter [Thu, 7 Apr 2022 11:47:37 +0000 (13:47 +0200)]
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>
3 years agobgpd: cosmetic change for evpn-mh 10978/head
anlan_cs [Thu, 7 Apr 2022 06:02:07 +0000 (02:02 -0400)]
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>
3 years agoMerge pull request #10927 from bobuhiro11/refactor_srv6_locator_chunks
Igor Ryzhov [Wed, 6 Apr 2022 18:36:39 +0000 (21:36 +0300)]
Merge pull request #10927 from bobuhiro11/refactor_srv6_locator_chunks

bgpd: refactor type of srv6_locator_chunks list

3 years agoMerge pull request #10971 from opensourcerouting/fix/rpki_nits
Donald Sharp [Wed, 6 Apr 2022 11:41:53 +0000 (07:41 -0400)]
Merge pull request #10971 from opensourcerouting/fix/rpki_nits

bgpd: RPKI memory leak

3 years agobgpd: Delay returning RPKI instance as running 10971/head
Donatas Abraitis [Tue, 5 Apr 2022 13:54:19 +0000 (16:54 +0300)]
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>
3 years agobgpd: Return enum RPKI_NOT_BEING_USED instead of 0
Donatas Abraitis [Tue, 5 Apr 2022 12:52:40 +0000 (15:52 +0300)]
bgpd: Return enum RPKI_NOT_BEING_USED instead of 0

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Reuse is_stopping() in RPKI code same as with is_running()
Donatas Abraitis [Tue, 5 Apr 2022 11:14:00 +0000 (14:14 +0300)]
bgpd: Reuse is_stopping() in RPKI code same as with is_running()

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Reuse is_running() function in RPKI code for rtr_is_running
Donatas Abraitis [Tue, 5 Apr 2022 11:10:16 +0000 (14:10 +0300)]
bgpd: Reuse is_running() function in RPKI code for rtr_is_running

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10973 from mobash-rasool/fixes
Donatas Abraitis [Wed, 6 Apr 2022 07:32:02 +0000 (10:32 +0300)]
Merge pull request #10973 from mobash-rasool/fixes

pimd: Remove pim_channel_oil_change_iif from header file

3 years agopimd: Remove pim_channel_oil_change_iif from header file 10973/head
Mobashshera Rasool [Wed, 6 Apr 2022 04:54:01 +0000 (21:54 -0700)]
pimd: Remove pim_channel_oil_change_iif from header file

pim_channel_oil_change_iif is sitting idly in .h file with no
definition.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agobgpd: refactor type of srv6_locator_chunks list 10927/head
Nobuhiro MIKI [Wed, 6 Apr 2022 04:40:14 +0000 (13:40 +0900)]
bgpd: refactor type of srv6_locator_chunks list

Since additional information such as block_bits_length is needed to
generate SIDs properly, the type of elements in srv6_locator_chunks
list is extended from "struct prefix_ipv6 *" to
"struct srv6_locator_chunk *". Even in terms of variable name,
"struct srv6_locator_chunk *" is appropriate.

Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
3 years agoMerge pull request #10965 from opensourcerouting/fix/pim_igmp_group_delete
mobash-rasool [Tue, 5 Apr 2022 22:37:30 +0000 (04:07 +0530)]
Merge pull request #10965 from opensourcerouting/fix/pim_igmp_group_delete

pimd: Replace ALL_LIST_ELEMENTS_RO to ALL_LIST_ELEMENTS group_list it…

3 years agoMerge pull request #10966 from opensourcerouting/fix/memory_leak_rpki
Donald Sharp [Tue, 5 Apr 2022 22:27:52 +0000 (18:27 -0400)]
Merge pull request #10966 from opensourcerouting/fix/memory_leak_rpki

bgpd: RPKI changes

3 years agoMerge pull request #10365 from SaiGomathiN/ipv6-config-cmd
David Lamparter [Tue, 5 Apr 2022 19:07:15 +0000 (21:07 +0200)]
Merge pull request #10365 from SaiGomathiN/ipv6-config-cmd

3 years agoMerge pull request #10849 from anlancs/bgpd-cleanup-2
Russ White [Tue, 5 Apr 2022 15:40:12 +0000 (11:40 -0400)]
Merge pull request #10849 from anlancs/bgpd-cleanup-2

bgpd: remove unnecessary checkings for bgp_evpn_es_new()

3 years agoMerge pull request #10968 from opensourcerouting/fix/gr_ordering
Russ White [Tue, 5 Apr 2022 14:20:15 +0000 (10:20 -0400)]
Merge pull request #10968 from opensourcerouting/fix/gr_ordering

bgpd: Use proper debug msg for graceful restart commands

3 years agoMerge pull request #10928 from anlancs/zebra-cleanup-1
Donald Sharp [Tue, 5 Apr 2022 13:49:00 +0000 (09:49 -0400)]
Merge pull request #10928 from anlancs/zebra-cleanup-1

zebra: use "assert" instead of unnecessary check

3 years agoMerge pull request #10940 from opensourcerouting/pim-5549-clarify
Donald Sharp [Tue, 5 Apr 2022 13:43:39 +0000 (09:43 -0400)]
Merge pull request #10940 from opensourcerouting/pim-5549-clarify

pimd: clarify RFC5549 nexthop handling (& fix for pim6d)

3 years agoMerge pull request #10959 from patrasar/pim_coverity
Donald Sharp [Tue, 5 Apr 2022 13:38:42 +0000 (09:38 -0400)]
Merge pull request #10959 from patrasar/pim_coverity

pimd: Fixing pim coverity issues

3 years agoMerge pull request #10938 from anlancs/fix-zebra-vxlan-change-vrfid
Russ White [Tue, 5 Apr 2022 12:55:42 +0000 (08:55 -0400)]
Merge pull request #10938 from anlancs/fix-zebra-vxlan-change-vrfid

zebra: fix missing vrf change of l2vni on vxlan interface

3 years agoMerge pull request #10948 from anlancs/bgpd-cleanup-4
Russ White [Tue, 5 Apr 2022 12:54:00 +0000 (08:54 -0400)]
Merge pull request #10948 from anlancs/bgpd-cleanup-4

bgpd : use "assert" for one check on evpn-mh

3 years agobgpd: Use proper debug msg for graceful restart commands 10968/head
Donatas Abraitis [Tue, 5 Apr 2022 10:57:35 +0000 (13:57 +0300)]
bgpd: Use proper debug msg for graceful restart commands

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10960 from opensourcerouting/pim-unmacro-1
mobash-rasool [Tue, 5 Apr 2022 09:47:25 +0000 (15:17 +0530)]
Merge pull request #10960 from opensourcerouting/pim-unmacro-1

pimd: remove useless PIM_IF_* macros

3 years agobgpd: No need to check for NULL before calling XFREE() in RPKI code 10966/head
Donatas Abraitis [Tue, 5 Apr 2022 08:12:22 +0000 (11:12 +0300)]
bgpd: No need to check for NULL before calling XFREE() in RPKI code

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Track RTRLib memory allocations separately
Donatas Abraitis [Tue, 5 Apr 2022 08:02:07 +0000 (11:02 +0300)]
bgpd: Track RTRLib memory allocations separately

With fast `rpki reset`, seems that RTRLib related memory allocations leak
the memory. Need to figure this out later.

```
$ vtysh -c 'show memory | include RPKI'
BGP RPKI Cache server         :       12 variable       576       12       576
BGP RPKI Cache server group   :        0     48           0        1        56
BGP RPKI RTRLib               :   849657 variable  34453096   849662  41293504

$ for x in $(seq 1 60); do vtysh -c 'con' -c 'rpki' -c 'rpki reset'; sleep 1; done

$ vtysh -c 'show memory | include RPKI'
BGP RPKI Cache server         :       12 variable       576       12       576
BGP RPKI Cache server group   :        0     48           0        1        56
BGP RPKI RTRLib               :   849699 variable  69490616   849701  76323832
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agopimd: Replace ALL_LIST_ELEMENTS_RO to ALL_LIST_ELEMENTS group_list iteration 10965/head
Donatas Abraitis [Tue, 5 Apr 2022 07:48:56 +0000 (10:48 +0300)]
pimd: Replace ALL_LIST_ELEMENTS_RO to ALL_LIST_ELEMENTS group_list iteration

To reproduce:
```
ip pim ssm prefix-list pim-ssm-group
ip prefix-list pim-ssm-group seq 10 permit 238.4.0.0/16 ge 32 le 32
```

Assert:
```
pimd[645545]: pimd/pim_igmp.c:148: igmp_source_forward_reevaluate_all(): assertion ((srcnode)->data != NULL) failed
PIM[645545]: Received signal 6 at 1649140750 (si_addr 0x6e0009d9a9, PC 0x7fe5e3f95ce1); aborting...
PIM[645545]: /usr/local/lib/libfrr.so.0(zlog_backtrace_sigsafe+0x5e) [0x7fe5e41f2d7e]
PIM[645545]: /usr/local/lib/libfrr.so.0(zlog_signal+0xe6) [0x7fe5e41f2f56]
PIM[645545]: /usr/local/lib/libfrr.so.0(+0xc9412) [0x7fe5e421d412]
PIM[645545]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x14140) [0x7fe5e4133140]
PIM[645545]: /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x141) [0x7fe5e3f95ce1]
PIM[645545]: /lib/x86_64-linux-gnu/libc.so.6(abort+0x123) [0x7fe5e3f7f537]
PIM[645545]: /usr/local/lib/libfrr.so.0(_zlog_assert_failed+0xd7) [0x7fe5e4246c37]
PIM[645545]: /usr/lib/frr/pimd(igmp_source_forward_reevaluate_all+0x230) [0x5638c65e3d90]
PIM[645545]: /usr/lib/frr/pimd(pim_prefix_list_update+0x53) [0x5638c65cbbf3]
PIM[645545]: /usr/local/lib/libfrr.so.0(prefix_list_entry_update_start+0x82) [0x7fe5e420a0a2]
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agopim6d: Adding ipv6 mld watermark-warn CLI 10365/head
Sai Gomathi N [Tue, 18 Jan 2022 15:39:01 +0000 (07:39 -0800)]
pim6d: Adding ipv6 mld watermark-warn CLI

Adding the config mode command

ipv6 mld watermark-warn <1-65535>
This command can be use to warn the user
when more than the desired limit of groups gets configured.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
3 years agopimd: Moving the common function from pim_cmd.h file
Sai Gomathi N [Wed, 2 Mar 2022 14:40:19 +0000 (06:40 -0800)]
pimd: Moving the common function from pim_cmd.h file

Moving the PIM_DECLVAR_CONTEXT function to the
common file pim_cmd_common.h file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
3 years agopim6d: Adding "ipv6 mld last-member-query-interval" CLI
Sai Gomathi N [Tue, 18 Jan 2022 15:31:56 +0000 (07:31 -0800)]
pim6d: Adding "ipv6 mld last-member-query-interval" CLI

Adding the Interface level config command

ipv6 mld last-member-query-interval (1-65535)
This command can be use to tune the response time for group specific queries.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
3 years agopim6d: Adding ipv6 mld last-member-query-count CLI
Sai Gomathi N [Tue, 18 Jan 2022 15:24:11 +0000 (07:24 -0800)]
pim6d: Adding ipv6 mld last-member-query-count CLI

Adding the Interface level config command

ipv6 mld last-member-query-count (1-255)
This command can be use to tune the number of Multicast-Address- Specific Queries
sent before the router assumes there are no remaining listeners for an address on a link.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
3 years agopim6d: Adding "ipv6 mld query-max-response-time" CLI
Sai Gomathi N [Tue, 18 Jan 2022 15:16:51 +0000 (07:16 -0800)]
pim6d: Adding "ipv6 mld query-max-response-time" CLI

Adding the Interface level config command

ipv6 mld query-max-response-time <1-65535>
This command can be use to tune the max response time for general queries.
The number of seconds represented by the [Query Response Interval] must be less than the [Query Interval]

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
3 years agoMerge pull request #10953 from leonshaw/fix/bgp-rm-leak
Donatas Abraitis [Tue, 5 Apr 2022 06:09:35 +0000 (09:09 +0300)]
Merge pull request #10953 from leonshaw/fix/bgp-rm-leak

bgpd: Fix memory leak in subgroup_announce_check

3 years agoMerge pull request #10946 from donaldsharp/pim_fhr_lhr_same_pimreg
Jafar Al-Gharaibeh [Mon, 4 Apr 2022 19:00:49 +0000 (14:00 -0500)]
Merge pull request #10946 from donaldsharp/pim_fhr_lhr_same_pimreg

pimd: Send immediate join( with possible SG RPT prune bit set

3 years agopim6d: fix mis-printed nexthop 10940/head
David Lamparter [Thu, 31 Mar 2022 11:09:29 +0000 (13:09 +0200)]
pim6d: fix mis-printed nexthop

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd, pim6d: clarify RFC5549 MRIB nexthop handling
David Lamparter [Thu, 10 Mar 2022 14:45:31 +0000 (15:45 +0100)]
pimd, pim6d: clarify RFC5549 MRIB nexthop handling

The entire `case NEXTHOP_TYPE_IPV6_IFINDEX:` block here was a bit of a
tripwire to stumble over, since there was no indication at all that this
concerns RFC5549 nexthop handling.  So it got mis-adapted for PIM IPv6
support.

Clarify this a whole bunch that this is for v4-over-v6 nexthop mangling,
and nothing else.

This should really also use neighbor's secondary address lists for the
lookup, but that is probably going to break compatibility with other
boxes that don't include v6 addrs in v4 hellos and needs further
machinery to do properly, so for now just leave a breadcrumb.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #10710 from SaiGomathiN/pimv6-showcli
David Lamparter [Mon, 4 Apr 2022 12:42:27 +0000 (14:42 +0200)]
Merge pull request #10710 from SaiGomathiN/pimv6-showcli

3 years agopimd: fix pim_instance NULL deference in zclient_lookup_read_pipe 10959/head
sarita patra [Mon, 4 Apr 2022 10:55:23 +0000 (03:55 -0700)]
pimd: fix pim_instance NULL deference in zclient_lookup_read_pipe

Fixing the below coverity issue.
>>>     CID 1515546:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "pim" when calling "zclient_lookup_nexthop_once".
391             zclient_lookup_nexthop_once(pim, nexthop_tab, 10, l);

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agopimd: fix pim_instance NULL deference in pim_zebra_if_address_add
sarita patra [Mon, 4 Apr 2022 10:54:42 +0000 (03:54 -0700)]
pimd: fix pim_instance NULL deference in pim_zebra_if_address_add

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agopimd: fix pim_instance NULL deference in pim_vxlan_mlag_update
sarita patra [Mon, 4 Apr 2022 10:53:36 +0000 (03:53 -0700)]
pimd: fix pim_instance NULL deference in pim_vxlan_mlag_update

Fixing the below coverity issue.
>>>     CID 1515545:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "pim" when calling "pim_vxlan_set_peerlink_rif".
902                     pim_vxlan_set_peerlink_rif(pim, NULL);

Signed-off-by: sarita patra <saritap@vmware.com>