]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 years agotests: reset router configs in parallel 9050/head
Christian Hopps [Wed, 14 Jul 2021 11:15:04 +0000 (07:15 -0400)]
tests: reset router configs in parallel

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: dump the actual json values to log
Christian Hopps [Mon, 2 Aug 2021 22:24:08 +0000 (22:24 +0000)]
tests: dump the actual json values to log

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9244 from LabNConsulting/chopps/fix-bgp-list-test
Donald Sharp [Sun, 1 Aug 2021 01:37:22 +0000 (21:37 -0400)]
Merge pull request #9244 from LabNConsulting/chopps/fix-bgp-list-test

tests: add early interface config for topojson and fix test

3 years agoMerge pull request #9246 from mjstapp/fix_doc_bgp_colons
Donatas Abraitis [Sat, 31 Jul 2021 17:16:39 +0000 (20:16 +0300)]
Merge pull request #9246 from mjstapp/fix_doc_bgp_colons

doc: fix bgp user doc colons

3 years agotests: add early interface config for topojson and fix test 9244/head
Christian Hopps [Fri, 30 Jul 2021 14:00:27 +0000 (14:00 +0000)]
tests: add early interface config for topojson and fix test

- A more general fix for the bgp listener test which requires interfaces be
configured in the kernel when the bgpd daemons are launched.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9228 from LabNConsulting/chopps/scapy-sendpkt
David Lamparter [Sat, 31 Jul 2021 10:09:40 +0000 (12:09 +0200)]
Merge pull request #9228 from LabNConsulting/chopps/scapy-sendpkt

tests: add scapy_sendpkt.py util, replace arping use with it

3 years agotests: add scapy_sendpkt.py util, replace arping use with it 9228/head
Christian Hopps [Thu, 29 Jul 2021 05:33:20 +0000 (05:33 +0000)]
tests: add scapy_sendpkt.py util, replace arping use with it

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agodoc: fix bgp user doc 9246/head
Mark Stapp [Fri, 30 Jul 2021 17:54:01 +0000 (13:54 -0400)]
doc: fix bgp user doc

Too many colons in the bgp doc source file.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agoMerge pull request #9196 from donaldsharp/test_queued
Donatas Abraitis [Fri, 30 Jul 2021 15:05:45 +0000 (18:05 +0300)]
Merge pull request #9196 from donaldsharp/test_queued

tests: Increase timeout for loaded systems

3 years agoMerge pull request #9214 from donaldsharp/assert_cleanup
Mark Stapp [Fri, 30 Jul 2021 13:21:46 +0000 (09:21 -0400)]
Merge pull request #9214 from donaldsharp/assert_cleanup

zebra: bugfix of error quit of zebra, due to no nexthop ACTIVE

3 years agoMerge pull request #9217 from idryzhov/bgp-damp-leaks
Donatas Abraitis [Fri, 30 Jul 2021 12:19:31 +0000 (15:19 +0300)]
Merge pull request #9217 from idryzhov/bgp-damp-leaks

bgpd: fix various memory leaks in dampening

3 years agoMerge pull request #9028 from mobash-rasool/ospfv3-asbr-summarisation
Russ White [Fri, 30 Jul 2021 10:37:50 +0000 (06:37 -0400)]
Merge pull request #9028 from mobash-rasool/ospfv3-asbr-summarisation

Ospfv3 ASBR summarisation feature

3 years agoMerge pull request #9237 from donaldsharp/code_block
Donatas Abraitis [Fri, 30 Jul 2021 07:18:14 +0000 (10:18 +0300)]
Merge pull request #9237 from donaldsharp/code_block

doc: Fix code-block display for example shell commands

3 years agodoc: Fix code-block display for example shell commands 9237/head
Donald Sharp [Fri, 30 Jul 2021 01:42:06 +0000 (21:42 -0400)]
doc: Fix code-block display for example shell commands

the code-block was jumbled and not displaying properly.

Reported by: Drew Bloechl
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: use double-linked list instead of single-linked list in dampening 9217/head
Igor Ryzhov [Thu, 29 Jul 2021 12:31:34 +0000 (15:31 +0300)]
bgpd: use double-linked list instead of single-linked list in dampening

