]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agobgpd: add rpki source address configuration
Philippe Guibert [Thu, 2 Sep 2021 15:12:06 +0000 (17:12 +0200)]
bgpd: add rpki source address configuration

Add the ability to configure the source address of rpki
connection. Proposed vty command is to add below parameter:

rpki cache <address> source <bindaddr> <port> preference <pref>
rpki cache <address> source <bindaddr> <port> <usernamessh> ...

This works for both tcp and ssh connections. In case the source
address is not available yet, the rpki retry interval will retry
in a defined amount of time.

Rtrlib library is the library in charge of the binding of the
tcp/ssh connection, and applies the getaddrinfo() and bind()
operations to the passed parameter bindaddr to the respective
tcp_config/ssh_config structures.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #9466 from idryzhov/vrf-netns
Donatas Abraitis [Thu, 26 Aug 2021 04:46:19 +0000 (07:46 +0300)]
Merge pull request #9466 from idryzhov/vrf-netns

lib, zebra: move vrf netns commands from lib to zebra

3 years agoMerge pull request #9467 from gpnaveen/bgp_v4overv6
Russ White [Wed, 25 Aug 2021 21:14:10 +0000 (17:14 -0400)]
Merge pull request #9467 from gpnaveen/bgp_v4overv6

tests: adding 11 bgp v4 over v6 test cases.

3 years agoMerge pull request #9490 from pguibert6WIND/fix_ipv6_seg6
Igor Ryzhov [Wed, 25 Aug 2021 20:43:43 +0000 (23:43 +0300)]
Merge pull request #9490 from pguibert6WIND/fix_ipv6_seg6

bgpd: fix uninitialised segs6 buffer

3 years agobgpd: fix uninitialised segs6 buffer
Philippe Guibert [Wed, 25 Aug 2021 14:56:25 +0000 (16:56 +0200)]
bgpd: fix uninitialised segs6 buffer

Below dump may be observed when receiving bgp ipv6 updates.

2021/08/25 16:52:32 BGP: [V15FP-4CPVK] Tx route add VRF 0 4004::1/128 metric 0 tag 0 count 1 nhg 0
2021/08/25 16:52:32 BGP: [JQXM8-V0CKB]   nhop [1]: 2003::4 if 0 VRF 0 wt 0  P8�o�

Fix it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #9487 from ton31337/fix/no_need_for_break_after_frr_help_exit
Mark Stapp [Wed, 25 Aug 2021 12:41:52 +0000 (08:41 -0400)]
Merge pull request #9487 from ton31337/fix/no_need_for_break_after_frr_help_exit

*: Drop `break` after using frr_help_exit() in switch/case

3 years ago*: Drop `break` after using frr_help_exit() in switch/case
Donatas Abraitis [Wed, 25 Aug 2021 07:47:52 +0000 (10:47 +0300)]
*: Drop `break` after using frr_help_exit() in switch/case

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9474 from idryzhov/lib-bgp-dependency
Donatas Abraitis [Wed, 25 Aug 2021 07:39:29 +0000 (10:39 +0300)]
Merge pull request #9474 from idryzhov/lib-bgp-dependency

lib: remove the dependency on bgpd code

3 years agoMerge pull request #9435 from SaiGomathiN/sai-igmp
Jafar Al-Gharaibeh [Tue, 24 Aug 2021 21:15:39 +0000 (16:15 -0500)]
Merge pull request #9435 from SaiGomathiN/sai-igmp

pimd: IGMP groups are not getting timeout

3 years agoMerge pull request #9414 from mobash-rasool/pim-upst-4
Jafar Al-Gharaibeh [Tue, 24 Aug 2021 21:11:57 +0000 (16:11 -0500)]
Merge pull request #9414 from mobash-rasool/pim-upst-4

pimd: IGMPv2 query timer gets delayed in a scenario

3 years agoMerge pull request #9449 from opensourcerouting/ospf6d-nssa-fixes
Igor Ryzhov [Tue, 24 Aug 2021 19:34:29 +0000 (22:34 +0300)]
Merge pull request #9449 from opensourcerouting/ospf6d-nssa-fixes

ospf6d: NSSA fixes

3 years agoMerge pull request #9457 from anlancs/ospf6-void
Mark Stapp [Tue, 24 Aug 2021 19:30:45 +0000 (15:30 -0400)]
Merge pull request #9457 from anlancs/ospf6-void

ospf6d: suppress coverity warning of return value

3 years agoMerge pull request #9458 from anlancs/fix-ospf6-null
Mark Stapp [Tue, 24 Aug 2021 16:12:05 +0000 (12:12 -0400)]
Merge pull request #9458 from anlancs/fix-ospf6-null

