]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
23 months agoMerge pull request #11502 from donaldsharp/zebra_dplane_fini
Russ White [Tue, 5 Jul 2022 13:49:02 +0000 (09:49 -0400)]
Merge pull request #11502 from donaldsharp/zebra_dplane_fini

zebra: make rib_process_dplane_results own ctx freeing

23 months agoMerge pull request #11508 from louis-6wind/lsp-parse
Russ White [Tue, 5 Jul 2022 13:48:19 +0000 (09:48 -0400)]
Merge pull request #11508 from louis-6wind/lsp-parse

isisd: fix infinite loop when parsing LSPs

23 months agoMerge pull request #11515 from opensourcerouting/fix/cond_advertisements_update_type
Russ White [Tue, 5 Jul 2022 13:44:44 +0000 (09:44 -0400)]
Merge pull request #11515 from opensourcerouting/fix/cond_advertisements_update_type

bgpd: Start conditional advertisements instantly if we configure them

23 months agoMerge pull request #11517 from louis-6wind/advert-map
Russ White [Tue, 5 Jul 2022 13:37:41 +0000 (09:37 -0400)]
Merge pull request #11517 from louis-6wind/advert-map

topostest: bgp_conditional_advertisement cleanup

23 months agoMerge pull request #11527 from mobash-rasool/fixes
Donatas Abraitis [Tue, 5 Jul 2022 13:19:05 +0000 (16:19 +0300)]
Merge pull request #11527 from mobash-rasool/fixes

pimd: Remove unused extern pim_channel_oil_list

23 months agoMerge pull request #11371 from rampxxxx/feat_bfd_ipv4_echo_fwd_path
Rafael Zalamena [Tue, 5 Jul 2022 10:10:11 +0000 (07:10 -0300)]
Merge pull request #11371 from rampxxxx/feat_bfd_ipv4_echo_fwd_path

bfdd: add IPv4 BFD Echo support that loops pkts in forwarding plane

23 months agopimd: Remove unused extern pim_channel_oil_list
Mobashshera Rasool [Tue, 5 Jul 2022 09:25:03 +0000 (02:25 -0700)]
pimd: Remove unused extern pim_channel_oil_list

Removing the extern declaration of pim_channel_oil_list since
its not required anymore.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
23 months agoMerge pull request #11507 from donaldsharp/setsockopt_changes
David Lamparter [Mon, 4 Jul 2022 08:38:25 +0000 (10:38 +0200)]
Merge pull request #11507 from donaldsharp/setsockopt_changes

23 months agoMerge pull request #11514 from donaldsharp/zebra_odds_and_ends
Donatas Abraitis [Mon, 4 Jul 2022 05:11:29 +0000 (08:11 +0300)]
Merge pull request #11514 from donaldsharp/zebra_odds_and_ends

Zebra odds and ends

23 months agoMerge pull request #11520 from donaldsharp/zebra_debug_queue
Donatas Abraitis [Sun, 3 Jul 2022 19:10:53 +0000 (22:10 +0300)]
Merge pull request #11520 from donaldsharp/zebra_debug_queue

zebra: Add a subqueue2str function to give more useful data in debugs

23 months agozebra: Add a subqueue2str function to give more useful data in debugs
Donald Sharp [Sun, 3 Jul 2022 13:41:31 +0000 (09:41 -0400)]
zebra: Add a subqueue2str function to give more useful data in debugs

New output example:

2022-07-03 09:40:29.310 [DEBG] zebra: [JF0K0-DVHWH] rib_meta_queue_add: (0:254):4.5.6.8/32: queued rn 0x55937f586ee0 into sub-queue Kernel Routes
2022-07-03 09:40:29.321 [DEBG] zebra: [HH6N2-PDCJS] default(0:254):4.5.6.8/32 rn 0x55937f586ee0 dequeued from sub-queue Kernel Routes

Let's make it a bit more human readable.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agoMerge pull request #11505 from SaiGomathiN/watermark
Donatas Abraitis [Sat, 2 Jul 2022 18:36:42 +0000 (21:36 +0300)]
Merge pull request #11505 from SaiGomathiN/watermark

pim6d: Fix the todo items in ipv6 watermark limit CLI

23 months agoMerge pull request #11516 from opensourcerouting/freebsd-rtsock-enobufs
Donald Sharp [Fri, 1 Jul 2022 17:49:44 +0000 (13:49 -0400)]
Merge pull request #11516 from opensourcerouting/freebsd-rtsock-enobufs

zebra: handle FreeBSD routing socket ENOBUFS

23 months agotopostest: bgp_conditional_advertisement cleanup
Louis Scalbert [Fri, 1 Jul 2022 10:11:03 +0000 (12:11 +0200)]
topostest: bgp_conditional_advertisement cleanup

The bgp_conditional_advertisement topotest runs all the test cases in
the same function. It is not easy to debug it because the pytest
"--pause" argument does not make breaks between test cases.

Dispatch the test-cases into functions to benefit from the "--pause"
feature.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
23 months agozebra: handle FreeBSD routing socket ENOBUFS
Rafael Zalamena [Fri, 1 Jul 2022 13:00:25 +0000 (10:00 -0300)]
zebra: handle FreeBSD routing socket ENOBUFS

