]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #9318 from Prerana-GB/ibgp_knob
Donatas Abraitis [Wed, 1 Sep 2021 07:45:27 +0000 (10:45 +0300)]
Merge pull request #9318 from Prerana-GB/ibgp_knob

bgp: BGP knob for faster convergence of bgp sessions

3 years agoMerge pull request #9530 from ton31337/fix/doc_connect_timers_bgp
Christian Hopps [Wed, 1 Sep 2021 07:41:21 +0000 (03:41 -0400)]
Merge pull request #9530 from ton31337/fix/doc_connect_timers_bgp

doc: Add missing `timers` for connect timer in BGP

3 years agodoc: Add missing `timers` for connect timer in BGP
Donatas Abraitis [Wed, 1 Sep 2021 07:38:10 +0000 (10:38 +0300)]
doc: Add missing `timers` for connect timer in BGP

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9397 from tkms1122/master
Donatas Abraitis [Wed, 1 Sep 2021 07:33:59 +0000 (10:33 +0300)]
Merge pull request #9397 from tkms1122/master

bgpd: minimum-holdtime knob to prevent session establishment with BGP peer with low holdtime.

3 years agoMerge pull request #9526 from LabNConsulting/chopps/bgp-test-defaults
Donatas Abraitis [Wed, 1 Sep 2021 07:25:51 +0000 (10:25 +0300)]
Merge pull request #9526 from LabNConsulting/chopps/bgp-test-defaults

tests: log bgp nbr changes, and allow config of connect timer

3 years agoMerge pull request #9525 from idryzhov/ospfd-crash
Renato Westphal [Tue, 31 Aug 2021 20:54:25 +0000 (17:54 -0300)]
Merge pull request #9525 from idryzhov/ospfd-crash

ospfd: correctly cleanup spf data

3 years agoMerge pull request #9522 from mobash-rasool/ospfv3-bug-fixes
Igor Ryzhov [Tue, 31 Aug 2021 17:03:37 +0000 (20:03 +0300)]
Merge pull request #9522 from mobash-rasool/ospfv3-bug-fixes

ospfd: add dead-interval 40 if configured in show running

3 years agotests: log bgp nbr changes, and allow config of connect timer
Christian Hopps [Tue, 31 Aug 2021 13:13:23 +0000 (09:13 -0400)]
tests: log bgp nbr changes, and allow config of connect timer

- Allow tests to also change the connect timer as they can for the
keep-alive and holddown timers.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoospfd: correctly cleanup spf data
Igor Ryzhov [Tue, 31 Aug 2021 10:41:40 +0000 (13:41 +0300)]
ospfd: correctly cleanup spf data

ospf_spf_cleanup frees the data so we need to reset the stale pointers.

Fixes #9523.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9518 from ton31337/fix/redundand_interface_name_for_peer
Igor Ryzhov [Tue, 31 Aug 2021 09:00:48 +0000 (12:00 +0300)]
Merge pull request #9518 from ton31337/fix/redundand_interface_name_for_peer

bgpd: Drop redundand `WORD` for no_neighbor_interface_cmd

3 years agoospfd: add dead-interval 40 if configured in show running
Mobashshera Rasool [Tue, 31 Aug 2021 06:02:39 +0000 (23:02 -0700)]
ospfd: add dead-interval 40 if configured in show running

Problem Statement:
==================
When hello-interval is configured as 5, automatically dead interval becomes
4 times of hello i.e 20 seconds. But user wants the dead interval as
40 seconds and hello as 5 seconds. Therefore user configures it.
Now "ip ospf dead-interval 40" is not shown in "show running-config"
Therefore when user restarts the daemon, the dead interval goes back to
20 seconds and the neighbors are down.

Fix:
==================
If user configures dead-interval as 40, show it in show running config.

Fixes: #9401
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #9502 from idryzhov/cmd-vtysh-cleanup
Russ White [Mon, 30 Aug 2021 19:58:06 +0000 (15:58 -0400)]
Merge pull request #9502 from idryzhov/cmd-vtysh-cleanup

lib, vtysh: make node-processing code more generic

3 years agobgpd: Drop redundand `WORD` for no_neighbor_interface_cmd
Donatas Abraitis [Mon, 30 Aug 2021 12:14:28 +0000 (15:14 +0300)]
bgpd: Drop redundand `WORD` for no_neighbor_interface_cmd

Just to be consistent with neighbor_interface_cmd.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8964 from LabNConsulting/chopps/config-faster
Mark Stapp [Mon, 30 Aug 2021 12:56:43 +0000 (08:56 -0400)]
Merge pull request #8964 from LabNConsulting/chopps/config-faster