ospf6d: fix lock leak of using ALL_LSDB in GR helper

3 years agoospf6d: further validate NSSA ASBR routes used for route computation
Renato Westphal [Mon, 23 Aug 2021 21:22:20 +0000 (18:22 -0300)]
ospf6d: further validate NSSA ASBR routes used for route computation

Add missing sanity check specified in the NSSA RFC.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agotests: enable more debugs in the ospf6_topo2 topotest
Renato Westphal [Sat, 21 Aug 2021 21:45:22 +0000 (18:45 -0300)]
tests: enable more debugs in the ospf6_topo2 topotest

Enable more debugs to facilitate troubleshooting whenever a problem
happens.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospf6d: do not allow an area to be stub and NSSA at the same time
Renato Westphal [Thu, 19 Aug 2021 15:14:47 +0000 (12:14 -0300)]
ospf6d: do not allow an area to be stub and NSSA at the same time

That should not be allowed under any circumstance.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospf6d: fix logging of border router routes
Renato Westphal [Thu, 19 Aug 2021 02:07:10 +0000 (23:07 -0300)]
ospf6d: fix logging of border router routes

The prefix of routes to border routers consists of two pieces of
information embedded in a single struct (prefix.u.lp):

  struct prefix {
          uint8_t family;
          uint16_t prefixlen;
          union {
   [snip]
                  struct {
                          struct in_addr id;
                          struct in_addr adv_router;
                  } lp;
          } u __attribute__((aligned(8)));
  };

As such, using prefix2str() (or the %pFX format specifier) isn't
correct when logging such routes.

This commit adds a few special cases here and there to handle
OSPF6_DEST_TYPE_ROUTER routes differently. It'd probably be a good
idea to add a helper function to handle all cases in a single place,
but that can be left for a second moment.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoMerge pull request #7876 from gpnaveen/ospf_gr_helper_using_scapy
Renato Westphal [Tue, 24 Aug 2021 14:42:49 +0000 (11:42 -0300)]
Merge pull request #7876 from gpnaveen/ospf_gr_helper_using_scapy

tests: ospf gr helper topotests with scapy.

3 years agolib: remove the dependency on bgpd code
Igor Ryzhov [Tue, 24 Aug 2021 14:42:37 +0000 (17:42 +0300)]
lib: remove the dependency on bgpd code

The library code should not depend on a specific daemon's code.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9310 from mobash-rasool/ospfv2-bug-fixes-02
Russ White [Tue, 24 Aug 2021 13:40:59 +0000 (09:40 -0400)]
Merge pull request #9310 from mobash-rasool/ospfv2-bug-fixes-02

ospfd: NSSA area should not exchange Type-4 LSAs in DD

3 years agoMerge pull request #8729 from gpnaveen/ospf_route_maps
Russ White [Tue, 24 Aug 2021 13:13:57 +0000 (09:13 -0400)]
Merge pull request #8729 from gpnaveen/ospf_route_maps

tests: ospf routemap basic test cases 2.

3 years agoMerge pull request #9460 from LabNConsulting/chopps/fix-ospf-config
Igor Ryzhov [Tue, 24 Aug 2021 11:08:02 +0000 (14:08 +0300)]
Merge pull request #9460 from LabNConsulting/chopps/fix-ospf-config

tests: fix ospf json config confusion

3 years agoMerge pull request #9462 from idryzhov/snapcraft-proto
Donatas Abraitis [Tue, 24 Aug 2021 09:35:17 +0000 (12:35 +0300)]
Merge pull request #9462 from idryzhov/snapcraft-proto

snapcraft: add missing dependency

3 years agopimd: IGMP groups are not getting timeout
Sai Gomathi [Wed, 18 Aug 2021 08:28:28 +0000 (01:28 -0700)]
pimd: IGMP groups are not getting timeout

Problem :
=======
When all the groups from Ixia are stopped,
groups still keep refreshing and not getting timeout

RCA:
====
IGMP Report is coming in include mode without any source address, this problem will come.

Fix :
===
If the requested filter mode is INCLUDE *and* the requested
source list is empty, then the entry corresponding to the
requested interface and multicast address is deleted if present.
If no such entry is present, the request is ignored.

When an interface receives the IGMP report without any source, then the group is deleted.

Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
3 years agotests: ospf gr helper topotests with scapy.
nguggarigoud [Fri, 15 Jan 2021 12:02:13 +0000 (17:32 +0530)]
tests:  ospf gr helper topotests with scapy.