This is a slightly modified version of Hiroki Sato's version:
https://github.com/hrs-allbsd/frr/commit/9ca79c941fd84322199994a2aed267b23d39c86a

Handle the `ENOBUFS` on a OS basis since it could have been implemented
differently (OpenBSD for an example uses `RTM_DESYNC`).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
23 months agobgpd: Start conditional advertisement timer instantly
Donatas Abraitis [Fri, 1 Jul 2022 12:16:24 +0000 (15:16 +0300)]
bgpd: Start conditional advertisement timer instantly

Do not wait for the configured timer to expire if we enable advertise-map.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
23 months agobgpd: rename update_type enum values
Quentin Young [Fri, 11 Jun 2021 23:00:15 +0000 (19:00 -0400)]
bgpd: rename update_type enum values

These values were named WITHDRAW and UPDATE. Yeah, you guessed it, those
are already #define's elsewhere (bgp_debug.h). Hilarity ensues.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
23 months agozebra: Add more cases to proto2zebra for understanding kernel routes
Donald Sharp [Thu, 30 Jun 2022 13:03:12 +0000 (09:03 -0400)]
zebra: Add more cases to proto2zebra for understanding kernel routes

Just some missing ones.  Make zebra stop complaining, was getting
some messages from proto2zebra when doing testing, let's clean
that up from happening.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agozebra: move allow_delete to zrouter.allow_delete
Donald Sharp [Thu, 30 Jun 2022 15:59:39 +0000 (11:59 -0400)]
zebra: move allow_delete to zrouter.allow_delete

Instead of having global allow_delete move it to
where it belongs in the zrouter data structure.

Additionally show this data in `show zebra`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agozebra: Notice to end operator when a failure happens
Donald Sharp [Thu, 30 Jun 2022 14:04:26 +0000 (10:04 -0400)]
zebra: Notice to end operator when a failure happens

