]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 years agoMerge pull request #11229 from anlancs/fix/zebra-nb-remove-checknode
Donald Sharp [Tue, 14 Jun 2022 17:58:16 +0000 (13:58 -0400)]
Merge pull request #11229 from anlancs/fix/zebra-nb-remove-checknode

zebra: remove one unnecessary check for l3vni nb

2 years agoMerge pull request #11243 from patrasar/pimv6_issue_11240
Donald Sharp [Tue, 14 Jun 2022 15:59:42 +0000 (11:59 -0400)]
Merge pull request #11243 from patrasar/pimv6_issue_11240

pim6d: Don't enable mld on pimreg interface by default

2 years agoMerge pull request #11395 from opensourcerouting/fix/autocompete_for_rmap_bgp
Donald Sharp [Tue, 14 Jun 2022 14:48:36 +0000 (10:48 -0400)]
Merge pull request #11395 from opensourcerouting/fix/autocompete_for_rmap_bgp

*: Use autocomplete for route-maps under commands that require it

2 years agoMerge pull request #11344 from opensourcerouting/feature/wrap_ipv4_unicast_valid
Russ White [Tue, 14 Jun 2022 11:48:32 +0000 (07:48 -0400)]
Merge pull request #11344 from opensourcerouting/feature/wrap_ipv4_unicast_valid

bgpd: Wrap IPV4_CLASS_DE into ipv4_unicast_valid() helper

2 years agoMerge pull request #11392 from opensourcerouting/fix/ttl_set
Russ White [Tue, 14 Jun 2022 11:43:49 +0000 (07:43 -0400)]
Merge pull request #11392 from opensourcerouting/fix/ttl_set

bgpd: Set TTL for iBGP/eBGP by checking only if Generic TTL security applied

2 years agoMerge pull request #11343 from opensourcerouting/fix/local_preference_plus_minus_rout...
Russ White [Tue, 14 Jun 2022 10:53:08 +0000 (06:53 -0400)]
Merge pull request #11343 from opensourcerouting/fix/local_preference_plus_minus_route_maps

bgpd: Initialize attr->local_pref to the configured default value

2 years ago*: Use autocomplete for route-maps under commands that require it
Donatas Abraitis [Mon, 13 Jun 2022 09:18:36 +0000 (12:18 +0300)]
*: Use autocomplete for route-maps under commands that require it

For example:

```
donatas-laptop# show bgp ipv4 unicast neighbors 127.0.0.2 advertised-routes route-map ?
  RMAP_NAME  Name of the route map
       testas2 testas

donatas-laptop(config)# router bgp
donatas-laptop(config-router)# address-family ipv4
donatas-laptop(config-router-af)# redistribute connected route-map ?
  RMAP_NAME  Pointer to route-map entries
       testas2 testas

donatas-laptop(config-router-af)# network 192.168.0.0/23 route-map ?
  RMAP_NAME  Name of the route map
       testas2 testas
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Wrap IPV4_CLASS_DE into ipv4_unicast_valid() helper
Donatas Abraitis [Mon, 6 Jun 2022 07:47:27 +0000 (10:47 +0300)]
bgpd: Wrap IPV4_CLASS_DE into ipv4_unicast_valid() helper

Linux kernel allows (FreeBSD/OpenBSD too) using reserved class E IP ranges.

This is a preparation commit that ease the global switch to allow/deny
class E IP ranges in FRR.

https://datatracker.ietf.org/doc/html/draft-chen-ati-adaptive-ipv4-address-space

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11333 from opensourcerouting/fix/memory_leak_with_rmaps
Donald Sharp [Mon, 13 Jun 2022 12:27:24 +0000 (08:27 -0400)]
Merge pull request #11333 from opensourcerouting/fix/memory_leak_with_rmaps

bgpd: Fix memory leak when setting [l]community at egress

2 years agoMerge pull request #11294 from mobash-rasool/pim-cli-top
Donald Sharp [Mon, 13 Jun 2022 12:26:09 +0000 (08:26 -0400)]
Merge pull request #11294 from mobash-rasool/pim-cli-top

pim6d: Adding PIM protocol packets stats CLI

2 years agoMerge pull request #11358 from opensourcerouting/fix/implicit_withdraw_for_vrf_leakin...
Donald Sharp [Mon, 13 Jun 2022 11:46:18 +0000 (07:46 -0400)]
Merge pull request #11358 from opensourcerouting/fix/implicit_withdraw_for_vrf_leaking_with_route_maps

bgpd: Fix VRF leaking when import/export RT list changed with route-maps

2 years agodoc: Updated the doc for new CLI addition
Mobashshera Rasool [Thu, 26 May 2022 09:53:37 +0000 (02:53 -0700)]
doc: Updated the doc for new CLI addition

Added doc for "show ipv6 pim interface traffic" cli

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Implement show ipv6 pim interface traffic
Mobashshera Rasool [Thu, 26 May 2022 09:50:32 +0000 (02:50 -0700)]
pim6d: Implement show ipv6 pim interface traffic

This CLI shows the number of PIM protocol packets
sent/received on each interface.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopimd: Change to DEFPY and make the api common
Mobashshera Rasool [Wed, 1 Jun 2022 15:58:33 +0000 (08:58 -0700)]
pimd: Change to DEFPY and make the api common

For show ip pim interface traffic cli, doing the below changes
1. Changing DEFUN to DEFPY
2. Move the whole code to a common api and modify it so that can
be reused for pimv6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Moving show apis to common file
Mobashshera Rasool [Fri, 27 May 2022 05:11:12 +0000 (22:11 -0700)]
pim6d: Moving show apis to common file

Moving pim_show_interface_traffic and pim_show_interface_traffic_single
to pim_cmd_common.c from pim_cmd.c to make it common to
pimd and pim6d.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11385 from AbhishekNR/show_cli
Donald Sharp [Sun, 12 Jun 2022 12:06:01 +0000 (08:06 -0400)]
Merge pull request #11385 from AbhishekNR/show_cli

pimd, pim6d: Moving reusable code to common api for show CLI's.

2 years agoMerge pull request #11388 from opensourcerouting/feature/github_stale_issues_prs
Donald Sharp [Sun, 12 Jun 2022 12:00:42 +0000 (08:00 -0400)]
Merge pull request #11388 from opensourcerouting/feature/github_stale_issues_prs

github: Mark issues with no activity in 180 days as stale

2 years agoMerge pull request #11387 from SaiGomathiN/pimshow
Donald Sharp [Sun, 12 Jun 2022 12:00:01 +0000 (08:00 -0400)]
Merge pull request #11387 from SaiGomathiN/pimshow

pimd, pim6d: Moving the reusable code to common api for PIM show CLIs

2 years agoMerge pull request #11378 from ton31337/fix/compile_sysrepo
Jafar Al-Gharaibeh [Fri, 10 Jun 2022 21:10:27 +0000 (16:10 -0500)]
Merge pull request #11378 from ton31337/fix/compile_sysrepo

lib: sysrepo compilation issues

2 years agoMerge pull request #11389 from ton31337/fix/some_codeql_fixes
Jafar Al-Gharaibeh [Fri, 10 Jun 2022 21:08:12 +0000 (16:08 -0500)]
Merge pull request #11389 from ton31337/fix/some_codeql_fixes

bgpd: Minor warning fixes

2 years agobgpd: Show TTL value unconditionally for neighbors
Donatas Abraitis [Fri, 10 Jun 2022 13:50:24 +0000 (16:50 +0300)]
bgpd: Show TTL value unconditionally for neighbors

If GTSM configured - show this value, otherwise TTL.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Set TTL for iBGP/eBGP by checking only if Generic TTL security applied
Donatas Abraitis [Fri, 10 Jun 2022 13:32:39 +0000 (16:32 +0300)]
bgpd: Set TTL for iBGP/eBGP by checking only if Generic TTL security applied

We set peer->ttl according if it's iBGP or eBGP, but when setting the TTL,
we technically ignore it.

Relax a bit and set TTL only if no GTSM configured.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotests: Check if old paths are flushed when import/export RT list was changed
Donatas Abraitis [Fri, 10 Jun 2022 11:49:36 +0000 (14:49 +0300)]
tests: Check if old paths are flushed when import/export RT list was changed

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Drop sockunion_vty_out() wrong definition
Donatas Abraitis [Fri, 10 Jun 2022 09:53:10 +0000 (12:53 +0300)]
bgpd: Drop sockunion_vty_out() wrong definition

Probably leftover.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: last_reset_cause_size can't be larger than 65k bytes
Donatas Abraitis [Fri, 10 Jun 2022 09:35:00 +0000 (12:35 +0300)]
bgpd: last_reset_cause_size can't be larger than 65k bytes

Reduce the scope, to avoid comparing uint16_t vs. size_t in a loop.

```
vty_out(vty,
"  Message received that caused BGP to send a NOTIFICATION:\n    ");
for (i = 1; i <= p->last_reset_cause_size;
     i++) {
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agogithub: Mark issues with no activity in 180 days as stale
Donatas Abraitis [Fri, 10 Jun 2022 07:03:05 +0000 (10:03 +0300)]
github: Mark issues with no activity in 180 days as stale

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopim6d: Moving the reusable code of pim_show_join cli
Sai Gomathi N [Fri, 10 Jun 2022 05:43:52 +0000 (22:43 -0700)]
pim6d: Moving the reusable code of pim_show_join cli

Moving the common lines of pim_show_join_vrf and pim_show_join_vrf_all cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agoMerge pull request #11367 from donaldsharp/babel_updates
Donatas Abraitis [Fri, 10 Jun 2022 05:42:01 +0000 (08:42 +0300)]
Merge pull request #11367 from donaldsharp/babel_updates

Babel updates

2 years agoMerge pull request #11328 from opensourcerouting/fix/drop_label_pton_ntop
Russ White [Thu, 9 Jun 2022 18:11:11 +0000 (14:11 -0400)]
Merge pull request #11328 from opensourcerouting/fix/drop_label_pton_ntop

bgpd: Drop label_ntop/label_pton functions

2 years agoMerge pull request #11259 from kuldeepkash/multicast_pim_dr_nondr
Russ White [Thu, 9 Jun 2022 17:42:29 +0000 (13:42 -0400)]
Merge pull request #11259 from kuldeepkash/multicast_pim_dr_nondr

tests: [Topojson] Enhance CLI logging

2 years agoMerge pull request #11372 from donaldsharp/pim_if_cmp_bug
mobash-rasool [Thu, 9 Jun 2022 17:15:49 +0000 (22:45 +0530)]
Merge pull request #11372 from donaldsharp/pim_if_cmp_bug

pimd: Fix pim_channel_oil_empty tests

2 years agoMerge pull request #11377 from donaldsharp/pim_show_interface_traffic
Jafar Al-Gharaibeh [Thu, 9 Jun 2022 17:00:58 +0000 (12:00 -0500)]
Merge pull request #11377 from donaldsharp/pim_show_interface_traffic

pimd: Show interface traffic even if interface is currently `down`

2 years agolib: Require at least 2.1.42 version of sysrepo when compiling
Donatas Abraitis [Thu, 9 Jun 2022 14:38:37 +0000 (17:38 +0300)]
lib: Require at least 2.1.42 version of sysrepo when compiling

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agolib: Update sysrepo code with the latest API changes
Donatas Abraitis [Thu, 9 Jun 2022 14:33:22 +0000 (17:33 +0300)]
lib: Update sysrepo code with the latest API changes

* sr_event_notif_send -> sr_notif_send
* sr_process_events -> sr_subscription_process_events
* sr_oper_get_items_subscribe -> sr_oper_get_subscribe
* Removed SR_SUBSCR_CTX_REUSE flag from the code at all

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopimd: Show interface traffic even if interface is currently `down`
Donald Sharp [Thu, 9 Jun 2022 14:29:04 +0000 (10:29 -0400)]
pimd: Show interface traffic even if interface is currently `down`

the `show ip pim interface [x] traffic` command was deciding
to skip display of interfaces if they happened to be down at
that moment.  This of course does not make a bunch of sense
to limit the output for a interface that may have sent data
in the past.

This fixes this test crash:
rnode = <lib.topogen.TopoRouter object at 0x7fc755be3880>, dut = 'c1', input_dict = {'c1': {'c1-l1-eth2': ['helloTx', 'helloRx']}}, output_dict = {'c1': {}}

    def show_pim_intf_traffic(rnode, dut, input_dict, output_dict):
        show_pim_intf_traffic_json = run_frr_cmd(
            rnode, "show ip pim interface traffic json", isjson=True
        )

        output_dict[dut] = {}
        for intf, data in input_dict[dut].items():
>           interface_json = show_pim_intf_traffic_json[intf]
E           KeyError: 'c1-l1-eth2'

/home/sharpd/frr8/tests/topotests/lib/pim.py:1496: KeyError

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: Fixup oil_if_has and oil_if_set to be consistent
Donald Sharp [Thu, 9 Jun 2022 11:06:30 +0000 (07:06 -0400)]
pimd: Fixup oil_if_has and oil_if_set to be consistent

the v4 and v6 versions were different.  Make them the same.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Clarify what test_pim_dr_nondr_with_static_routes_topo1.py is doing
Donald Sharp [Wed, 8 Jun 2022 20:56:22 +0000 (16:56 -0400)]
tests: Clarify what test_pim_dr_nondr_with_static_routes_topo1.py is doing

There are a couple steps listing what is being done that are both inprecise
and missleading.  Fix to actually say what is going on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: Fix pim_channel_oil_empty tests
Donald Sharp [Wed, 8 Jun 2022 20:51:48 +0000 (16:51 -0400)]
pimd: Fix pim_channel_oil_empty tests

The pim_channel_oil_empty() function was setting
the pimreg if it ever existed for NULL comparison
but of course the pimreg device is never pulled back
out again when it was needed to be when the pimreg
is not present.

Commit: a5fa982256b23d53d5b833f75224fb7f96054b9b
broke this.

Fixes: #11368
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopim6d: Moving reusable code to common api for "show mroute summary" command
Abhishek N R [Thu, 9 Jun 2022 11:53:12 +0000 (04:53 -0700)]
pim6d: Moving reusable code to common api for "show mroute summary" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving reusable code to common api for "show ip/ipv6 mroute count" command
Abhishek N R [Thu, 9 Jun 2022 11:43:28 +0000 (04:43 -0700)]
pim6d: Moving reusable code to common api for "show ip/ipv6 mroute count" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving reusable code to common api for "show ip/ipv6 mroute" command
Abhishek N R [Thu, 9 Jun 2022 11:27:20 +0000 (04:27 -0700)]
pim6d: Moving reusable code to common api for "show ip/ipv6 mroute" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving the common lines of pim_show_nexthop_lookup cli
Sai Gomathi N [Thu, 9 Jun 2022 11:22:42 +0000 (04:22 -0700)]
pim6d: Moving the common lines of pim_show_nexthop_lookup cli

Moving the common lines of pim_show_nexthop_lookup cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Moving reusable code to common api for "show ip/ipv6 multicast count" command
Abhishek N R [Thu, 9 Jun 2022 11:04:14 +0000 (04:04 -0700)]
pim6d: Moving reusable code to common api for "show ip/ipv6 multicast count" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agobabeld: Ignore sub-tlv's with mandatory bit set
Donald Sharp [Wed, 8 Jun 2022 13:01:31 +0000 (09:01 -0400)]
babeld: Ignore sub-tlv's with mandatory bit set

RFC 8966 4.4

   If the mandatory bit is set, then the
   whole enclosing TLV MUST be silently ignored (except for updating the
   parser state by a Router-Id, Next Hop, or Update TLV, as described in
   the next section).

Fixes: #11349
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobabeld: Update to ignore unicast hellos
Donald Sharp [Wed, 8 Jun 2022 12:41:05 +0000 (08:41 -0400)]
babeld: Update to ignore unicast hellos

RFC 8966 requires a bit of work to make FRR forward compabitble with
it for the moment.

tl;dr -> Flags of hellos should be 0 except the main bit and
The Unicast Hello bit if set should cause the packet to be ignored.
Additionally FRR needs to ignore Hello packets with the interval field
set to 0.

Fixes: #11349
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopim6d: Moving reusable code to common api for "show ip/ipv6 multicast" command
Abhishek N R [Thu, 9 Jun 2022 10:51:41 +0000 (03:51 -0700)]
pim6d: Moving reusable code to common api for "show ip/ipv6 multicast" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving reusable code to common api for "show pim state" command
Abhishek N R [Thu, 9 Jun 2022 10:29:02 +0000 (03:29 -0700)]
pim6d: Moving reusable code to common api for "show pim state" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving the common lines of pim_show_nexthop cli
Sai Gomathi N [Thu, 9 Jun 2022 10:23:28 +0000 (03:23 -0700)]
pim6d: Moving the common lines of pim_show_nexthop cli

Moving the common lines of pim_show_nexthop cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Moving reusable code to common api for "show pim upstream rpf" command
Abhishek N R [Thu, 9 Jun 2022 10:10:21 +0000 (03:10 -0700)]
pim6d: Moving reusable code to common api for "show pim upstream rpf" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving reusable code to common api for "show pim upstream join desired" command
Abhishek N R [Thu, 9 Jun 2022 09:57:49 +0000 (02:57 -0700)]
pim6d: Moving reusable code to common api for "show pim upstream join desired" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving reusable code to common api for "show pim upstream" command
Abhishek N R [Thu, 9 Jun 2022 09:40:21 +0000 (02:40 -0700)]
pim6d: Moving reusable code to common api for "show pim upstream" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving the common lines of pim_show_neighbors_vrf_all cli
Sai Gomathi N [Thu, 9 Jun 2022 09:36:08 +0000 (02:36 -0700)]
pim6d: Moving the common lines of pim_show_neighbors_vrf_all cli

Moving the common lines of pim_show_neighbors_vrf_all cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Moving reusable code to common api for "show pim statistics" command
Abhishek N R [Thu, 9 Jun 2022 08:59:58 +0000 (01:59 -0700)]
pim6d: Moving reusable code to common api for "show pim statistics" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving the common lines of pim_show_neighbors cli
Sai Gomathi N [Thu, 9 Jun 2022 08:34:06 +0000 (01:34 -0700)]
pim6d: Moving the common lines of pim_show_neighbors cli

Moving the common lines of pim_show_neighbors cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Moving reusable code to common api for "show pim secondary" command
Abhishek N R [Thu, 9 Jun 2022 08:33:01 +0000 (01:33 -0700)]
pim6d: Moving reusable code to common api for "show pim secondary" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving resuable code to common api for "show pim rp-info" command
Abhishek N R [Thu, 9 Jun 2022 07:49:38 +0000 (00:49 -0700)]
pim6d: Moving resuable code to common api for "show pim rp-info" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopim6d: Moving the common lines of pim_local_membership cli
Sai Gomathi N [Thu, 9 Jun 2022 07:31:33 +0000 (00:31 -0700)]
pim6d: Moving the common lines of pim_local_membership cli

Moving the common lines of pim_local_membership cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Moving the common lines of pim_show_jp_agg cli
Sai Gomathi N [Thu, 9 Jun 2022 07:15:11 +0000 (00:15 -0700)]
pim6d: Moving the common lines of pim_show_jp_agg cli

Moving the common lines of pim_show_jp_agg cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agoMerge pull request #11370 from donaldsharp/lib_zebra_cleanup
Donatas Abraitis [Thu, 9 Jun 2022 07:17:24 +0000 (10:17 +0300)]
Merge pull request #11370 from donaldsharp/lib_zebra_cleanup

Lib zebra cleanup

2 years agopim6d: Moving the common lines of pim_show_interface_vrf_all cli
Sai Gomathi N [Thu, 9 Jun 2022 06:56:17 +0000 (23:56 -0700)]
pim6d: Moving the common lines of pim_show_interface_vrf_all cli

Moving the common lines of pim_show_interface_vrf_all cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Moving the common lines of pim_show_interface cli
Sai Gomathi N [Thu, 9 Jun 2022 06:10:22 +0000 (23:10 -0700)]
pim6d: Moving the common lines of pim_show_interface cli

Moving the common lines of pim_show_interface cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Moving the common lines of pim_show_channel cli
Sai Gomathi N [Thu, 2 Jun 2022 04:54:44 +0000 (21:54 -0700)]
pim6d: Moving the common lines of pim_show_channel cli

Moving the common lines of pim_show_channel cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Moving resuable code to common api for "show pim rpf" command
Abhishek N R [Thu, 9 Jun 2022 05:49:16 +0000 (22:49 -0700)]
pim6d: Moving resuable code to common api for "show pim rpf" command

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agoMerge pull request #11360 from opensourcerouting/fix/distro_changelogs
Jafar Al-Gharaibeh [Thu, 9 Jun 2022 04:56:21 +0000 (23:56 -0500)]
Merge pull request #11360 from opensourcerouting/fix/distro_changelogs

redhat, debian: Update packaging releases

2 years agoMerge pull request #11369 from donaldsharp/pim_addr_cmp
mobash-rasool [Thu, 9 Jun 2022 02:27:24 +0000 (07:57 +0530)]
Merge pull request #11369 from donaldsharp/pim_addr_cmp

pimd: pim_addr_cmp returns 0 for same not -1 or 1

2 years agoospfd: Fixup ospfd.h to declare variable names
Donald Sharp [Wed, 8 Jun 2022 14:37:08 +0000 (10:37 -0400)]
ospfd: Fixup ospfd.h to declare variable names

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: Cleanup workqueue.h to have variable declarations
Donald Sharp [Wed, 8 Jun 2022 14:23:58 +0000 (10:23 -0400)]
lib: Cleanup workqueue.h to have variable declarations

Cleanup workqueue.h to have variable declarations as per
our standard.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: Fixup workqueue.c to use proper thread.h semantics
Donald Sharp [Wed, 8 Jun 2022 14:21:35 +0000 (10:21 -0400)]
lib: Fixup workqueue.c to use proper thread.h semantics

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: pim_addr_cmp returns 0 for same not -1 or 1
Donald Sharp [Wed, 8 Jun 2022 15:33:32 +0000 (11:33 -0400)]
pimd: pim_addr_cmp returns 0 for same not -1 or 1

The test for setting pimDesignatedRouterLocal was comparing
the result of pim_addr_cmp to non zero to say that the
pim_dr_addr and primary_address are the same.  This is
not correct in that pim_addr_cmp returns 0 for being the
same, so the correct test is !pim_addr_cmp

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11356 from mobash-rasool/pim-rfc-conform
Donald Sharp [Wed, 8 Jun 2022 12:15:58 +0000 (08:15 -0400)]
Merge pull request #11356 from mobash-rasool/pim-rfc-conform

pimd: Handle receive of (*,G) register stop with src addr as 0

2 years agodebian: Update changelog for new release (8.4)
Donatas Abraitis [Tue, 7 Jun 2022 20:06:58 +0000 (23:06 +0300)]
debian: Update changelog for new release (8.4)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoredhat: Update changelog for new release (8.4)
Donatas Abraitis [Tue, 7 Jun 2022 20:05:01 +0000 (23:05 +0300)]
redhat: Update changelog for new release (8.4)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Print source VRF name when leaking to another VRF
Donatas Abraitis [Tue, 7 Jun 2022 19:24:40 +0000 (22:24 +0300)]
bgpd: Print source VRF name when leaking to another VRF

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Withdraw implicitly old paths from VRFs when import/export list changes
Donatas Abraitis [Tue, 7 Jun 2022 19:12:07 +0000 (22:12 +0300)]
bgpd: Withdraw implicitly old paths from VRFs when import/export list changes

If we overwrite import/export RT list via route-maps or even flush by using
`set extcommunity none`, then we must withdraw old paths from VRFs to avoid
stale paths.

For example using:

```
router bgp 65500 vrf vrf1
 bgp router-id 10.180.1.1
 !
 address-family ipv4 unicast
  network 192.168.100.100/32 route-map rm
  rd vpn export 65500:10001
  rt vpn import 65500:10000 65500:10990
  rt vpn export 65500:10000
  export vpn
  import vpn
 exit-address-family
exit
!
router bgp 65500 vrf vrf2
 bgp router-id 10.180.1.1
 !
 address-family ipv4 unicast
  rd vpn export 65500:11001
  rt vpn import 65500:11000 65500:11990
  rt vpn export 65500:11000
  export vpn
  import vpn
 exit-address-family
exit
!
route-map rm permit 10
 set extcommunity rt 65500:10100 65500:12990 65500:13990 65500:11990
exit
```

If we strip extcommunities using:

```
route-map rm permit 10
 set extcommunity none
exit
```

or

```
route-map rm permit 10
 set extcommunity rt 65500:10100 65500:12990 65500:13990
```

Routes that are imported with 65500:11990 (192.168.100.100/32 from vrf1)
becomes stale.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobuild: FRR 8.4 development version
Donatas Abraitis [Tue, 7 Jun 2022 19:47:17 +0000 (22:47 +0300)]
build: FRR 8.4 development version

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11312 from opensourcerouting/feature/draft-ietf-idr-bfd-subcode
Pushpasis Sarkar [Tue, 7 Jun 2022 15:57:12 +0000 (21:27 +0530)]
Merge pull request #11312 from opensourcerouting/feature/draft-ietf-idr-bfd-subcode

bgpd: Add Notification CEASE BFD Down message

2 years agoMerge pull request #11334 from ton31337/fix/deprecation_warning
Olivier Dugeon [Tue, 7 Jun 2022 15:38:52 +0000 (17:38 +0200)]
Merge pull request #11334 from ton31337/fix/deprecation_warning

ospfd: Remove local-block deprecated command

2 years agoMerge pull request #11158 from cyberstormdotmu/master
Pushpasis Sarkar [Tue, 7 Jun 2022 15:35:03 +0000 (21:05 +0530)]
Merge pull request #11158 from cyberstormdotmu/master

lib/md5,lib/sha256: Use explicit_bzero to clean up sensitive data.

2 years agoMerge pull request #11318 from pguibert6WIND/isis_mt_std
Russ White [Tue, 7 Jun 2022 15:30:05 +0000 (11:30 -0400)]
Merge pull request #11318 from pguibert6WIND/isis_mt_std

isisd: add ISIS_MT_STANDARD define

2 years agoMerge pull request #11289 from LabNConsulting/chopps/ospfapi-update
Donald Sharp [Tue, 7 Jun 2022 15:00:56 +0000 (11:00 -0400)]
Merge pull request #11289 from LabNConsulting/chopps/ospfapi-update

ospfapi improvements and fixes

2 years agoospfd: Remove local-block deprecated command
Donatas Abraitis [Thu, 2 Jun 2022 10:45:57 +0000 (13:45 +0300)]
ospfd: Remove local-block deprecated command

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopimd: Handle receive of (*,G) register stop with src addr as 0
Mobashshera Rasool [Tue, 7 Jun 2022 12:41:37 +0000 (05:41 -0700)]
pimd: Handle receive of (*,G) register stop with src addr as 0

PIM conformance test case 11.12 sends a register stop msg with
source address as 0. This should trigger a register stop for
all the upstreams. It is not happening as such because we are not
considering 0.0.0.0 source address for starg_handling.

Fixed it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agobgpd: Initialize attr->local_pref to the configured default value
Donatas Abraitis [Mon, 6 Jun 2022 06:49:37 +0000 (09:49 +0300)]
bgpd: Initialize attr->local_pref to the configured default value

When we use network/redistribute local_preference is configured inproperly
when using route-maps something like:

```
network 100.100.100.100/32 route-map rm1
network 100.100.100.200/32 route-map rm2

route-map rm1 permit 10
 set local-preference +10
route-map rm2 permit 10
 set local-preference -10
```

Before:
```
root@spine1-debian-11:~# vtysh -c 'show bgp ipv4 unicast 100.100.100.100/32 json' | jq '.paths[].locPrf'
10
root@spine1-debian-11:~# vtysh -c 'show bgp ipv4 unicast 100.100.100.200/32 json' | jq '.paths[].locPrf'
0
```

After:
```
root@spine1-debian-11:~# vtysh -c 'show bgp ipv4 unicast 100.100.100.100/32 json' | jq '.paths[].locPrf'
110
root@spine1-debian-11:~# vtysh -c 'show bgp ipv4 unicast 100.100.100.200/32 json' | jq '.paths[].locPrf'
90
```

Set local-preference as the default value configured per BGP instance, but
do not set LOCAL_PREF flag by default.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotests: add opaque api test
Christian Hopps [Tue, 10 May 2022 16:13:04 +0000 (12:13 -0400)]
tests: add opaque api test

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfclient: add ospfclient api python class
Christian Hopps [Fri, 24 Dec 2021 07:04:57 +0000 (02:04 -0500)]
ospfclient: add ospfclient api python class

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfd: api: always ready to receive opaque from client
Christian Hopps [Tue, 25 Jan 2022 09:53:53 +0000 (04:53 -0500)]
ospfd: api: always ready to receive opaque from client

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfd: api: add new ISM and NSM sync requests
Christian Hopps [Wed, 19 Jan 2022 11:42:03 +0000 (06:42 -0500)]
ospfd: api: add new ISM and NSM sync requests

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfd: api: remove unused api code/message creation
Christian Hopps [Fri, 14 Jan 2022 15:39:07 +0000 (10:39 -0500)]
ospfd: api: remove unused api code/message creation

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfd: api: fix recovery of LSA after restart of api client
Christian Hopps [Sat, 8 Jan 2022 21:57:10 +0000 (16:57 -0500)]
ospfd: api: fix recovery of LSA after restart of api client

Prior to this fix, restarting the client just failed b/c the code tried to
"refresh" the existing LSA being added, except that code checked for meta-data
to exist, which was deleted when the client disconnected previously (or had
never connected and the LSA state was picked up from the network).

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfd: cli: add "show ip ospf reachable-routers" CLI
Christian Hopps [Mon, 17 Jan 2022 12:55:14 +0000 (07:55 -0500)]
ospfd: cli: add "show ip ospf reachable-routers" CLI

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfd: api: add reachable router notifications
Christian Hopps [Wed, 1 Jun 2022 19:25:35 +0000 (15:25 -0400)]
ospfd: api: add reachable router notifications

Reachable router information is used by OSPF opaque clients in order
to determine if the router advertising the opaque LSA data is
reachable (i.e., 2-way conectivity check).

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfd: add all_rtrs route table when opaque enabled
Christian Hopps [Sat, 15 Jan 2022 11:13:43 +0000 (06:13 -0500)]
ospfd: add all_rtrs route table when opaque enabled

The reachable router table is used by OSPF opaque clients in order to
determine if the router advertising the opaque LSA data is
reachable (i.e., 2-way conectivity check).

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoisisd: replace ipv4-unicast with standard in config and oper contexts
Philippe Guibert [Wed, 1 Jun 2022 13:37:49 +0000 (15:37 +0200)]
isisd: replace ipv4-unicast with standard in config and oper contexts

Only the multi-topology command can use 'ipv4-unicast' keyword to
configure standard topology.
The remaining code: dump from show commands, and yang definition,
uses 'standard' keyword instead.

The test have not been modified. The change would consists in
modifying test_fuzz_isis_tlv_tests.h.gz:
- replacing ipv4-unicast occurences with standard
\x69\x70\x76\x34\x2d\x75\x6e\x69\x63\x61\x73\x74
with
\x73\x74\x61\x6e\x64\x61\x72\x64

- align the buffer length by removing 4 bytes per occurence
Instead, a specific isis_mtid2str_fake() routing has been
put in place in isis_tlvs.c file.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agoMerge pull request #11175 from louis-6wind/ip-vrf-exec
Jafar Al-Gharaibeh [Thu, 2 Jun 2022 18:33:49 +0000 (13:33 -0500)]
Merge pull request #11175 from louis-6wind/ip-vrf-exec

topotests: fix "ip vrf exec"

2 years agoMerge pull request #11329 from opensourcerouting/ospf6-frag-rx
Donald Sharp [Thu, 2 Jun 2022 13:11:56 +0000 (09:11 -0400)]
Merge pull request #11329 from opensourcerouting/ospf6-frag-rx

ospf6d: fix rx/tx buffer sizes

2 years agobgpd: Add Notification CEASE BFD Down message
Donatas Abraitis [Mon, 30 May 2022 14:40:15 +0000 (17:40 +0300)]
bgpd: Add Notification CEASE BFD Down message

Related: https://datatracker.ietf.org/doc/html/draft-ietf-idr-bfd-subcode

When BFD Down notification comes and BGP is configured to track on BFD events,
send BGP Cease/BFD Down notification to the peer.

If RFC 8538 is enabled (Notification support for Graceful-Restart), notification
should be encapsulated into Hard Reset message.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Fix memory leak when setting [l]community at egress
Donatas Abraitis [Thu, 2 Jun 2022 10:30:42 +0000 (13:30 +0300)]
bgpd: Fix memory leak when setting [l]community at egress

```
==2209758== 7,791,480 (399,840 direct, 7,391,640 indirect) bytes in 9,996 blocks are definitely lost in loss record 102 of 103
==2209758==    at 0x4C33B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2209758==    by 0x4EE264F: qcalloc (memory.c:116)
==2209758==    by 0x22E62A: lcommunity_new (bgp_lcommunity.c:42)
==2209758==    by 0x22E62A: lcommunity_dup (bgp_lcommunity.c:155)
==2209758==    by 0x26F28F: route_set_lcommunity (bgp_routemap.c:2382)
==2209758==    by 0x4EFF7EF: route_map_apply_ext (routemap.c:2663)
==2209758==    by 0x250B3D: subgroup_announce_check (bgp_route.c:2202)
==2209758==    by 0x27A195: subgroup_announce_table (bgp_updgrp_adv.c:690)
==2209758==    by 0x27A509: subgroup_coalesce_timer (bgp_updgrp_adv.c:332)
==2209758==    by 0x4F1C3FC: thread_call (thread.c:2002)
==2209758==    by 0x4ED6D67: frr_run (libfrr.c:1196)
==2209758==    by 0x1E921B: main (bgp_main.c:519)
```

To reproduce it's enough to have something like applied at egress:

```
route-map test permit 10
 on-match goto 15
 set large-community 20717:0:0 20717:1:1820 20717:1:3303 20717:1:4788 20717:1:5416 20717:1:5713 20717:1:6774 20717:1:8309 20717:1:8529 20717:1:8697 20717:1:8966 20717:1:9038 20717:1:9119 20717:1:9304 20717:1:9498 20717:1:12779 20717:1:12883 20717:1:13113 20717:1:14340 20717:1:14907 20717:1:15802 20717:1:16347 20717:1:16637 20717:1:18403 20717:1:20717 20717:1:20928 20717:1:21245 20717:1:25818 20717:1:28917 20717:1:30844 20717:1:30990 20717:1:31133 20717:1:35297 20717:1:35320 20717:1:35432 20717:1:35819 20717:1:35838 20717:1:36994 20717:1:37100 20717:1:37558 20717:1:37662 20717:1:39180 20717:1:39405 20717:1:41095 20717:1:43996 20717:1:45489 20717:1:45903 20717:1:47794 20717:1:51185 20717:1:51254 20717:1:58715 20717:1:59605 20717:1:60427 20717:1:62955 20717:1:63008 20717:1:63927 20717:1:64049 20717:1:132602 20717:1:198435 20717:1:205988 20717:1:208278 20717:1:327700
exit
!
route-map test deny 15
exit
!
```

On the other side doing:
```
spine1-debian-11# sharp install routes 100.100.100.1 nexthop 192.168.10.65 30
spine1-debian-11# sharp remove routes 100.100.100.1 30
spine1-debian-11# sharp install routes 100.100.100.1 nexthop 192.168.10.65 30
```

Before:

```
Large Community               :       66     40        2816       66      2816
Large Community value         :       66 variable     29728       66     29728
Large Community               :       96     40        4096       96      4096
Large Community value         :       96 variable     52048       96     52048
```

After:
```
Large Community               :       28     40        1152       29      1192
Large Community value         :       28 variable      1456       29      2200
Large Community               :       28     40        1152       29      1192
Large Community value         :       28 variable      1456       29      2200
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoospfd: cli: add client api debug option
Christian Hopps [Mon, 17 Jan 2022 12:54:12 +0000 (07:54 -0500)]
ospfd: cli: add client api debug option

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoMerge pull request #11314 from chiragshah6/fdev2
Jafar Al-Gharaibeh [Wed, 1 Jun 2022 17:45:49 +0000 (12:45 -0500)]
Merge pull request #11314 from chiragshah6/fdev2

zebra: add error check condition to sock option

2 years agoospf6d: fix rx/tx buffer sizes
David Lamparter [Wed, 1 Jun 2022 15:10:11 +0000 (17:10 +0200)]
ospf6d: fix rx/tx buffer sizes

OSPFv3 packets can be fragmented and up to 64k long, regardless of
interface MTU.  Trying to size these buffers to MTU is just plain wrong.
To not make this a super intrusive change during the 8.3 release freeze,
just code this into ospf6_iobuf_size().

Since the buffer is now always 64k, don't waste time zeroing the entire
thing in receive;  instead just zero kind of a "sled" of 128 bytes after
the buffer as a security precaution.

Fixes: #11298
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>