This code always used double-linked list before this rework in 8.0 that
introduced all these crashes and memory leaks. Using single-linked list
is actually a performance regression, because there are frequent removes
here and single-linked list obviously handles removes much worse.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix missing damp info free when cleaning bgp path
Igor Ryzhov [Wed, 28 Jul 2021 22:54:03 +0000 (01:54 +0300)]
bgpd: fix missing damp info free when cleaning bgp path

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix missing delete from the list in dampening
Igor Ryzhov [Wed, 28 Jul 2021 22:43:59 +0000 (01:43 +0300)]
bgpd: fix missing delete from the list in dampening

When bgp_damp_info_free is called from bgp_route.c, we were never
deleting the BDI from the list.

Move the deletion inside bgp_damp_info_free to cover all cases.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: cleanup bgp_damp_info_free
Igor Ryzhov [Wed, 28 Jul 2021 22:39:38 +0000 (01:39 +0300)]
bgpd: cleanup bgp_damp_info_free

bgp_damp_config, afi and safi are never used.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix memory leak in dampening
Igor Ryzhov [Wed, 28 Jul 2021 22:27:18 +0000 (01:27 +0300)]
bgpd: fix memory leak in dampening

bdi->path is never NULL, therefore the structure was never freed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix incorrect usage of slist in dampening
Igor Ryzhov [Wed, 28 Jul 2021 22:17:50 +0000 (01:17 +0300)]
bgpd: fix incorrect usage of slist in dampening

Current code is a complete misuse of SLIST structure. Instead of just
adding a SLIST_ENTRY to struct bgp_damp_info, it allocates a separate
structure to be a node in the list.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9216 from donaldsharp/simple_snmp_fix
Russ White [Thu, 29 Jul 2021 19:04:49 +0000 (15:04 -0400)]
Merge pull request #9216 from donaldsharp/simple_snmp_fix

tests: Set addresses before we use snmpd

3 years agoMerge pull request #9225 from idryzhov/bgp-damp-list-readd
Russ White [Thu, 29 Jul 2021 19:03:17 +0000 (15:03 -0400)]
Merge pull request #9225 from idryzhov/bgp-damp-list-readd

bgpd: fix missing list add in dampening

3 years agoMerge pull request #9193 from mobash-rasool/ospfv3-bug-fixes
Russ White [Thu, 29 Jul 2021 19:00:55 +0000 (15:00 -0400)]
Merge pull request #9193 from mobash-rasool/ospfv3-bug-fixes

ospf6d: Type-7 LSA originated with wrong sequence number

3 years agoMerge pull request #9222 from ton31337/fix/bgp_dampening_clear
Igor Ryzhov [Thu, 29 Jul 2021 15:28:06 +0000 (18:28 +0300)]
Merge pull request #9222 from ton31337/fix/bgp_dampening_clear

bgpd: Drop double-pointer for bgp_damp_info_free()

3 years agobgpd: fix missing list add in dampening 9225/head
Igor Ryzhov [Thu, 29 Jul 2021 11:42:16 +0000 (14:42 +0300)]
bgpd: fix missing list add in dampening

One more crash in dampening code...

When bgp_damp_withdraw is called, if there's already a BDI structure,
bgp_damp_info_claim is called to re-assign the bdi->config in case it
was changed. The problem is that bgp_damp_info_claim actually removes
the BDI from the reuse list of the old config and never adds it to the
reuse list of the new config. We must do this to prevent the crash
because all the code assumes that BDI is always in some list.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9212 from idryzhov/pim-crash
Rafael Zalamena [Thu, 29 Jul 2021 10:10:29 +0000 (07:10 -0300)]
Merge pull request #9212 from idryzhov/pim-crash

pimd: fix missing list remove when deleting mesh group

3 years agoMerge pull request #9215 from idryzhov/bgp-damp-crash
Donatas Abraitis [Thu, 29 Jul 2021 08:47:56 +0000 (11:47 +0300)]
Merge pull request #9215 from idryzhov/bgp-damp-crash

bgpd: fix double free in dampening code

3 years agobgpd: Drop double-pointer for bgp_damp_info_free() 9222/head
Donatas Abraitis [Thu, 29 Jul 2021 08:11:15 +0000 (11:11 +0300)]
bgpd: Drop double-pointer for bgp_damp_info_free()

This causes a crash using `clear ip bgp dampening <prefix>`.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9207 from donaldsharp/snmp_pytest_mark
Donatas Abraitis [Thu, 29 Jul 2021 08:09:26 +0000 (11:09 +0300)]
Merge pull request #9207 from donaldsharp/snmp_pytest_mark

Snmp pytest mark