Testing ospf gr helper using scapy tool.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agoMerge pull request #9464 from idryzhov/ospfv3-debug-doc
Renato Westphal [Tue, 24 Aug 2021 04:02:45 +0000 (01:02 -0300)]
Merge pull request #9464 from idryzhov/ospfv3-debug-doc

doc: merge duplicated ospf6d debugging sections

3 years agoospf6d: remove incorrect debug guard
Renato Westphal [Thu, 19 Aug 2021 00:38:18 +0000 (21:38 -0300)]
ospf6d: remove incorrect debug guard

Also, update the ospf6_topo2 topotest since the expected output
was wrong. With this fix, NSSA routes will be created on r2
("redistribute connected"), and NSSA routes appear in the routing
table as regular external routes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospf6d: flush external LSAs when NSSA is configured
Renato Westphal [Wed, 18 Aug 2021 21:40:07 +0000 (18:40 -0300)]
ospf6d: flush external LSAs when NSSA is configured

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospf6d: fix flushing of all LSAs when NSSA is unconfigured
Renato Westphal [Wed, 18 Aug 2021 20:59:58 +0000 (17:59 -0300)]
ospf6d: fix flushing of all LSAs when NSSA is unconfigured

Once NSSA is unconfigured on an area, all self-originated Type-7
LSAs need to be flushed. The existing code was iterating over the
LSDB in the wrong way, causing ospf6_nssa_flush_area() to flush
LSAs of all types.  Use the ALL_LSDB_TYPED_ADVRTR macro to perform
the intended iteration correctly.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospf6d: don't delete area when NSSA is unconfigured
Renato Westphal [Wed, 18 Aug 2021 20:59:40 +0000 (17:59 -0300)]
ospf6d: don't delete area when NSSA is unconfigured

Once NSSA is unconfigured, the OSPF area should still be operational
as a normal area instead of being deleted.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospf6d: always unset the E-bit on NSSA ABRs
Renato Westphal [Tue, 17 Aug 2021 00:35:27 +0000 (21:35 -0300)]
ospf6d: always unset the E-bit on NSSA ABRs

RFC 3101 - Section 2.1 says:
"(..) Interfaces associated with an NSSA will not send or receive
Type-5 LSAs on that interface but may send and receive Type-7 LSAs.
Therefore, if the N-bit is set in the options field, the E-bit must
be clear."

If the E-bit isn't cleared on an NSSA ABR, that will cause hello
packets to be dropped (due to parameters mismatch), which will
prevent the ABR from forming adjacencies with others routers in
the NSSA area.

This problem didn't affect the existing NSSA topotest by chance
of luck.  In that topotest, in the NSSA ABR, the NSSA area is
configured before any interface is associated to it. That caused
ospf6_check_and_set_router_abr() to return false, leading to
the unsetting of the E-bit. With this fix, the order in which
areas/interfaces are configured shouldn't matter because the E-bit
will always be unset on NSSA areas.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agotests: use correct key for deleting entry.
Christian Hopps [Tue, 24 Aug 2021 01:40:38 +0000 (21:40 -0400)]
tests: use correct key for deleting entry.

OSPF mixes uses of "delete" and "del_action" depending on which library
function is called. It's a bug-prone mess that needs fixing; however, for
now we fix the one obvious incorrect use in this test.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: ospf routemap basic test cases 2.
nguggarigoud [Tue, 25 May 2021 03:16:17 +0000 (20:16 -0700)]
tests: ospf routemap basic test cases 2.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agotests: adding 11 bgp v4 over v6 test cases.
nguggarigoud [Tue, 24 Aug 2021 00:19:00 +0000 (17:19 -0700)]
tests: adding 11 bgp v4 over v6 test cases.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agolib, zebra: move vrf netns commands from lib to zebra
Igor Ryzhov [Mon, 23 Aug 2021 20:54:12 +0000 (23:54 +0300)]
lib, zebra: move vrf netns commands from lib to zebra

"[no] netns NAME" commands are part of the lib, but they are actually
zebra-only:
- they are using vrf_netns_handler_create and its description clearly
  says that it "should be called from zebra only"
- vtysh sends these commands only to zebra
- only zebra outputs the netns related config
- zebra notifies other daemons about netns attachment

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agodoc: merge duplicated ospf6d debugging sections
Igor Ryzhov [Mon, 23 Aug 2021 18:23:32 +0000 (21:23 +0300)]
doc: merge duplicated ospf6d debugging sections

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9446 from mobash-rasool/ospfv3-bug-fixes
Igor Ryzhov [Mon, 23 Aug 2021 16:00:23 +0000 (19:00 +0300)]
Merge pull request #9446 from mobash-rasool/ospfv3-bug-fixes