tests: configure/reset routers in parallel

3 years agoMerge pull request #9484 from anlancs/fix-doc-bgp-desc
Quentin Young [Mon, 30 Aug 2021 03:04:31 +0000 (23:04 -0400)]
Merge pull request #9484 from anlancs/fix-doc-bgp-desc

doc: add a missing field for bgp summary's display

3 years agoMerge pull request #9511 from LabNConsulting/chopps/ospf-asbr-test-fix
Quentin Young [Mon, 30 Aug 2021 02:54:49 +0000 (22:54 -0400)]
Merge pull request #9511 from LabNConsulting/chopps/ospf-asbr-test-fix

tests: fix ospf ASBR summary test

3 years agodoc: add a missing field for bgp summary's display
anlan_cs [Wed, 25 Aug 2021 02:11:59 +0000 (22:11 -0400)]
doc: add a missing field for bgp summary's display

Signed-off-by: anlan_cs <anlan_cs@tom.com>
3 years agoMerge pull request #9503 from opensourcerouting/ospf6d-redistribute-metrics
Russ White [Sat, 28 Aug 2021 13:20:44 +0000 (09:20 -0400)]
Merge pull request #9503 from opensourcerouting/ospf6d-redistribute-metrics

ospf6d: extend the "redistribute" command with more options

3 years agoMerge pull request #9509 from LabNConsulting/chopps/dirlocals
Jafar Al-Gharaibeh [Fri, 27 Aug 2021 23:30:42 +0000 (18:30 -0500)]
Merge pull request #9509 from LabNConsulting/chopps/dirlocals

tests: Update dir-locals

3 years agoMerge pull request #9499 from gsol10/bogus_lsp
Russ White [Fri, 27 Aug 2021 23:04:29 +0000 (19:04 -0400)]
Merge pull request #9499 from gsol10/bogus_lsp

isisd: Fix sending of LSP with null seqno

3 years agoMerge pull request #9488 from pguibert6WIND/fix_nhrp_neigh_state
Russ White [Fri, 27 Aug 2021 23:00:45 +0000 (19:00 -0400)]
Merge pull request #9488 from pguibert6WIND/fix_nhrp_neigh_state

Fix nhrp neigh state

3 years agoMerge pull request #9504 from donaldsharp/cbit_is_needed
Russ White [Fri, 27 Aug 2021 22:52:03 +0000 (18:52 -0400)]
Merge pull request #9504 from donaldsharp/cbit_is_needed

lib: Send c-bit when not using bfdd as daemon of choice

3 years agoMerge pull request #9473 from ton31337/fix/BGP_STR_unified
Sri Mohana Singamsetty [Fri, 27 Aug 2021 20:28:57 +0000 (13:28 -0700)]
Merge pull request #9473 from ton31337/fix/BGP_STR_unified

bgpd: Use BGP_STR for CLI definitions everywhere for BGP CLI

3 years agotests: fix ospf ASBR summary test
Christian Hopps [Fri, 27 Aug 2021 18:46:20 +0000 (14:46 -0400)]
tests: fix ospf ASBR summary test

Previously the check did nothing as the input_dict parameter was wrong.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: Update dir-locals
Christian Hopps [Wed, 14 Jul 2021 08:37:59 +0000 (08:37 +0000)]
tests: Update dir-locals

- format with black in emacs
- wrap text at 88 (black)

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agolib: Send c-bit when not using bfdd as daemon of choice
Donald Sharp [Fri, 27 Aug 2021 13:32:27 +0000 (09:32 -0400)]
lib: Send c-bit when not using bfdd as daemon of choice

Commit: 4b983eef2cb5c7306a8303f002d0e053ebeabdca

Modified the zapi send receive of the c-bit to only
be under the HAVE_BFDD.  If you are using ptm-bfd
then the decoder function still expects this to be
sent down.  This commit puts this behavior back

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9480 from SaiGomathiN/pim-coverity
David Lamparter [Fri, 27 Aug 2021 08:53:35 +0000 (10:53 +0200)]
Merge pull request #9480 from SaiGomathiN/pim-coverity

pimd: Fixing coverity issues

3 years agoMerge pull request #9496 from idryzhov/vrf-cmd-init-unused-arg
David Lamparter [Fri, 27 Aug 2021 08:39:45 +0000 (10:39 +0200)]
Merge pull request #9496 from idryzhov/vrf-cmd-init-unused-arg

lib: remove unused argument from vrf_cmd_init