When reading a multipath route and we detect an encoding
error from the kernel( yeah I don't think so either ),
let's tell the operator what happened to that route.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agoMerge pull request #11488 from donaldsharp/capabilities
Donatas Abraitis [Fri, 1 Jul 2022 06:35:14 +0000 (09:35 +0300)]
Merge pull request #11488 from donaldsharp/capabilities

lib: Allow downgrade of all caps when none are specified

23 months agoisisd: fix infinite loop when parsing LSPs
Louis Scalbert [Fri, 27 May 2022 08:42:53 +0000 (10:42 +0200)]
isisd: fix infinite loop when parsing LSPs

Fixing the crash:

> #0  0x0000560aa80f8e30 in lspdb_const_find (h=<error reading variable: Cannot access memory at address 0x7fff5e95efe8>, item=<error reading variable: Cannot access memory at address 0x7fff5e95efe0>) at ./isisd/isis_lsp.h:64
> #1  0x0000560aa80f8e9d in lspdb_find (h=0x560aaa1ed3b8, item=0x7fff5e95f050) at ./isisd/isis_lsp.h:64
> #2  0x0000560aa80f92f9 in lsp_search (head=0x560aaa1ed3b8, id=0x7fff5e95f200 "") at isisd/isis_lsp.c:100
> #3  0x0000560aa8113d69 in spf_adj_list_parse_tlv (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, id=0x560aad331a78 "", desig_is_id=0x0, pseudo_metric=0, metric=3, oldmetric=false, subtlvs=0x0) at isisd/isis_spf.c:1330
> #4  0x0000560aa811419d in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1429
> #5  0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1ff8e0, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442
> #6  0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442
> (...)
> #65507 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1ff8e0, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442
> #65508 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442
> #65509 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1ff8e0, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442
> #65510 0x0000560aa81141fe in spf_adj_list_parse_lsp (spftree=0x560aaa1f09d0, adj_list=0x560aaa214480, lsp=0x560aaa1f4e50, pseudo_nodeid=0x0, pseudo_metric=0) at isisd/isis_spf.c:1442
> #65511 0x0000560aa8114313 in isis_spf_build_adj_list (spftree=0x560aaa1f09d0, lsp=0x560aaa1f4e50) at isisd/isis_spf.c:1455
> #65512 0x0000560aa8114f09 in isis_run_spf (spftree=0x560aaa1f09d0) at isisd/isis_spf.c:1775
> #65513 0x0000560aa8115057 in isis_run_spf_with_protection (area=0x560aaa1ed3b0, spftree=0x560aaa1f09d0) at isisd/isis_spf.c:1801
> #65514 0x0000560aa8115311 in isis_run_spf_cb (thread=0x7fff5f15e5a0) at isisd/isis_spf.c:1859
> #65515 0x00007f90bac66dcc in thread_call (thread=0x7fff5f15e5a0) at lib/thread.c:2002
> #65516 0x00007f90bac013ee in frr_run (master=0x560aa9f5cb40) at lib/libfrr.c:1196
> #65517 0x0000560aa80e7da2 in main (argc=2, argv=0x7fff5f15e7b8, envp=0x7fff5f15e7d0) at isisd/isis_main.c:273

The fix is similar to the crash fix included in d9884a758c
("isisd: Prepare IS-IS for Link State support"). The fix was:

> diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
> index 94353a5bc8..92d329f035 100644
> --- a/isisd/isis_lsp.c
> +++ b/isisd/isis_lsp.c
> @@ -2166,7 +2178,7 @@ int isis_lsp_iterate_ip_reach(struct isis_lsp *lsp, int family, uint16_t mtid,
>   if (lsp->hdr.seqno == 0 || lsp->hdr.rem_lifetime == 0)
>   return LSP_ITER_CONTINUE;
>
> - /* Parse main LSP. */
> + /* Parse LSP */
>   if (lsp->tlvs) {
>   if (!fabricd && !pseudo_lsp && family == AF_INET
>       && mtid == ISIS_MT_IPV4_UNICAST) {
> @@ -2236,13 +2248,17 @@ int isis_lsp_iterate_ip_reach(struct isis_lsp *lsp, int family, uint16_t mtid,
>   }
>   }
>
> - /* Parse LSP fragments. */
> - for (ALL_LIST_ELEMENTS_RO(lsp->lspu.frags, node, frag)) {
> - if (!frag->tlvs)
> - continue;
> + /* Parse LSP fragments if it is not a fragment itself */
> + if (!LSP_FRAGMENT(lsp->hdr.lsp_id))
> + for (ALL_LIST_ELEMENTS_RO(lsp->lspu.frags, node, frag)) {
> + if (!frag->tlvs)
> + continue;
>
> - isis_lsp_iterate_ip_reach(frag, family, mtid, cb, arg);
> - }
> + if (isis_lsp_iterate_ip_reach(frag, family, mtid, cb,
> +       arg)
> +     == LSP_ITER_STOP)
> + return LSP_ITER_STOP;
> + }
>
>   return LSP_ITER_CONTINUE;
>  }

Fixes: 7b36d36e0e ("isisd: make the SPF code more modular")
Fixes: 5e56a50559 ("isisd: fix infinite loop when parsing LSPs")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
23 months agoRevert "isisd: fix infinite loop when parsing LSPs"
Louis Scalbert [Fri, 27 May 2022 08:37:08 +0000 (10:37 +0200)]
Revert "isisd: fix infinite loop when parsing LSPs"

This reverts commit 5e56a50559fd4a85f1912464e6e13d13969aa238.

23 months agozebra: Realign SOL_NETLINK to warn when FRR does not have it
Donald Sharp [Thu, 30 Jun 2022 12:03:02 +0000 (08:03 -0400)]
zebra: Realign SOL_NETLINK to warn when FRR does not have it

There exists a possibility that an end operator has choosen
to compile FRR on an extremely old KERNEL that does not support
the SOL_NETLINK sockopt call.  If so let's note it for them
instead of stuff silently not working.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agozebra: Correct implication of SOL_NETLINK NETLINK_ADD_MEMBERSHIP usage
Donald Sharp [Thu, 30 Jun 2022 11:50:04 +0000 (07:50 -0400)]
zebra: Correct implication of SOL_NETLINK NETLINK_ADD_MEMBERSHIP usage

The usage of SOL_NETLINK for adding memberships of interest is
1 group per call.  The netink_socket function implied that
the call could be a bitfield of values.  This is not correct
at all.  This will trip someone else up in the future when
a new value is needed.  Let's get it right `now` before
it becomes a problem.

Let's also add a bit of extra code to give operator a better
understanding of what went wrong when a kernel does not
support the option.

Finally as a point of future reference should FRR just switch
over to a loop to add the required loops instead of having
this bastardized approach of some going in one way and some
going in another way?

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agopim6d: Implementing mld watermark-warn CLI completely
Sai Gomathi N [Thu, 30 Jun 2022 09:02:05 +0000 (02:02 -0700)]
pim6d: Implementing mld watermark-warn CLI completely

Implementing the TBD of watermark-warn CLI for IPv6 MLD
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>
23 months agopimd: Modifying member of pim_instance to accomodate IPv6 changes
Sai Gomathi N [Thu, 30 Jun 2022 08:17:26 +0000 (01:17 -0700)]
pimd: Modifying member of pim_instance to accomodate IPv6 changes

Modifying igmp_watermark_limit of struct pim_instance
to gm_watermark_limit which is to be used for both IGMP and MLD.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
23 months agozebra: make rib_process_dplane_results own ctx freeing
Donald Sharp [Wed, 29 Jun 2022 19:24:20 +0000 (15:24 -0400)]
zebra: make rib_process_dplane_results own ctx freeing

The rib_process_dplane_results function was having each
sub function handler process the results and then
free the ctx.  Lot's of functionality that needs to remember
to free the context.  Let's just free it in the main loop.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agolib: Allow downgrade of all caps when none are specified
Donald Sharp [Tue, 28 Jun 2022 14:26:52 +0000 (10:26 -0400)]
lib: Allow downgrade of all caps when none are specified

Staticd when run tells privs.c that it does not need any
priviledges.  The lib/privs.c code was not downgrading
any and all permissions it may have been given at startup.

Since we don't need any let's actually tell the system that
FRR does not need the capabilities anymore in the case
where a daemon does not ask for any cap's.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agoMerge pull request #11493 from patrasar/pim_reg_stop_fix
Donald Sharp [Wed, 29 Jun 2022 17:02:27 +0000 (13:02 -0400)]
Merge pull request #11493 from patrasar/pim_reg_stop_fix

pimd: Register stop message sent with mask 32

23 months agopimd: Register stop message sent with mask 32
Sarita Patra [Wed, 29 Jun 2022 13:34:19 +0000 (06:34 -0700)]
pimd: Register stop message sent with mask 32

As per RFC 4601 section 4.9.4, For Register-Stops,
the Mask Len field contains full address length * 8
(e.g. 32 for IPv4 native encoding) (e.g. 128 for IPv6),
if the message is sent for a single group

The issue is seen after 10356, so fixed now.

Signed-off-by: Sarita Patra <saritap@vmware.com>
23 months agoMerge pull request #11428 from SaiGomathiN/pimdebug
Donatas Abraitis [Wed, 29 Jun 2022 11:27:45 +0000 (14:27 +0300)]
Merge pull request #11428 from SaiGomathiN/pimdebug

pimd,pim6d: Change the show running commands based on address family

2 years agoMerge pull request #11486 from taspelund/bgp_timer_always_on
Russ White [Tue, 28 Jun 2022 20:54:09 +0000 (16:54 -0400)]
Merge pull request #11486 from taspelund/bgp_timer_always_on

bgpd: include 0 in configured hold/keepalive

2 years agoMerge pull request #11484 from opensourcerouting/fix/allow_using_bgp_roles_for_peer_g...
Donald Sharp [Tue, 28 Jun 2022 18:31:48 +0000 (14:31 -0400)]
Merge pull request #11484 from opensourcerouting/fix/allow_using_bgp_roles_for_peer_groups

bgpd: Make sure peer-groups/unnumbered work too with BGP role

2 years agoMerge pull request #11481 from mobash-rasool/fixes
Donald Sharp [Tue, 28 Jun 2022 17:49:47 +0000 (13:49 -0400)]
Merge pull request #11481 from mobash-rasool/fixes

pimd: Querier to non-querier transition to be ignored (ANVL Conformance fix)

2 years agoMerge pull request #11456 from ARShreenidhi/default_originate_vrf_automation
Donatas Abraitis [Tue, 28 Jun 2022 15:51:05 +0000 (18:51 +0300)]
Merge pull request #11456 from ARShreenidhi/default_originate_vrf_automation

tests : bgp-default-originate in vrf scenerio

2 years agobgpd: Make sure peer-groups/unnumbered work too with BGP role
Donatas Abraitis [Mon, 27 Jun 2022 14:21:42 +0000 (17:21 +0300)]
bgpd: Make sure peer-groups/unnumbered work too with BGP role

Just adding a support for peer-groups, because now it's not possible to
configure BGP role for peer-groups.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: include 0 in configured hold/keepalive
Trey Aspelund [Tue, 28 Jun 2022 14:08:55 +0000 (14:08 +0000)]
bgpd: include 0 in configured hold/keepalive

The default keepalive/hold timers are always exposed via this commit:
```
commit 9b1b96233d7204263d409ea6c504b316af9e533f (origin/bgp_timer_always_on)
Author: Trey Aspelund <taspelund@nvidia.com>
Date:   Mon Jun 27 23:20:33 2022 +0000

    bgpd: always display keepalive/hold intervals

    `show bgp neighbors <peer> [json]` was only displaying the configured
    keepalive and holdtime intervals when they differed from the default
    values.  Since default config is still config, let's make sure these
    values are always displayed.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
```

However it mistakenly changed the logic to only display the peer's
timers if the configured value was non-zero.  This updates the logic to
check PEER_FLAG_TIMER to determine if the values were configured,
given 0 is a valid value (to disable keepalives).

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agoMerge pull request #11093 from donaldsharp/allow_martians
Lou Berger [Tue, 28 Jun 2022 14:38:57 +0000 (10:38 -0400)]
Merge pull request #11093 from donaldsharp/allow_martians

Allow martians

2 years agotests : bgp-default-originate in vrf scenerio
ARShreenidhi [Wed, 22 Jun 2022 12:47:13 +0000 (12:47 +0000)]
tests : bgp-default-originate in vrf scenerio

testcase in this script covers the default originate behavious in VRFs

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2 years agopimd: Querier to non-querier transition to be ignored
Mobashshera Rasool [Mon, 27 Jun 2022 12:25:29 +0000 (05:25 -0700)]
pimd: Querier to non-querier transition to be ignored

Fixing IGMPv2 ANVL Conformance issue 3.10

As per RFC 2236 section 3, when the leave message is received at a querier,
it starts sending Query messages for "last Member Query Interval*query count"
During this time there should not be any querier to non-querier
transition and the same router needs to send the remaning queries.

Currently the code is handling this scenario only when leave is receive
for a group and the query is received for the same group.
But we need to handle it irrespective of group since the querier
election is based on interface and not group.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11454 from routingrocks/evpn_clag_frrlogs
mobash-rasool [Tue, 28 Jun 2022 12:02:10 +0000 (17:32 +0530)]
Merge pull request #11454 from routingrocks/evpn_clag_frrlogs

Zebra EVPN Debug: Fixing log flooding when disabling MLAG leaf config…

2 years agotests: update timers in BFD VRF test
lynnemorrison [Fri, 10 Jun 2022 16:46:31 +0000 (12:46 -0400)]
tests: update timers in BFD VRF test

Increase BFD Echo timers to make test stable.

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
2 years agoMerge pull request #11474 from donaldsharp/dp-dpdk
Russ White [Tue, 28 Jun 2022 11:33:22 +0000 (07:33 -0400)]
Merge pull request #11474 from donaldsharp/dp-dpdk

Dp dpdk

2 years agoMerge pull request #11479 from AbhishekNR/gm_enable
Donald Sharp [Tue, 28 Jun 2022 11:30:32 +0000 (07:30 -0400)]
Merge pull request #11479 from AbhishekNR/gm_enable

pim6d: Changing igmp_enable to gm_enable.

2 years agoMerge pull request #11478 from opensourcerouting/fix/permissions_stale_gh
Russ White [Tue, 28 Jun 2022 11:02:40 +0000 (07:02 -0400)]
Merge pull request #11478 from opensourcerouting/fix/permissions_stale_gh

github: Set strict permissions for stale actions for Github

2 years agoMerge pull request #11482 from donaldsharp/netconf_work
Russ White [Tue, 28 Jun 2022 11:02:01 +0000 (07:02 -0400)]
Merge pull request #11482 from donaldsharp/netconf_work

Netconf work

2 years agoMerge pull request #11483 from taspelund/bgp_timer_always_on
Russ White [Tue, 28 Jun 2022 11:00:30 +0000 (07:00 -0400)]
Merge pull request #11483 from taspelund/bgp_timer_always_on

bgpd: always display keepalive/hold intervals

2 years agoMerge pull request #11236 from LabNConsulting/ziemba/topotest-srte-route-routemap...
Russ White [Tue, 28 Jun 2022 10:57:38 +0000 (06:57 -0400)]
Merge pull request #11236 from LabNConsulting/ziemba/topotest-srte-route-routemap-policy-order

topotests/isis_sr_te_topo1: test out-of-order route/route-map changes

2 years agoMerge pull request #11434 from donaldsharp/more_test_fixups
Igor Ryzhov [Tue, 28 Jun 2022 10:06:35 +0000 (13:06 +0300)]
Merge pull request #11434 from donaldsharp/more_test_fixups

Crash fix and test fix and some cleanup

2 years agoMerge pull request #11480 from opensourcerouting/fix/peer_flags_luu
mobash-rasool [Tue, 28 Jun 2022 06:38:09 +0000 (12:08 +0530)]
Merge pull request #11480 from opensourcerouting/fix/peer_flags_luu

bgpd: Use uin64_t for peer->flags

2 years agobgpd: always display keepalive/hold intervals
Trey Aspelund [Mon, 27 Jun 2022 23:20:33 +0000 (23:20 +0000)]
bgpd: always display keepalive/hold intervals

`show bgp neighbors <peer> [json]` was only displaying the configured
keepalive and holdtime intervals when they differed from the default
values.  Since default config is still config, let's make sure these
values are always displayed.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agozebra: Add ability for netconf dplane to handle global values
Donald Sharp [Mon, 27 Jun 2022 19:30:55 +0000 (15:30 -0400)]
zebra: Add ability for netconf dplane to handle global values

Add the ability for the netconf dplane code to handle
the global NETCONFA_IFINDEX_DEFAULT and NETCONF_IFINDEX_ALL
values.  Then store our interested values when we get
them from the kernel as well as being able to display
them to the end operator.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobfdd: add IPv4 BFD Echo support that matches RFC
lynnemorrison [Mon, 6 Jun 2022 23:40:17 +0000 (19:40 -0400)]
bfdd: add IPv4 BFD Echo support that matches RFC

Modify the existing BFD Echo code to send an Echo message that will
be looped in the peers forwarding plane.   The existing Echo code
only works with other FRR implementations because the Echo packet
must go up to BFD to be turned around and forwarded back to the
local router.    The new BFD Echo code sets the src/dst IP of the
packet to be the local router's IP and sets the dest MAC to be the
peers MAC address.    The peer receives the packet and because it
is not it's IP address it forwards it back to the local router.

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
2 years agozebra: Pass afi received for netconf updates
Donald Sharp [Mon, 27 Jun 2022 19:11:45 +0000 (15:11 -0400)]
zebra: Pass afi received for netconf updates

When Zebra receives the netconf update an afi is passed
let's seperate that out and track the v4/v6 specific data
to save and store appropriately.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: mc_forwarding was being sent but not retrieved across dataplane
Donald Sharp [Mon, 27 Jun 2022 19:04:21 +0000 (15:04 -0400)]
zebra: mc_forwarding was being sent but not retrieved across dataplane

The mc_forwarding status for an interface was being sent but not
properly retrieved on the zebra master side of the dplane.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Use uin64_t for peer->flags
Donatas Abraitis [Mon, 27 Jun 2022 13:36:56 +0000 (16:36 +0300)]
bgpd: Use uin64_t for peer->flags

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopim6d: Changing igmp_enable to gm_enable.
Abhishek N R [Mon, 27 Jun 2022 12:52:02 +0000 (05:52 -0700)]
pim6d: Changing igmp_enable to gm_enable.

Modified variable name so that it can be reused in mld.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agozebra: add documentation for the DPDK dataplane plugin
Anuradha Karuppiah [Fri, 31 Dec 2021 00:15:46 +0000 (16:15 -0800)]
zebra: add documentation for the DPDK dataplane plugin

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agozebra: PBR dpdk programming
Anuradha Karuppiah [Thu, 30 Dec 2021 23:08:07 +0000 (15:08 -0800)]
zebra: PBR dpdk programming

1. Offload PBR rule add/del
2. Query DPDK flow stats and display per-PBR entry

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agozebra: setup the zebra interface to dpdk port map table
Anuradha Karuppiah [Thu, 30 Dec 2021 22:56:30 +0000 (14:56 -0800)]
zebra: setup the zebra interface to dpdk port map table

1. Create mappping table between ifIndex and dpdk-port-id
2. Start the DPDK port

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agozebra: initialize hw via DPDK
Anuradha Karuppiah [Thu, 30 Dec 2021 22:49:19 +0000 (14:49 -0800)]
zebra: initialize hw via DPDK

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agoconfigure, zebra: include DPDK headers and shared libs in the dp-dpdk build
Anuradha Karuppiah [Thu, 30 Dec 2021 22:41:42 +0000 (14:41 -0800)]
configure, zebra: include DPDK headers and shared libs in the dp-dpdk build

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
   -> Moved new capabilities needed to under HAVE_DPDK
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agozebra: infastructure for the new dataplane plugin
Anuradha Karuppiah [Sat, 1 Jan 2022 17:18:33 +0000 (09:18 -0800)]
zebra: infastructure for the new dataplane plugin

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agozebra: add ipc_lock, read_search and sys_rawio to zebra's privileges
Anuradha Karuppiah [Mon, 3 Jan 2022 19:48:20 +0000 (11:48 -0800)]
zebra: add ipc_lock, read_search and sys_rawio to zebra's privileges

These are needed for dpdk:rte_eal_init.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agolib: add SYS_RAWIO to the capabilities definitions
Anuradha Karuppiah [Mon, 3 Jan 2022 19:45:56 +0000 (11:45 -0800)]
lib: add SYS_RAWIO to the capabilities definitions

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agozebra: document the pbr and neigh extended commands needed for some dataplanes
Anuradha Karuppiah [Thu, 30 Dec 2021 16:33:36 +0000 (08:33 -0800)]
zebra: document the pbr and neigh extended commands needed for some dataplanes

config -
1. "pbr nexthop-resolve"

display -
1. "show pbr rule"
2. "show ip neigh"

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agozebra: pass PBR expanded actions to the dataplane
Anuradha Karuppiah [Sat, 18 Dec 2021 18:47:27 +0000 (10:47 -0800)]
zebra: pass PBR expanded actions to the dataplane

These attributes are needed for dpdk dataplane programming

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agozebra: expand pbr rule action for dataplane programming
Anuradha Karuppiah [Sat, 18 Dec 2021 18:34:31 +0000 (10:34 -0800)]
zebra: expand pbr rule action for dataplane programming

PBR rules are installed as match, action rules in most dataplanes. This
requires the action to be resolved via a GW. And the GW to be subsequently
resolved to {SMAC, DMAC}.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agozebra: add support for maintaining local neigh entries
Anuradha Karuppiah [Sat, 18 Dec 2021 19:28:49 +0000 (11:28 -0800)]
zebra: add support for maintaining local neigh entries

Currently specific local neighbors (attached to SVIs) are maintatined
in an EVPN specific database. There is a need to maintain L3 neighbors
for other purposes including MAC resolution for PBR nexthops.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
   Cleanup compile and fix crash
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2 years agoMerge pull request #11426 from error2407/open_policy
Donatas Abraitis [Mon, 27 Jun 2022 06:57:29 +0000 (09:57 +0300)]
Merge pull request #11426 from error2407/open_policy

bgpd: Add RFC9234 implementation

2 years agogithub: Set strict permissions for stale actions for Github
Donatas Abraitis [Mon, 27 Jun 2022 06:54:16 +0000 (09:54 +0300)]
github: Set strict permissions for stale actions for Github

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopimd,pim6d: Change the show running commands based on address family
Sai Gomathi N [Fri, 17 Jun 2022 11:39:59 +0000 (04:39 -0700)]
pimd,pim6d: Change the show running commands based on address family

Change the show running commands for pimv4 and pimv6 debug commands
based on the address family.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agotoptests/isis_sr_te_topo1: test out-of-order route/route-map changes
G. Paul Ziemba [Fri, 20 May 2022 16:26:56 +0000 (09:26 -0700)]
toptests/isis_sr_te_topo1: test out-of-order route/route-map changes

    A SR policy matches a BGP nexthop based on the IP address of
    the nexthop and the color of the route (color may be assigned
    to routes using a route-map).

    The order of events (BGP route arrival, route-map definition,
    policy and candidate-path definition) should not affect the
    matching/mapping.

    These changes add tests for:

- removing/adding BGP route after policy and routemap are
  defined and held constant

- changing route map color to be different from policy color,
  and then changing back to match

    after each change, the policy should be observed to be in effect
    unchanged from before, i.e., the route's nexthops should reflect
    the matching SR policy.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2 years agoMerge pull request #11477 from LabNConsulting/chopps/fix-config-load
Donald Sharp [Sat, 25 Jun 2022 14:19:02 +0000 (10:19 -0400)]
Merge pull request #11477 from LabNConsulting/chopps/fix-config-load

tools: fix boot config load in watchfrr

2 years agotools: fix boot config load in watchfrr
Christian Hopps [Fri, 24 Jun 2022 22:44:43 +0000 (18:44 -0400)]
tools: fix boot config load in watchfrr

2469a37f reversed the logic of the existence check for
/etc/frr/frr.conf breaking boot config loading, fix it.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoMerge pull request #11429 from donaldsharp/interface_funkiness
Donatas Abraitis [Fri, 24 Jun 2022 20:07:45 +0000 (23:07 +0300)]
Merge pull request #11429 from donaldsharp/interface_funkiness

zebra: Fix rtadv startup when config read in is before interface up

2 years agoMerge pull request #11475 from patrasar/pim_if_delete
Donald Sharp [Fri, 24 Jun 2022 18:49:55 +0000 (14:49 -0400)]
Merge pull request #11475 from patrasar/pim_if_delete

pimd: fix pim interface deletion flow

2 years agoMerge pull request #11472 from panlinux/obsolete-egrep
Donald Sharp [Fri, 24 Jun 2022 16:43:41 +0000 (12:43 -0400)]
Merge pull request #11472 from panlinux/obsolete-egrep

frr.postinst: egrep is deprecated

2 years agoMerge pull request #11471 from mobash-rasool/fixes
Donald Sharp [Fri, 24 Jun 2022 16:02:35 +0000 (12:02 -0400)]
Merge pull request #11471 from mobash-rasool/fixes

pimd: Clean up mroute_socket when pim terminates.

2 years agoMerge pull request #11468 from patrasar/pim_valgrind_fix
Donald Sharp [Fri, 24 Jun 2022 15:53:43 +0000 (11:53 -0400)]
Merge pull request #11468 from patrasar/pim_valgrind_fix

 pimd: Fixing invalid memory access

2 years agoMerge pull request #11469 from donaldsharp/fdev2
Jafar Al-Gharaibeh [Fri, 24 Jun 2022 15:05:56 +0000 (10:05 -0500)]
Merge pull request #11469 from donaldsharp/fdev2

zebra: netlink rtm tunnel msg parsing

2 years agoMerge pull request #11242 from patrasar/pimv6_issue_11233
Donald Sharp [Fri, 24 Jun 2022 14:56:48 +0000 (10:56 -0400)]
Merge pull request #11242 from patrasar/pimv6_issue_11233

pim6d: Fixing repeated group source field in show ipv6 mroute

2 years agopimd: fix pim interface deletion flow
Sarita Patra [Fri, 24 Jun 2022 14:48:03 +0000 (07:48 -0700)]
pimd: fix pim interface deletion flow

Deletion of pim interface(pim_if_delete) should
do the below things before cleanup.
1. Send a hello message with zero hold time.
2. Delete all the neighbors.
3. Close the pim socket.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agoMerge pull request #11464 from donaldsharp/linkdown
Russ White [Fri, 24 Jun 2022 14:15:55 +0000 (10:15 -0400)]
Merge pull request #11464 from donaldsharp/linkdown

Linkdown

2 years agoMerge pull request #11467 from mobash-rasool/fixes2
Donald Sharp [Fri, 24 Jun 2022 14:05:42 +0000 (10:05 -0400)]
Merge pull request #11467 from mobash-rasool/fixes2

pimd: Avoid accessing freed memory

2 years agoMerge pull request #11258 from anlancs/fix/zebra-keep-nb-check
Donald Sharp [Fri, 24 Jun 2022 13:46:12 +0000 (09:46 -0400)]
Merge pull request #11258 from anlancs/fix/zebra-keep-nb-check

zebra: move the checks for l3vni

2 years agodebian: egrep is deprecated
Andreas Hasenack [Fri, 24 Jun 2022 12:54:37 +0000 (09:54 -0300)]
debian: egrep is deprecated

egrep is deprecated, please see
https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1

Signed-off-by: Andreas Hasenack <andreas.hasenack@canonical.com>
2 years agopimd: fix invalid memory access join_timer_stop
Sarita Patra [Fri, 24 Jun 2022 10:04:37 +0000 (03:04 -0700)]
pimd: fix invalid memory access join_timer_stop

Issue:
==16837== Invalid read of size 8
==16837==    at 0x17971C: pim_neighbor_find (pim_neighbor.c:431)
==16837==    by 0x186439: join_timer_stop (pim_upstream.c:348)
==16837==    by 0x186794: pim_upstream_del (pim_upstream.c:231)
==16837==    by 0x189A66: pim_upstream_terminate (pim_upstream.c:1951)
==16837==    by 0x17111B: pim_instance_terminate (pim_instance.c:54)
==16837==    by 0x17111B: pim_vrf_delete (pim_instance.c:172)
==16837==    by 0x4F1D6C8: vrf_delete (vrf.c:264)
==16837==    by 0x19006F: pim_terminate (pimd.c:160)
==16837==    by 0x1B2E4D: pim_sigterm (pim_signals.c:51)
==16837==    by 0x4F08FA2: frr_sigevent_process (sigevent.c:130)
==16837==    by 0x4F1A2CC: thread_fetch (thread.c:1771)
==16837==    by 0x4ED4F92: frr_run (libfrr.c:1197)
==16837==    by 0x15D81A: main (pim_main.c:176)

Root Cause:
In the pim_terminate flow, the interface is deleted
before the pim_interface clean up. Because of this,
the pim_interface is having garbage value.

Fix:
Release the pim interface memory and then delete the
interface.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agopimd: Clean up mroute_socket when pim terminates.
Mobashshera Rasool [Fri, 24 Jun 2022 12:36:15 +0000 (05:36 -0700)]
pimd: Clean up mroute_socket when pim terminates.

pim_mroute_socket_disable api is present but nowhere called.
This should be called when pim instance is terminated.
Fixed it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11462 from donaldsharp/random_stuff_right
mobash-rasool [Fri, 24 Jun 2022 11:53:31 +0000 (17:23 +0530)]
Merge pull request #11462 from donaldsharp/random_stuff_right

Random stuff right

2 years agobgpd: Remove 'debug bgp allow-martian'
Donald Sharp [Mon, 25 Apr 2022 20:48:42 +0000 (16:48 -0400)]
bgpd: Remove 'debug bgp allow-martian'

This command should not be in the code and is being
removed as per tech meeting decision.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Add `bgp allow-martian-nexthop` command
Donald Sharp [Mon, 25 Apr 2022 20:30:36 +0000 (16:30 -0400)]
bgpd: Add `bgp allow-martian-nexthop` command

The command `debug bgp allow-martian` is not actually
a debug command it's a command that when entered allows
bgp to not reset a peering when a martian nexthop is
passed in the nlri.

Add the `bgp allow-martian-nexthop` command and allow it to be
used.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopim6d: Fixing repeated group source field in show ipv6 mroute
sarita patra [Sat, 21 May 2022 16:05:10 +0000 (09:05 -0700)]
pim6d: Fixing repeated group source field in show ipv6 mroute

The command "show ip[v6] mroute" displaying group and source
field for every OIL.

Fix:
Display group and source for the first OIL only.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agozebra: netlink rtm tunnel msg parsing
Chirag Shah [Tue, 25 Jan 2022 18:25:38 +0000 (10:25 -0800)]
zebra: netlink rtm tunnel msg parsing

'bridge vni add vni <id> dev <vxlan device>'
generates new RTM_NEWTUNNEL and RTM_DELTUNNEL
to add or remove vni to l3vxlan device.

Register new RTNLGRP_TUNNEL group to receive
new netlink notification.
Callback for the new RTM_xxxTUNNEL.

kernel patches:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?h=v5.18-rc7&id=7b8135f4df98b155b23754b6065c157861e268f1

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?h=v5.18-rc7&id=f9c4bb0b245cee35ef66f75bf409c9573d934cf9

Ticket:#3073812
Testing Done:

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agoMerge pull request #11430 from mjstapp/fix_ospf6_zebra_del
Rafael Zalamena [Fri, 24 Jun 2022 11:21:48 +0000 (08:21 -0300)]
Merge pull request #11430 from mjstapp/fix_ospf6_zebra_del

ospf6: permit route delete without nexthops

2 years agozebra: Fix rtadv startup when config read in is before interface up
Donald Sharp [Fri, 17 Jun 2022 15:23:31 +0000 (11:23 -0400)]
zebra: Fix rtadv startup when config read in is before interface up

When a interface is configured with this:
int eva
  ipv6 nd ra-interval 5
  no ipv6 nd suppress-ra
!

And then subsuquently the interface is created and brought up, FRR
would both error on joining the RA multicast address and never
properly work in this state.

Delay the startup of the join and start of the Router Advertisements
until after the ifindex has actually been found.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11457 from plsaranya/pim_mroute
Donald Sharp [Fri, 24 Jun 2022 11:07:03 +0000 (07:07 -0400)]
Merge pull request #11457 from plsaranya/pim_mroute

Pim6d: Mroute file duplication removal

2 years agoMerge pull request #11465 from rgirada/pam_coverity
Donald Sharp [Fri, 24 Jun 2022 11:02:38 +0000 (07:02 -0400)]
Merge pull request #11465 from rgirada/pam_coverity

vtysh: Account validity should be verified when authenticating users with PAM

2 years agopimd: Avoid reading freed memory.
Mobashshera Rasool [Fri, 24 Jun 2022 06:47:09 +0000 (23:47 -0700)]
pimd: Avoid reading freed memory.

If the upstream is freed in pim_upstream_del, then trying to
call pim_upstream_timers_stop will lead to accessing freed memory.

Fix:
Stop the timer only if upstream is not deleted.

Co-authored-by: Sarita Patra <saritap@vmware.com>
Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>