ospf6d: External LSAs reoriginates on every redistribute CLI

3 years agoMerge pull request #9337 from dlqs/lua2
Stephen Worley [Mon, 23 Aug 2021 14:20:33 +0000 (08:20 -0600)]
Merge pull request #9337 from dlqs/lua2

lib: check return on str2sockunion

3 years agoMerge pull request #9434 from anlancs/fix-zebra-mpls-cmd
Mark Stapp [Mon, 23 Aug 2021 13:02:15 +0000 (09:02 -0400)]
Merge pull request #9434 from anlancs/fix-zebra-mpls-cmd

zebra: fix wrong check of mpls command

3 years agosnapcraft: add missing dependency
Igor Ryzhov [Mon, 23 Aug 2021 12:08:05 +0000 (15:08 +0300)]
snapcraft: add missing dependency

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: External LSAs reoriginates on every redistribute CLI
Mobashshera Rasool [Thu, 19 Aug 2021 09:34:47 +0000 (02:34 -0700)]
ospf6d: External LSAs reoriginates on every redistribute CLI

Problem Statement:
==================
Everytime redistribute CLI is executed, external LSAs are
re-originated. When there is no change in the CLI parameters
the LSAs should not get re-originated.

Fix:
=================
Check if the CLI params are same, do not re-originate the LSA.

Fixes: #9445
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #9436 from anlancs/fix-vtysh-bfd-exit
Igor Ryzhov [Mon, 23 Aug 2021 11:30:13 +0000 (14:30 +0300)]
Merge pull request #9436 from anlancs/fix-vtysh-bfd-exit

vtysh: add "exit" for bfd's profile node

3 years agoMerge pull request #9456 from proelbtn/fix-running-config
Igor Ryzhov [Mon, 23 Aug 2021 11:24:03 +0000 (14:24 +0300)]
Merge pull request #9456 from proelbtn/fix-running-config

fix some SRv6 configuration isn't saved correctly

3 years agoMerge pull request #9426 from pguibert6WIND/evpn_igp_metric
Donatas Abraitis [Sun, 22 Aug 2021 18:45:11 +0000 (21:45 +0300)]
Merge pull request #9426 from pguibert6WIND/evpn_igp_metric

bgpd: imported evpn rt5 routes copy igpmetric

3 years agoMerge pull request #9455 from LabNConsulting/chopps/fix-zebtest-fixed-sleep
David Lamparter [Sun, 22 Aug 2021 18:35:29 +0000 (20:35 +0200)]
Merge pull request #9455 from LabNConsulting/chopps/fix-zebtest-fixed-sleep

tests: use std polling for results in zebra_rib test

3 years agoospf6d: fix lock leak of using ALL_LSDB in GR helper
anlan_cs [Sun, 22 Aug 2021 09:04:04 +0000 (05:04 -0400)]
ospf6d: fix lock leak of using ALL_LSDB in GR helper

The lsa and lsanext must be unlocked if break out of ALL_LSDB loop.

Incidentally correct the comment of ALL_LSDB.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
3 years agoospf6d: suppress coverity warning of return value
anlan_cs [Sun, 22 Aug 2021 01:56:49 +0000 (21:56 -0400)]
ospf6d: suppress coverity warning of return value

Fix #CID 1506511

Signed-off-by: anlan_cs <anlan_cs@tom.com>
3 years agoMerge pull request #9441 from wesleycoakley/staticd-warn-nonexistent-route
Igor Ryzhov [Sat, 21 Aug 2021 20:11:29 +0000 (23:11 +0300)]
Merge pull request #9441 from wesleycoakley/staticd-warn-nonexistent-route

staticd: warn on attempted delete of non-existent route

3 years agotests: use std polling for results in zebra_rib test
Christian Hopps [Sat, 21 Aug 2021 17:37:42 +0000 (13:37 -0400)]
tests: use std polling for results in zebra_rib test

In particular, the fixed 2 second sleep here was not long enough.
Switch to standard run_and_expect polling to make test more robust.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9453 from LabNConsulting/chopps/fix-netns-vrfs
Donald Sharp [Sat, 21 Aug 2021 16:24:42 +0000 (12:24 -0400)]
Merge pull request #9453 from LabNConsulting/chopps/fix-netns-vrfs

tests: uniq vrf names when using netns

3 years agotests: uniq vrf names when using netns
Christian Hopps [Sat, 21 Aug 2021 07:04:42 +0000 (03:04 -0400)]
tests: uniq vrf names when using netns