3 years agoMerge pull request #9209 from donaldsharp/bgp_ipv6_unicast
Donatas Abraitis [Thu, 29 Jul 2021 07:30:32 +0000 (10:30 +0300)]
Merge pull request #9209 from donaldsharp/bgp_ipv6_unicast

bgpd: Mark the node as the correct type for bgp ipv6 unicast

3 years agobgpd: fix double free in dampening code 9215/head
Igor Ryzhov [Wed, 28 Jul 2021 21:14:31 +0000 (00:14 +0300)]
bgpd: fix double free in dampening code

bgp_damp_info_unclaim already calls bgp_reuselist_del. We must not call
it again here.

Fixes #9046.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Set addresses before we use snmpd 9216/head
Donald Sharp [Wed, 28 Jul 2021 20:25:54 +0000 (16:25 -0400)]
tests: Set addresses before we use snmpd

The test_simple_snmp.py test starts bgp, zebra and snmpd at the
same time.  Then zebra configuration is read in and interface
addresses are applied.  If snmp start slower than zebra
the snmp process can properly get it's ip address to bind to
if it is faster than zebra, it will fail.  Ensure that the
test has addresses before we start daemons.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: bugfix of error quit of zebra, due to no nexthop ACTIVE 9214/head
batmancn [Mon, 30 Nov 2020 12:04:44 +0000 (20:04 +0800)]
zebra: bugfix of error quit of zebra, due to no nexthop ACTIVE

There exists some rare situations where fpm will attempt
to send a route update with no valid nexthops.  In that
case an assert would be hit.  This is not good for
trying to keep your routing daemons up and running
when we can safely just recover the situation.

Fixes #7588
Signed-off-by: batmancn <batmanustc@gmail.com>
<fixed commit message, and used zlog_err>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: fix missing list remove when deleting mesh group 9212/head
Igor Ryzhov [Wed, 28 Jul 2021 19:25:31 +0000 (22:25 +0300)]
pimd: fix missing list remove when deleting mesh group

This leads to a crash when you use "show run" after deleting the group.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9104 from idryzhov/topotest-multiline
Donald Sharp [Wed, 28 Jul 2021 15:22:26 +0000 (11:22 -0400)]
Merge pull request #9104 from idryzhov/topotest-multiline

tests: fix invalid multiline format

3 years agobgpd: Mark the node as the correct type for bgp ipv6 unicast 9209/head
Donald Sharp [Wed, 28 Jul 2021 14:56:48 +0000 (10:56 -0400)]
bgpd: Mark the node as the correct type for bgp ipv6 unicast

The bgp ipv6 unicast node should be called `bgp ipv6 unicast`
to make it consistent with other nodes where we list the afi/safi

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9189 from idryzhov/ospf-dont-exit
Donald Sharp [Wed, 28 Jul 2021 14:05:58 +0000 (10:05 -0400)]
Merge pull request #9189 from idryzhov/ospf-dont-exit

ospfd: don't exit when socket is not created

3 years agoMerge pull request #9194 from idryzhov/pim-bool-false
Donald Sharp [Wed, 28 Jul 2021 14:04:44 +0000 (10:04 -0400)]
Merge pull request #9194 from idryzhov/pim-bool-false

pimd: fix incorrect bool returns

3 years agotests: add pytest.mark.isisd to those tests missing it 9207/head
Donald Sharp [Wed, 28 Jul 2021 13:44:34 +0000 (09:44 -0400)]
tests: add pytest.mark.isisd to those tests missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: add pytest.mark.nhrpd for those missing it
Donald Sharp [Wed, 28 Jul 2021 13:41:45 +0000 (09:41 -0400)]
tests: add pytest.mark.nhrpd for those missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.sharpd for those missing it
Donald Sharp [Wed, 28 Jul 2021 13:40:58 +0000 (09:40 -0400)]
tests: Add pytest.mark.sharpd for those missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: add pytest.mark.staticd for those tests missing it
Donald Sharp [Wed, 28 Jul 2021 13:39:47 +0000 (09:39 -0400)]
tests: add pytest.mark.staticd for those tests missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.pimd for those missing it
Donald Sharp [Wed, 28 Jul 2021 13:38:06 +0000 (09:38 -0400)]
tests: Add pytest.mark.pimd for those missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.bgpd for tests missing this mark
Donald Sharp [Wed, 28 Jul 2021 13:37:28 +0000 (09:37 -0400)]
tests: Add pytest.mark.bgpd for tests missing this mark

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.ospfd on tests missing this mark
Donald Sharp [Wed, 28 Jul 2021 13:36:30 +0000 (09:36 -0400)]
tests: Add pytest.mark.ospfd on tests missing this mark

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytestmark to get all snmp tests marked
Donald Sharp [Wed, 28 Jul 2021 12:31:30 +0000 (08:31 -0400)]
tests: Add pytestmark to get all snmp tests marked

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9202 from LabNConsulting/chopps/fix-ospf-quotes
Renato Westphal [Wed, 28 Jul 2021 01:40:51 +0000 (22:40 -0300)]
Merge pull request #9202 from LabNConsulting/chopps/fix-ospf-quotes