3 years agotests: configure routers in parallel
Christian Hopps [Wed, 30 Jun 2021 15:43:42 +0000 (15:43 +0000)]
tests: configure routers in parallel

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: improve bgp test determinism by resetting configs
Christian Hopps [Fri, 27 Aug 2021 00:47:46 +0000 (20:47 -0400)]
tests: improve bgp test determinism by resetting configs

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agovtysh: make node walkup code more generic
Igor Ryzhov [Wed, 18 Aug 2021 10:51:39 +0000 (13:51 +0300)]
vtysh: make node walkup code more generic

No need to have special processing for every single node. Just always
use "exit" the necessary number of times - it works for all nodes.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9500 from tomaxuser/master
Quentin Young [Thu, 26 Aug 2021 18:43:57 +0000 (14:43 -0400)]
Merge pull request #9500 from tomaxuser/master

doc: Basic spellchecking of bgp.rst

3 years agoospf6d: extend the "redistribute" command with more options
Renato Westphal [Thu, 26 Aug 2021 16:10:41 +0000 (13:10 -0300)]
ospf6d: extend the "redistribute" command with more options

Add the "metric" and "metric-type" options to the "redistribute"
command.

This is a small commit since the logic of setting the metric
value and type of external routes was already present due to the
implementation of the "default-information originate" command months
ago. This commit merely extends the "redistribute" command to
leverage that functionality.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agolib: make node_parent more generic
Igor Ryzhov [Wed, 18 Aug 2021 10:14:27 +0000 (13:14 +0300)]
lib: make node_parent more generic

Instead of adding a separate case clause for every node, just find the
node structure in the global list and get its parent node from there.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9331 from idryzhov/explicit-exit
Christian Hopps [Thu, 26 Aug 2021 15:57:33 +0000 (11:57 -0400)]
Merge pull request #9331 from idryzhov/explicit-exit

*: explicitly print "exit" at the end of every node config

3 years agoMerge pull request #9492 from Jafaral/pim-cov
Donald Sharp [Thu, 26 Aug 2021 15:06:15 +0000 (11:06 -0400)]
Merge pull request #9492 from Jafaral/pim-cov

pimd: fix coverity/dead-code issue

3 years agoMerge pull request #9498 from idryzhov/fix-bgp-update-source
Donald Sharp [Thu, 26 Aug 2021 13:41:18 +0000 (09:41 -0400)]
Merge pull request #9498 from idryzhov/fix-bgp-update-source

bgpd: fix update-source for ipv6

3 years agodoc: Basic spellchecking of bgp.rst
Tomáš Szaniszlo [Thu, 26 Aug 2021 12:58:35 +0000 (14:58 +0200)]
doc: Basic spellchecking of bgp.rst

Signed-off-by: Tomáš Szaniszlo <tomaxuser@gmail.com>
3 years agobgpd: fix update-source for ipv6
Igor Ryzhov [Thu, 26 Aug 2021 10:07:55 +0000 (13:07 +0300)]
bgpd: fix update-source for ipv6

There's no IPv6 LL address on loopback/vrf interfaces. So if the user
configures update-source, the session is never going to be established.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: Fix sending of LSP with null seqno
Guillaume Solignac [Thu, 27 May 2021 07:34:37 +0000 (09:34 +0200)]
isisd: Fix sending of LSP with null seqno

Check sequence number when building LSP missing in received CSNP

Signed-off-by: Guillaume Solignac <gsoligna@protonmail.com>
3 years agolib: remove unused argument from vrf_cmd_init
Igor Ryzhov [Wed, 25 Aug 2021 16:29:42 +0000 (19:29 +0300)]
lib: remove unused argument from vrf_cmd_init

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib, zebra: complete the ndm flags on zclient api
Philippe Guibert [Wed, 25 Aug 2021 09:46:42 +0000 (11:46 +0200)]
lib, zebra: complete the ndm flags on zclient api

Insist on the fact that zclient neighbor state flags are
mapped over netlink state flags. List all the defines
currently known on kernel, and create a netlink API to
convert netlink values to zclient values. The function is
simplified as it is a 1-1 match.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrp, zebra, lib: pass exact received neighbor state value to nhrp
Philippe Guibert [Wed, 25 Aug 2021 09:40:41 +0000 (11:40 +0200)]
nhrp, zebra, lib: pass exact received neighbor state value to nhrp

As NHRP expects some notification of neighboring entries on GRE
interface, when a new interface notification is encountered, the
exact neighbor state flag is found. Previously, the flag passed
to the upper layer was forced to NDM_STATE which is REACHABLE,
as can be seen on below trace:

2021/08/25 10:58:39 NHRP: [QQ0NK-1H449] Netlink: new-neigh 102.1.1.1 dev gre1 lladdr 10.125.0.2 nud 0x2 cache used 1 type 5

When passing the real value, NHRP received an other value like STALE.

2021/08/25 11:28:44 NHRP: [QQ0NK-1H449] Netlink: new-neigh 102.1.1.1 dev gre1 lladdr 10.125.0.2 nud 0x4 cache used 0 type 5

This flag is important for NHRP, as it permits to monitor the link
layer of NHRP entries.

Fixes: d603c0774eba ("nhrp, zebra, lib: enforce usage of zapi_neigh_ip structure")
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 agopimd: fix coverity/dead-code issue
Jafar Al-Gharaibeh [Wed, 25 Aug 2021 16:20:22 +0000 (11:20 -0500)]
pimd: fix coverity/dead-code issue

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
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 agopimd: Fixing coverity issues
Sai Gomathi [Tue, 24 Aug 2021 17:40:03 +0000 (10:40 -0700)]
pimd: Fixing coverity issues

Problem
======
In pim_msg_send_frame api, the while loop was executed only once.

Fix
===
while is changed to if, as in the code flow
the while part is getting executed only once.

Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
3 years agopimd: Fixing coverity issues
Sai Gomathi [Tue, 24 Aug 2021 17:36:45 +0000 (10:36 -0700)]
pimd: Fixing coverity issues

Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
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 agobgpd: Use BGP_STR for CLI definitions everywhere for BGP CLI
Donatas Abraitis [Tue, 24 Aug 2021 14:37:26 +0000 (17:37 +0300)]
bgpd: Use BGP_STR for CLI definitions everywhere for BGP CLI

Just have some cleanup.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.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 agodoc: Updating the BGP document with BGP fast convergence CLI
Prerana GB [Fri, 6 Aug 2021 18:41:32 +0000 (18:41 +0000)]
doc: Updating the BGP document with BGP fast convergence CLI

Signed-off-by: Prerana G.B <prerana@vmware.com>
3 years agotopotests: Topotest changes for new bgp fast convergence knob
Prerana GB [Fri, 6 Aug 2021 18:35:19 +0000 (18:35 +0000)]
topotests: Topotest changes for new bgp fast convergence knob

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agobgpd: BGP knob to teardown session immediately when peer is unreachable
Prerana-GB [Fri, 6 Aug 2021 15:17:04 +0000 (15:17 +0000)]
bgpd: BGP knob to teardown session immediately when peer is unreachable

When BGP is notified by RIB that peer address is unreachable then BGP session must be brought
down immediately and not wait for the hold-timer expiry. Today single-hop EBGP already behaves
this way but need to change for iBGP and multi-hop EBGP sessions.

Signed-off-by: Prerana G.B <prerana@vmware.com>, Pushpasis Sarkar <spushpasis@vmware.com>
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 ago*: explicitly print "exit" at the end of every node config
Igor Ryzhov [Sun, 8 Aug 2021 19:38:50 +0000 (22:38 +0300)]
*: explicitly print "exit" at the end of every node config

There is a possibility that the same line can be matched as a command in
some node and its parent node. In this case, when reading the config,
this line is always executed as a command of the child node.

For example, with the following config:
```
router ospf
 network 193.168.0.0/16 area 0
!
mpls ldp
 discovery hello interval 111
!
```
Line `mpls ldp` is processed as command `mpls ldp-sync` inside the
`router ospf` node. This leads to a complete loss of `mpls ldp` node
configuration.

To eliminate this issue and all possible similar issues, let's print an
explicit "exit" at the end of every node config.

This commit also changes indentation for a couple of existing exit
commands so that all existing commands are on the same level as their
corresponding node-entering commands.

Fixes #9206.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agopathd: rework config printing code
Igor Ryzhov [Thu, 5 Aug 2021 20:54:22 +0000 (23:54 +0300)]
pathd: rework config printing code

Instead of setting a config_write callback for each node, set a single
callback and print all config from there. It is necessary for the
following work on explicit "exit" command in every node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotools: significantly simplify frr-reload context processing
Igor Ryzhov [Mon, 9 Aug 2021 20:38:21 +0000 (23:38 +0300)]
tools: significantly simplify frr-reload context processing

Currently, in frr-reload we:
- store a list of single-line context keywords which needs to be
  frequently updated,
- have a separate "if" clause for every node and subnode we have in FRR.

Instead, we can store the tree of all known FRR nodes. This tree needs
to be updated whenever we add a new node, which is not frequent. And,
most importantly, it allows us to write node-agnostic code and save more
than 250 LOC.

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