- In order to run tests in parallel the netns-based vrfs need to
have unique names primarily bc they are all tracked/looked-up in
`/run/netns` which is not network namespace nesting friendly

- use ip(8) exclusively rather than a mix of `ip` and `ifconfig`
and `vconfig`, reducing required pkg count by a couple.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9450 from LabNConsulting/chopps/fix-bgp-gr-test
Donald Sharp [Fri, 20 Aug 2021 20:18:19 +0000 (16:18 -0400)]
Merge pull request #9450 from LabNConsulting/chopps/fix-bgp-gr-test

tests: fix broken bgp GR test (non-deterministic)

3 years agotests: fix broken bgp GR test (non-deterministic)
Christian Hopps [Fri, 20 Aug 2021 12:24:23 +0000 (08:24 -0400)]
tests: fix broken bgp GR test (non-deterministic)

- bugs in the support library function `verify_gr_address_family`
allowed this test to pass depending on ordering of python dictinoary
keys. Fix the bugs, fix the test.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9447 from donaldsharp/ipset_entry_notify
Renato Westphal [Fri, 20 Aug 2021 02:58:39 +0000 (23:58 -0300)]
Merge pull request #9447 from donaldsharp/ipset_entry_notify

zebra: Fix usage to enum in notify functions

3 years agoMerge pull request #8935 from rgirada/ospfv3_gr_helper
Renato Westphal [Thu, 19 Aug 2021 18:01:34 +0000 (15:01 -0300)]
Merge pull request #8935 from rgirada/ospfv3_gr_helper

ospf6d: Support for ospfv3  graceful restart  helper functionality

3 years agozebra: Fix usage to enum in notify functions
Donald Sharp [Thu, 19 Aug 2021 15:31:05 +0000 (11:31 -0400)]
zebra: Fix usage to enum in notify functions

For some reason commit #ef524230a6baa decided
to remove enums and switch to uint16_t.  Which
is not the right thing to do.  Put it back

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9218 from LabNConsulting/chopps/pim-timers
Donald Sharp [Thu, 19 Aug 2021 11:35:45 +0000 (07:35 -0400)]
Merge pull request #9218 from LabNConsulting/chopps/pim-timers

Improve pim timers

3 years agobpgd: add missing sid setting in address-family
Ryoga Saito [Thu, 19 Aug 2021 05:41:13 +0000 (05:41 +0000)]
bpgd: add missing sid setting in address-family

current bgpd doesn't write sid setting, resulting to fail to save
configuration correctly.

Signed-off-by: Ryoga Saito <contact@proelbtn.com>
3 years agobpgd: add "exit" at the end of bgp srv6 setting
Ryoga Saito [Thu, 19 Aug 2021 05:37:18 +0000 (05:37 +0000)]
bpgd: add "exit" at the end of bgp srv6 setting

without "exit", when frr is starting up, frr fails to load
address-family setting correctly.

Signed-off-by: Ryoga Saito <contact@proelbtn.com>
3 years agotests: reduce multicast timer values
Christian Hopps [Wed, 28 Jul 2021 10:31:13 +0000 (10:31 +0000)]
tests: reduce multicast timer values

- completes change made in #9190
- also lowers other pim and igmp timer values to speed things up.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: Add global pim join-prune-interval json config option
Christian Hopps [Thu, 29 Jul 2021 03:32:33 +0000 (03:32 +0000)]
tests: Add global pim join-prune-interval json config option

- cleanup pim configuration code

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agopimd: fix register suppress timer code
Christian Hopps [Thu, 19 Aug 2021 01:48:28 +0000 (21:48 -0400)]
pimd: fix register suppress timer code

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agopimd: change ranges to 1..max, type align with IETF YANG.
Christian Hopps [Tue, 3 Aug 2021 22:22:09 +0000 (22:22 +0000)]
pimd: change ranges to 1..max, type align with IETF YANG.

While defaults are good picks for "reasonable" guesses, min and max
range values really aren't. Operators and experimenters often like to
configure "unreasonable" values to stress test, tests boundary
conditions and explore innovations.

With that in mind, change all ranges to 1..max (of type).

While we're here add optional ignored values in the "no" CLI forms.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agostaticd: warn on attempted delete of non-existent route
Wesley Coakley [Tue, 15 Dec 2020 01:01:24 +0000 (20:01 -0500)]
staticd: warn on attempted delete of non-existent route

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agozebra: fix wrong check of mpls command
anlan_cs [Wed, 18 Aug 2021 05:58:54 +0000 (01:58 -0400)]
zebra: fix wrong check of mpls command