ospfd: remove gratuitous non-ascii quotation marks

3 years agoMerge pull request #9007 from donaldsharp/pbr_stuff
Jafar Al-Gharaibeh [Tue, 27 Jul 2021 20:09:29 +0000 (15:09 -0500)]
Merge pull request #9007 from donaldsharp/pbr_stuff

add ability to match on proto to pbr

3 years agoospfd: remove gratuitous non-ascii quotation marks 9202/head
Christian Hopps [Mon, 26 Jul 2021 06:48:50 +0000 (06:48 +0000)]
ospfd: remove gratuitous non-ascii quotation marks

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9187 from mobash-rasool/pim-upst-2
Igor Ryzhov [Tue, 27 Jul 2021 14:24:32 +0000 (17:24 +0300)]
Merge pull request #9187 from mobash-rasool/pim-upst-2

pimd: Validate the fields before accessing it

3 years agotests: Increase timeout for loaded systems 9196/head
Donald Sharp [Tue, 27 Jul 2021 13:38:14 +0000 (09:38 -0400)]
tests: Increase timeout for loaded systems

When running this test on a locally loaded system I am seeing the
static route as `queued` still after 1 second.  Let's just blanket
increase the timeout to something longer to give a very loaded system
more time to install the route.

Output on my test system when it was loaded:

INFO     topolog.r1:topogen.py:880 vtysh result:
{
  "4.5.1.0/24":[
    {
      "prefix":"4.5.1.0/24",
      "prefixLen":24,
      "protocol":"static",
      "vrfId":0,
      "vrfName":"default",
      "selected":true,
      "destSelected":true,
      "distance":1,
      "metric":0,
      "queued":true,
      "table":254,
      "internalStatus":8,
      "internalFlags":73,
      "internalNextHopNum":1,
      "internalNextHopActiveNum":1,
      "uptime":"00:00:00",
      "nexthops":[
        {
          "flags":1,
          "ip":"192.168.216.3",
          "afi":"ipv4",
          "interfaceIndex":11,
          "interfaceName":"r1-eth6",
          "active":true,
          "weight":1
        }
      ]
    },

I suspect 10 seconds should be enough( I would hope ).

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: don't exit when socket is not created 9189/head
Igor Ryzhov [Tue, 27 Jul 2021 13:10:35 +0000 (16:10 +0300)]
ospfd: don't exit when socket is not created

Let's be less radical. There's no reason to stop the whole daemon when
there's a socket creation error in a single VRF. The user can always
restart this single VRF to retry to create a socket.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8944 from opensourcerouting/ospf6-mtu-revert
Igor Ryzhov [Tue, 27 Jul 2021 13:06:40 +0000 (16:06 +0300)]
Merge pull request #8944 from opensourcerouting/ospf6-mtu-revert

ospf6d: revert PR #8622

3 years agoMerge pull request #8897 from gpnaveen/ospfv3_base_cases
Russ White [Tue, 27 Jul 2021 12:49:51 +0000 (08:49 -0400)]
Merge pull request #8897 from gpnaveen/ospfv3_base_cases

tests:  adding ospfv3 basic cases

3 years agoospf6d: Type-7 LSA originated with wrong sequence number 9193/head
Mobashshera Rasool [Tue, 27 Jul 2021 08:01:56 +0000 (01:01 -0700)]
ospf6d: Type-7 LSA originated with wrong sequence number

RCA: When Type-7 LSA is updated, the LSDB is searched, if the
LSA is present in the LSDB then the LSA is updated with next
sequence number and if not then it is originated with the
INITIAL sequence number.
Here while originating Type-7 LSA Process Level LSDB is searched
for instead of area level LSDB.

Fix: Search in the area level LSDB and not in the process level.

Fixes #9099

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #9107 from donaldsharp/label_destruction
David Lamparter [Tue, 27 Jul 2021 12:28:13 +0000 (14:28 +0200)]
Merge pull request #9107 from donaldsharp/label_destruction

zebra: On client shutdown cleanup any vrf labels associated with it

3 years agoMerge pull request #9190 from donaldsharp/join_prune_smaller
Donatas Abraitis [Tue, 27 Jul 2021 12:26:52 +0000 (15:26 +0300)]
Merge pull request #9190 from donaldsharp/join_prune_smaller

Join prune smaller

3 years agoMerge pull request #9088 from donaldsharp/zebra_redistribute_wrong_tables
David Lamparter [Tue, 27 Jul 2021 12:14:23 +0000 (14:14 +0200)]
Merge pull request #9088 from donaldsharp/zebra_redistribute_wrong_tables

zebra: Do not allow redistribution for non-vrf tables

3 years agoMerge pull request #9090 from opensourcerouting/ospfv3-fixes-20210720
Donald Sharp [Tue, 27 Jul 2021 12:06:54 +0000 (08:06 -0400)]
Merge pull request #9090 from opensourcerouting/ospfv3-fixes-20210720

ospf6d: small batch of random fixes/improvements

3 years agoMerge pull request #9162 from ton31337/fix/use_strcmp_for_match_alias
Igor Ryzhov [Tue, 27 Jul 2021 09:15:32 +0000 (12:15 +0300)]
Merge pull request #9162 from ton31337/fix/use_strcmp_for_match_alias

bgpd: Use strcmp comparing BGP alias with an actual entered alias

3 years agopimd: Validate the fields before accessing it 9187/head
Mobashshera Rasool [Mon, 26 Jul 2021 13:35:31 +0000 (06:35 -0700)]
pimd: Validate the fields before accessing it

This commit is to correct the order in which the fields are
accessed while verifying it. First the fields should be
verified, and if it is valid then access it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agopimd: fix incorrect bool returns 9194/head
Igor Ryzhov [Tue, 27 Jul 2021 08:41:36 +0000 (11:41 +0300)]
pimd: fix incorrect bool returns

-1 is true when casted to bool.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Reduce pim join/prune interval to 5 seconds 9190/head
Donald Sharp [Mon, 26 Jul 2021 15:57:25 +0000 (11:57 -0400)]
tests: Reduce pim join/prune interval to 5 seconds

Tests should have low enough overhead that sending
the join/prune every 5 seconds should be sufficient
also it should allow us to converge faster in case of
dropped packets.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agodoc: Modify documentation for timer change
Donald Sharp [Mon, 26 Jul 2021 14:04:39 +0000 (10:04 -0400)]
doc: Modify documentation for timer change

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: Allow join prune intervals to be as small as 5 seconds
Donald Sharp [Mon, 26 Jul 2021 14:02:21 +0000 (10:02 -0400)]
pimd: Allow join prune intervals to be as small as 5 seconds

Allow the join-prune interval to be as small as 5 seconds instead
of limiting the value to 60.

This can and will come at a price of being able to converge less
mroutes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Adding ospfv3 asbr summarisation 9028/head
Mobashshera Rasool [Mon, 26 Jul 2021 04:14:12 +0000 (04:14 +0000)]
tests: Adding ospfv3 asbr summarisation

Total cases 9.

Authored-by: nguggarigoud <nguggarigoud@vmware.com>
Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #9166 from idryzhov/vtysh-enable
Donald Sharp [Mon, 26 Jul 2021 11:22:03 +0000 (07:22 -0400)]
Merge pull request #9166 from idryzhov/vtysh-enable

vtysh: another take at "enable" in vtysh user mode

3 years agoMerge pull request #8637 from opensourcerouting/pim-vrf-acl-fixes
Donatas Abraitis [Mon, 26 Jul 2021 09:20:54 +0000 (12:20 +0300)]
Merge pull request #8637 from opensourcerouting/pim-vrf-acl-fixes

Pim vrf acl fixes

3 years agovtysh: don't install "enable" command in user mode 9166/head
Igor Ryzhov [Fri, 23 Jul 2021 15:38:20 +0000 (18:38 +0300)]
vtysh: don't install "enable" command in user mode

Recent change in d1b287e only fixed the problem for 3-letter words.

We were still displaying error for longer words starting with "ena":
```
nfware> enac
% Command not allowed: enable
nfware> enad
% Command not allowed: enable
nfware> enaena
% Command not allowed: enable
```

If we don't allow "enable" command in user mode, why add it at all?

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: Use strcmp comparing BGP alias with an actual entered alias 9162/head
Donatas Abraitis [Fri, 23 Jul 2021 12:14:54 +0000 (15:14 +0300)]
bgpd: Use strcmp comparing BGP alias with an actual entered alias

It might be a case when a partial match is hit and this needs to be fixed.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9120 from taspelund/remove_rmac_seq
Donatas Abraitis [Fri, 23 Jul 2021 05:39:56 +0000 (08:39 +0300)]
Merge pull request #9120 from taspelund/remove_rmac_seq

zebra: Remove MM seq from evpn rmac json output

3 years agoMerge pull request #9116 from donaldsharp/vtysh_enable
Donatas Abraitis [Fri, 23 Jul 2021 05:33:02 +0000 (08:33 +0300)]
Merge pull request #9116 from donaldsharp/vtysh_enable

vtysh: Handle `en` better when in -u for vtysh

3 years agoMerge pull request #9126 from donaldsharp/rpki_spacing
Donatas Abraitis [Fri, 23 Jul 2021 05:27:37 +0000 (08:27 +0300)]
Merge pull request #9126 from donaldsharp/rpki_spacing

bgpd: Fix rpki spacing to be 1 for indentation

3 years agobgpd: Fix rpki spacing to be 1 for indentation 9126/head
Donald Sharp [Thu, 22 Jul 2021 20:53:15 +0000 (16:53 -0400)]
bgpd: Fix rpki spacing to be 1 for indentation

The rpki sub-node was outputting 2 spaces instead
of 1 space.  Let's fix that to be consistent with
the rest of our code.

Fixes: #2738
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Remove MM seq from evpn rmac json output 9120/head
Trey Aspelund [Thu, 1 Apr 2021 04:43:55 +0000 (04:43 +0000)]
zebra: Remove MM seq from evpn rmac json output

Currently 'show evpn rmac vni .. mac .. json' includes fields for
localSequence and remoteSequence, which are misleading since they
aren't applicable to a macs in the IP-VRF mac table (RMAC).
This removes the localSequence + remoteSequence fields from the output.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
3 years agovtysh: Handle `en` better when in -u for vtysh 9116/head
Donald Sharp [Thu, 22 Jul 2021 15:59:25 +0000 (11:59 -0400)]
vtysh: Handle `en` better when in -u for vtysh

vtysh was unable to distinguish between end and ena.  The
code can now do so:

sharpd@eva ~/frr5 (master)> sudo vtysh/vtysh -u sharpd

Hello, this is FRRouting (version 8.1-dev).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

eva> e
% Ambiguous command: e
eva> en
% Command not allowed: enable
eva> ena
% Command not allowed: enable
eva> enab
% Command not allowed: enable
eva> enabl
% Command not allowed: enable
eva> enable
% Command not allowed: enable
eva> enb
% Unknown command: enb
eva> enc
% Unknown command: enc
eva> end
% Unknown command: end
eva> ene
% Unknown command: ene
eva> quit

Fixes: #2296
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8983 from mobash-rasool/pim-upstreaming-activity
Donald Sharp [Thu, 22 Jul 2021 12:35:06 +0000 (08:35 -0400)]
Merge pull request #8983 from mobash-rasool/pim-upstreaming-activity

pimd: Minor fixes for BSM Show CLI and Hold Timer CLI

3 years agoMerge pull request #8986 from mobash-rasool/pim-upst-2
Donald Sharp [Thu, 22 Jul 2021 12:33:24 +0000 (08:33 -0400)]
Merge pull request #8986 from mobash-rasool/pim-upst-2

pimd: To print querierIP address on the querier and nonQuerier IGMP e…

3 years agoMerge pull request #9082 from ton31337/feature/bgp_alias_route-map_match
Donald Sharp [Thu, 22 Jul 2021 12:30:15 +0000 (08:30 -0400)]
Merge pull request #9082 from ton31337/feature/bgp_alias_route-map_match

bgpd: `match alias` for route-map

3 years agoMerge pull request #9091 from gord1306/remove_lst_vlan
Donald Sharp [Thu, 22 Jul 2021 11:04:20 +0000 (07:04 -0400)]
Merge pull request #9091 from gord1306/remove_lst_vlan

zebra: trigger remove all access vlans info for access port

3 years agoMerge pull request #9102 from opensourcerouting/autoconf-fix-gcov
Donald Sharp [Wed, 21 Jul 2021 23:26:15 +0000 (19:26 -0400)]
Merge pull request #9102 from opensourcerouting/autoconf-fix-gcov

build: fix LDFLAGS confusion & gcov

3 years agoMerge pull request #9105 from idryzhov/vtysh-ls-pw
Donald Sharp [Wed, 21 Jul 2021 23:20:07 +0000 (19:20 -0400)]
Merge pull request #9105 from idryzhov/vtysh-ls-pw

vtysh, lib, zebra: fix exit from link-params and pseudowire nodes

3 years agozebra: On client shutdown cleanup any vrf labels associated with it 9107/head
Donald Sharp [Wed, 21 Jul 2021 17:55:52 +0000 (13:55 -0400)]
zebra: On client shutdown cleanup any vrf labels associated with it

When a vrf label is created by a client and the client disconnects
we should clean up any vrf labels associated with that client.

eva# show mpls table
 Inbound Label  Type   Nexthop  Outbound Label
 -----------------------------------------------
 1000           SHARP  RED      -

eva# exit
sharpd@eva ~/f/zebra (label_destruction)> ps -ef | grep frr
root     4017793       1  0 13:57 ?        00:00:00 /usr/lib/frr/watchfrr -d -F datacenter --log file:/var/log/frr/watchfrr.log --log-level debug zebra bgpd ospfd isisd pimd eigrpd sharpd staticd
frr      4017824       1  0 13:57 ?        00:00:00 /usr/lib/frr/zebra -d -F datacenter --log file:/tmp/zebra.log -r --graceful_restart 60 -A 127.0.0.1 -s 90000000
frr      4017829       1  0 13:57 ?        00:00:00 /usr/lib/frr/bgpd -d -F datacenter -M rpki -A 127.0.0.1
frr      4017836       1  0 13:57 ?        00:00:00 /usr/lib/frr/ospfd -d -F datacenter -A 127.0.0.1
frr      4017839       1  0 13:57 ?        00:00:00 /usr/lib/frr/isisd -d -F datacenter -A 127.0.0.1
frr      4017842       1  0 13:57 ?        00:00:00 /usr/lib/frr/pimd -d -F datacenter -A 127.0.0.1
frr      4017865       1  0 13:57 ?        00:00:00 /usr/lib/frr/eigrpd -d -F datacenter -A 127.0.0.1
frr      4017869       1  0 13:57 ?        00:00:00 /usr/lib/frr/sharpd -d -F datacenter -A 127.0.0.1
frr      4017888       1  0 13:57 ?        00:00:00 /usr/lib/frr/staticd -d -F datacenter -A 127.0.0.1
sharpd   4018624 3938423  0 14:02 pts/10   00:00:00 grep --color=auto frr
sharpd@eva ~/f/zebra (label_destruction)> sudo kill -9 4017869

sharpd@eva ~/f/zebra (label_destruction)> sudo vtysh -c "show mpls table"
sharpd@eva ~/f/zebra (label_destruction)>

Fixes: #1787
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobuild: use `--coverage` for gcov 9102/head
David Lamparter [Wed, 21 Jul 2021 09:23:23 +0000 (11:23 +0200)]
build: use `--coverage` for gcov

libtool does not understand `-coverage` with a single dash.  Official
gcc docs also say `--coverage` rather than `-coverage`.  (clang lists
both.)

Also, for correct linking, libtool needs `--coverage` in LDFLAGS as
opposed to `-lgcov` (with the latter you get library ordering/deps
issues)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agobuild: fix `AM_LDFLAGS` usage (and gcov)
David Lamparter [Wed, 21 Jul 2021 09:04:23 +0000 (11:04 +0200)]
build: fix `AM_LDFLAGS` usage (and gcov)

like the other automake variables, setting `xyz_LDFLAGS` causes
`AM_LDFLAGS` to be ignored for `xyz`.  For some reason I had in my mind
that automake doesn't do this for LDFLAGS, but... it does.  (Which is
consistent with `_CFLAGS` and co.)

So, all the libraries and modules have been ignoring `AM_LDFLAGS` (which
includes `SAN_FLAGS` too).  Set up new `LIB_LDFLAGS` and
`MODULE_LDFLAGS` to handle all of this correctly (and move these bits to
a central location.)

Fixes: #9034
Fixes: 0c4285d77eb ("build: properly split CFLAGS from AC_CFLAGS")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib, zebra: fix exit from link-params node 9105/head
Igor Ryzhov [Wed, 21 Jul 2021 14:23:45 +0000 (17:23 +0300)]
lib, zebra: fix exit from link-params node

When exiting from link-params node, we must not decrement xpath_index
because it is not incremented when entering the node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agovtysh: fix exit from zebra-only nodes
Igor Ryzhov [Wed, 21 Jul 2021 14:22:14 +0000 (17:22 +0300)]
vtysh: fix exit from zebra-only nodes

When exiting from link-params and pseudowire nodes, we were sending exit
command to all VTYSH_INTERFACE daemons. This led to a desynchronized
state in vtysh and daemons other then zebra. We must send exit command
only to zebra.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: fix invalid multiline format 9104/head
Igor Ryzhov [Wed, 21 Jul 2021 12:37:15 +0000 (15:37 +0300)]
tests: fix invalid multiline format

`format` can't be used per-line when we have a multiline string.

This was recently broken in 3881d05.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9094 from mjstapp/fix_pathd_pcep_localtime
Donald Sharp [Wed, 21 Jul 2021 11:48:28 +0000 (07:48 -0400)]
Merge pull request #9094 from mjstapp/fix_pathd_pcep_localtime

pathd: don't use localtime

3 years agoMerge pull request #8956 from pguibert6WIND/bgp_loop_through_itself
Donatas Abraitis [Wed, 21 Jul 2021 06:28:21 +0000 (09:28 +0300)]
Merge pull request #8956 from pguibert6WIND/bgp_loop_through_itself

bgpd: prevent routes loop through itself

3 years agodoc: Add `match alias` command for BGP route-maps 9082/head
Donatas Abraitis [Sun, 18 Jul 2021 12:14:01 +0000 (15:14 +0300)]
doc: Add `match alias` command for BGP route-maps

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotests: Check if `match alias` works for route-maps
Donatas Abraitis [Sun, 18 Jul 2021 11:36:53 +0000 (14:36 +0300)]
tests: Check if `match alias` works for route-maps

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Add route-map `match alias` command
Donatas Abraitis [Sun, 18 Jul 2021 09:14:24 +0000 (12:14 +0300)]
bgpd: Add route-map `match alias` command

Will be handy to filter BGP prefixes by using BGP community alias
instead of numerical community values.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoospf6d: ASBR summarisation per VRF
Mobashshera Rasool [Tue, 20 Jul 2021 05:25:10 +0000 (05:25 +0000)]
ospf6d: ASBR summarisation per VRF

Added code to support the ASBR summarisation per VRF.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospf6d: Store ospf6 back pointer in route struct
Mobashshera Rasool [Thu, 15 Jul 2021 15:47:36 +0000 (15:47 +0000)]
ospf6d: Store ospf6 back pointer in route struct

Storing the pointer to ospf6 struct in route struct.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospf6d: Review comment fixes
Mobashshera Rasool [Wed, 14 Jul 2021 17:55:43 +0000 (17:55 +0000)]
ospf6d: Review comment fixes

This commit is ease reviewing the review comment fixes.

Signed:-off-by: Mobashshera Rasool <mrasool@vmware.com>

3 years agodoc: Documentation update for ASBR Summarisation
Mobashshera Rasool [Wed, 14 Jul 2021 16:44:00 +0000 (16:44 +0000)]
doc: Documentation update for ASBR Summarisation

This is for ASBR summarisation new feature addition.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospf6d: install summary route NULL0 as nexthop
Mobashshera Rasool [Wed, 14 Jul 2021 09:07:37 +0000 (09:07 +0000)]
ospf6d: install summary route NULL0 as nexthop

This is a requirement for avoiding sending traffic somewhere it was not
supposed to go: install summary route to local RIB to send traffic to
Null0.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospf6d: support blackhole next hops
Mobashshera Rasool [Wed, 14 Jul 2021 05:14:17 +0000 (05:14 +0000)]
ospf6d: support blackhole next hops

This feature is required for creating summary routes that drop traffic
without more specific routes.

Authored-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospf6d: ASBR summarisation feature changes for NSSA area
Mobashshera Rasool [Fri, 9 Jul 2021 09:47:40 +0000 (09:47 +0000)]
ospf6d: ASBR summarisation feature changes for NSSA area

1. ASBR summarisation for Type-7 LSAs are done here.

2. Fixed Code warnings

Signed-off-by: Mobashshera Rasool<mrasool@vmware.com>