Maybe with empty nexthop to call zebra_mpls_transit_lsp():
"no mpls lsp (16-1048575)".

So just remove this "gate_str" check. If without "gate" in command, "gtype" is
set to NEXTHOP_TYPE_BLACKHOLE for subsequent processing.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
3 years agoMerge pull request #9431 from opensourcerouting/snap-1804-master
Donald Sharp [Wed, 18 Aug 2021 13:37:06 +0000 (09:37 -0400)]
Merge pull request #9431 from opensourcerouting/snap-1804-master

Snap update to 18.04 base

3 years agoMerge pull request #9341 from LabNConsulting/chopps/ospf-support-bundle
Igor Ryzhov [Wed, 18 Aug 2021 11:40:08 +0000 (14:40 +0300)]
Merge pull request #9341 from LabNConsulting/chopps/ospf-support-bundle

tools: add ospfd support bundle commands

3 years agovtysh: add "exit" for bfd's profile node
anlan_cs [Wed, 18 Aug 2021 07:19:07 +0000 (03:19 -0400)]
vtysh: add "exit" for bfd's profile node

Since no "exit-bfd-profile", need add "exit" for profile node.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
3 years agoMerge pull request #9408 from mobash-rasool/ospfv2-bug-fixes-03
Igor Ryzhov [Wed, 18 Aug 2021 07:18:32 +0000 (10:18 +0300)]
Merge pull request #9408 from mobash-rasool/ospfv2-bug-fixes-03

ospfd: Summarised External LSA is not flushed in one scenario

3 years agosnapcraft: Add pathd to FRR snap daemons
Martin Winter [Tue, 17 Aug 2021 19:24:47 +0000 (21:24 +0200)]
snapcraft: Add pathd to FRR snap daemons

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agosnapcraft: Change base to Ubuntu 18.04 and libyang 2.0.7
Martin Winter [Tue, 17 Aug 2021 17:49:42 +0000 (19:49 +0200)]
snapcraft: Change base to Ubuntu 18.04 and libyang 2.0.7

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agobgpd: imported evpn rt5 routes copy igpmetric
Philippe Guibert [Tue, 17 Aug 2021 14:43:37 +0000 (16:43 +0200)]
bgpd: imported evpn rt5 routes copy igpmetric

when doing BGP over an IGP platform, the expectation is that
the path calculation for a given prefix takes into account the
igpmetric given by IGP.
This is true with prefixes obtained in a given BGP instance where
peering occurs. For instance, ipv4 unicast entries or l2vpn evpn
entries work this way. The igpmetric is obtained through nexthop
tracking, like below:

south-vm# show bgp nexthop
Current BGP nexthop cache:
 1.1.1.1 valid [IGP metric 10], #paths 1, peer 1.1.1.1
 2.2.2.2 valid [IGP metric 20], #paths 1, peer 2.2.2.2

The igp metric is taken into account when doing best path
selection, and only the entry with lowest igp wins.

[..]
*>i[5]:[0]:[32]:[5.5.5.5]
                    1.1.1.1                  0    100      0 ?
                    RT:65400:268435556 ET:8 Rmac:2e:22:6c:67:bb:73
* i                 2.2.2.2                  0    100      0 ?
                    RT:65400:268435556 ET:8 Rmac:f2:d3:68:4e:f4:ed

however, for imported EVPN RT5 entries, the igpmetric was not
copied from the parent path info. Fix it. In this way, the
imported route entries use the igpmetric of the parent pi.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #9342 from mobash-rasool/ospfv3-asbr-summarisation
Russ White [Tue, 17 Aug 2021 14:31:29 +0000 (10:31 -0400)]
Merge pull request #9342 from mobash-rasool/ospfv3-asbr-summarisation

OSPF6d: Fixed assert at ospf6_originate_summary_lsa asbr.c:2849 and flushing of Type-7 LSAs

3 years agoMerge pull request #9366 from idryzhov/fix-plist-yang
Russ White [Tue, 17 Aug 2021 14:12:34 +0000 (10:12 -0400)]
Merge pull request #9366 from idryzhov/fix-plist-yang

yang: mark a couple of prefix-list/access-list leafs as mandatory

3 years agoMerge pull request #9365 from idryzhov/fix-plist-dup-check
Russ White [Tue, 17 Aug 2021 13:55:34 +0000 (09:55 -0400)]
Merge pull request #9365 from idryzhov/fix-plist-dup-check

lib: fix prefix-list duplication check

3 years agoMerge pull request #9385 from idryzhov/bgpd-match-evpn-default-route-crash
Russ White [Tue, 17 Aug 2021 13:54:25 +0000 (09:54 -0400)]
Merge pull request #9385 from idryzhov/bgpd-match-evpn-default-route-crash

bgpd: fix segfault when re-adding "match evpn default-route" rule

3 years agoMerge pull request #9383 from idryzhov/ospf-no-vrf-init
Russ White [Tue, 17 Aug 2021 13:53:51 +0000 (09:53 -0400)]
Merge pull request #9383 from idryzhov/ospf-no-vrf-init

ospfd: fix initialization when vrf doesn't exist yet

3 years agoMerge pull request #9411 from donaldsharp/include_update
David Lamparter [Tue, 17 Aug 2021 13:50:57 +0000 (15:50 +0200)]
Merge pull request #9411 from donaldsharp/include_update

include: Update rtnetlink.h to be correct with upstream kernels

3 years agoMerge pull request #9402 from donaldsharp/rpki_processing
Russ White [Tue, 17 Aug 2021 13:47:10 +0000 (09:47 -0400)]
Merge pull request #9402 from donaldsharp/rpki_processing

Rpki processing

3 years agoMerge pull request #9417 from ton31337/fix/bgp_rmap
Igor Ryzhov [Tue, 17 Aug 2021 13:29:05 +0000 (16:29 +0300)]
Merge pull request #9417 from ton31337/fix/bgp_rmap

bgpd: Return rmap match if large-community alias found

3 years agoMerge pull request #9413 from pguibert6WIND/rtmgetneigh_too
Donald Sharp [Tue, 17 Aug 2021 11:57:39 +0000 (07:57 -0400)]
Merge pull request #9413 from pguibert6WIND/rtmgetneigh_too

zebra: RTM_GETNEIGH messages may be used by nhrp

3 years agobgpd: Return rmap match if large-community alias found
Donatas Abraitis [Tue, 17 Aug 2021 09:19:43 +0000 (12:19 +0300)]
bgpd: Return rmap match if large-community alias found

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoospfd: Summarised External LSA is not flushed in one scenario
Mobashshera Rasool [Mon, 16 Aug 2021 11:27:45 +0000 (04:27 -0700)]
ospfd: Summarised External LSA is not flushed in one scenario

Fix CI Failure test_ospf_type5_summary_tc45_p0

Problem Statement:
==================
Summarised LSA is not flushed in OSPFv2 in below scenario:
1. Configure summary-address in ospfv2
2. redistribute static and connected.
3. Check the LSAs are received on neighbor.
4. Now remove all OSPFv2 configs, so neighbor will still have the summarised LSA.
5. Configure router ospf with redistribute static and connected.
6. Check the DB, summarised LSA is present although the configuration is not present.
7. Now configure the summary-address and remove the configuration after sometime.
8. The summarised LSA will be still present.

RCA:
==================
When self originated LSA is received from the neighbor and that
LSA is summarised one, the LSA is refreshed but a flag is not set
due to which it was not able to remove it later.

Fix:
==================
Set the originated flag when refreshing summarised LSA.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #9404 from neirbowj/notcares
Igor Ryzhov [Tue, 17 Aug 2021 08:28:22 +0000 (11:28 +0300)]
Merge pull request #9404 from neirbowj/notcares

Scan lib/resolver.c only when c-ares is installed

3 years agopimd: IGMPv2 query timer gets delayed in a scenario
Mobashshera Rasool [Tue, 17 Aug 2021 07:24:30 +0000 (00:24 -0700)]
pimd: IGMPv2 query timer gets delayed in a scenario

Problem Statement:
==================
IGMP query is sent at irregular intervals
(more than 30 seconds) when "ip igmp query-max-response-time 100"
command is executed multiple times.

RCA:
=================
When "ip igmp query-max-response-time 100" is executed, the timers
are reset resulting in the delay of sending the query.

Fix:
=================
When there is no change in the config value, we should not reset
the timers.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agozebra: RTM_GETNEIGH messages may be used by nhrp
Philippe Guibert [Tue, 17 Aug 2021 07:04:44 +0000 (09:04 +0200)]
zebra: RTM_GETNEIGH messages may be used by nhrp

When NHRP registers to zebra to receive link layer events related to
gre interfaces, then it is interested in receiving also RTM_GETNEIGH
messages.

Fixes ("b3b751046495") nhrpd: link layer registration to notifications

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoinclude: Update rtnetlink.h to be correct with upstream kernels
Donald Sharp [Mon, 16 Aug 2021 19:18:55 +0000 (15:18 -0400)]
include: Update rtnetlink.h to be correct with upstream kernels

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9375 from idryzhov/pcep-no-commands
Mark Stapp [Mon, 16 Aug 2021 16:57:53 +0000 (12:57 -0400)]
Merge pull request #9375 from idryzhov/pcep-no-commands

vtysh, pathd: fix pcep node-entering commands

3 years agoMerge pull request #9380 from mjstapp/fix_static_lsp_cli
Renato Westphal [Mon, 16 Aug 2021 15:06:01 +0000 (12:06 -0300)]
Merge pull request #9380 from mjstapp/fix_static_lsp_cli

zebra: mpls validation and static lsp fixes

3 years agobgpd: Add code to output expire and retry interval for rpki
Donald Sharp [Mon, 16 Aug 2021 14:59:20 +0000 (10:59 -0400)]
bgpd: Add code to output expire and retry interval for rpki

The code to output during a `show run` is missing for both
the expire_interval and the retry_interval in rpki.
Let's add it in so the end user can see what they
are set to if not set to the default.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Continue processing rpki nodes
Donald Sharp [Sun, 15 Aug 2021 14:22:50 +0000 (10:22 -0400)]
bgpd: Continue processing rpki nodes

We are prematurely stopping processing of bgp_path_info's
when bgp_update returns a -1.  The only place that this
happens when we cross some prefix limit.  But we still
need to continiue processing other nodes in the list too.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Limit processing to what is needed in rpki validation
Donald Sharp [Sun, 15 Aug 2021 14:15:38 +0000 (10:15 -0400)]
bgpd: Limit processing to what is needed in rpki validation

The processing was looping over all bgp instances then
over all peers then over all safi's to find a match
for a prefix received in order to validate it.

Suppose you have 100 peers each sending you the same
prefix.  This code will cause it to look at each node 100
times since we look at for each peer.  This is especially
egregarious because we never ever do anything with the peer
when we are looping over them.

Remove the peer loop, significantly reduce processing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9395 from donaldsharp/pim_memory_leak
Renato Westphal [Mon, 16 Aug 2021 15:01:49 +0000 (12:01 -0300)]
Merge pull request #9395 from donaldsharp/pim_memory_leak

pimd: Prevent memory leak

3 years agoMerge pull request #9369 from idryzhov/comm-alias-memleaks
Donatas Abraitis [Mon, 16 Aug 2021 14:24:21 +0000 (17:24 +0300)]
Merge pull request #9369 from idryzhov/comm-alias-memleaks

bgpd: fix various memleaks when using community aliases

3 years agoMerge pull request #9265 from ton31337/fix/extcommunity_lb_route-map_persistent
Igor Ryzhov [Mon, 16 Aug 2021 09:26:25 +0000 (12:26 +0300)]
Merge pull request #9265 from ton31337/fix/extcommunity_lb_route-map_persistent

bgpd: Extended community bandwidth fixes

3 years agoMerge pull request #9350 from ton31337/feature/autocomplete_for_community_lists
Igor Ryzhov [Mon, 16 Aug 2021 09:02:13 +0000 (12:02 +0300)]
Merge pull request #9350 from ton31337/feature/autocomplete_for_community_lists

bgpd: Auto-complete for community lists (show commands)

3 years agoMerge pull request #9391 from mougams/master
Igor Ryzhov [Mon, 16 Aug 2021 08:54:55 +0000 (11:54 +0300)]
Merge pull request #9391 from mougams/master

tests: add feature to not run ospfd test when opted out

3 years agoMerge pull request #9399 from ton31337/fix/doc_zebraBANDIWDTH
Igor Ryzhov [Mon, 16 Aug 2021 08:52:34 +0000 (11:52 +0300)]
Merge pull request #9399 from ton31337/fix/doc_zebraBANDIWDTH

doc: Replace typo BANDIWDTH to BANDWIDTH

3 years agoMerge pull request #9400 from ton31337/fix/rename_topotest_dirs
Igor Ryzhov [Mon, 16 Aug 2021 08:51:51 +0000 (11:51 +0300)]
Merge pull request #9400 from ton31337/fix/rename_topotest_dirs

tests: Get rid off `-` for directories

3 years agolib: Scan lib/resolver.c only when c-ares is installed
John W. O'Brien [Sun, 15 Aug 2021 16:46:30 +0000 (12:46 -0400)]
lib: Scan lib/resolver.c only when c-ares is installed

Scan lib/resolver.c only when c-ares is installed

Signed-off-by: John W. O'Brien <john@saltant.com>