]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #7483 from AnuradhaKaruppiah/evpn-mh-dad
Patrick Ruddy [Tue, 1 Dec 2020 17:37:32 +0000 (17:37 +0000)]
Merge pull request #7483 from AnuradhaKaruppiah/evpn-mh-dad

bgpd, zebra: Keep DAD disabled if EVPN MH is turned on

3 years agoMerge pull request #7632 from idryzhov/vtysh-memory-fixes
Donald Sharp [Tue, 1 Dec 2020 17:08:52 +0000 (12:08 -0500)]
Merge pull request #7632 from idryzhov/vtysh-memory-fixes

vtysh memory fixes

3 years agoMerge pull request #7642 from donaldsharp/remove_pimd_version
Mark Stapp [Tue, 1 Dec 2020 16:59:31 +0000 (11:59 -0500)]
Merge pull request #7642 from donaldsharp/remove_pimd_version

pimd: Remove pim_version.c it is never used

3 years agoMerge pull request #7640 from opensourcerouting/bfd-echo-minttl-check
Donald Sharp [Tue, 1 Dec 2020 14:31:57 +0000 (09:31 -0500)]
Merge pull request #7640 from opensourcerouting/bfd-echo-minttl-check

bfdd: session specific command type checks

3 years agopimd: Remove pim_version.c it is never used
Donald Sharp [Tue, 1 Dec 2020 12:57:45 +0000 (07:57 -0500)]
pimd: Remove pim_version.c it is never used

The pim_version.[c|h] files are never used and we are getting
warnings about PIM_VERSION changing pointer sizes from
newer versions of the compiler.  I see no reason to keep this

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7404 from vishaldhingra/pim
Donald Sharp [Tue, 1 Dec 2020 12:48:54 +0000 (07:48 -0500)]
Merge pull request #7404 from vishaldhingra/pim

pimd: (*,G) Prune processing doesn't remove SGRpt ifchannel

3 years agoMerge pull request #7578 from mjstapp/fix_pim_subdir_am
Donald Sharp [Tue, 1 Dec 2020 12:41:33 +0000 (07:41 -0500)]
Merge pull request #7578 from mjstapp/fix_pim_subdir_am

pimd: fix build and compilation errors

3 years agobfdd: session specific command type checks
Rafael Zalamena [Tue, 1 Dec 2020 11:01:37 +0000 (08:01 -0300)]
bfdd: session specific command type checks

Replace the unclear error message:

```
% Failed to edit configuration.

YANG error(s):
 Schema node not found.
 YANG path: /frr-bfdd:bfdd/bfd/sessions/single-hop[dest-addr='192.168.253.6'][interface=''][vrf='default']/minimum-ttl
```

With:

```
frr(config-bfd-peer)# minimum-ttl 250
% Minimum TTL is only available for multi hop sessions.

! or

frr(config-bfd-peer)# echo
% Echo mode is only available for single hop sessions.
frr(config-bfd-peer)# echo-interval 300
% Echo mode is only available for single hop sessions.
```

Reported-by: Trae Santiago
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agodoc: add description of the new memory macro
Igor Ryzhov [Tue, 1 Dec 2020 08:39:40 +0000 (11:39 +0300)]
doc: add description of the new memory macro

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #7630 from donaldsharp/snmp_clarity
Donatas Abraitis [Tue, 1 Dec 2020 08:32:06 +0000 (10:32 +0200)]
Merge pull request #7630 from donaldsharp/snmp_clarity

doc: Explicitly call out need to add snmp module

3 years agoMerge pull request #7631 from mjstapp/fix_pw_ctx_leak
Donald Sharp [Mon, 30 Nov 2020 18:48:38 +0000 (13:48 -0500)]
Merge pull request #7631 from mjstapp/fix_pw_ctx_leak

zebra: free dplane ctx after pw update

3 years agovtysh: fix incorrect memory statistics
Igor Ryzhov [Mon, 30 Nov 2020 15:50:51 +0000 (18:50 +0300)]
vtysh: fix incorrect memory statistics

As code comment states, 1 count of MTYPE_COMPLETION is leaked for each
autocompleted token. Let's manually decrement the counter before passing
the pointer to readline.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agovtysh: fix memory leak
Igor Ryzhov [Mon, 30 Nov 2020 15:44:10 +0000 (18:44 +0300)]
vtysh: fix memory leak

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agozebra: free dplane ctx after pw update
Mark Stapp [Mon, 30 Nov 2020 15:02:40 +0000 (10:02 -0500)]
zebra: free dplane ctx after pw update

Free the dplane contexts used for pseudowire updates; we were
leaking these.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodoc: Explicitly call out need to add snmp module
Donald Sharp [Mon, 30 Nov 2020 13:39:29 +0000 (08:39 -0500)]
doc: Explicitly call out need to add snmp module

The documentation implied how snmp works.  Explicitly call
it out a bit more for future users.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7621 from idryzhov/fix-cisco-access-list
Rafael Zalamena [Mon, 30 Nov 2020 12:16:33 +0000 (09:16 -0300)]
Merge pull request #7621 from idryzhov/fix-cisco-access-list

yang: fix cisco access list source value

3 years agoMerge pull request #7620 from ckishimo/cosmetic2
Rafael Zalamena [Mon, 30 Nov 2020 11:53:33 +0000 (08:53 -0300)]
Merge pull request #7620 from ckishimo/cosmetic2

ospfd: fix a couple of typos

3 years agoMerge pull request #7584 from opensourcerouting/topotest-asan-fix
Donald Sharp [Fri, 27 Nov 2020 22:35:08 +0000 (17:35 -0500)]
Merge pull request #7584 from opensourcerouting/topotest-asan-fix

tests: Fix Topotest runs with newerversion of Address Sanitizer

3 years agoyang: fix cisco access list source value
Igor Ryzhov [Fri, 27 Nov 2020 18:53:25 +0000 (21:53 +0300)]
yang: fix cisco access list source value

Source value must be a choice between host, network and any, not a set
of all three.

Fixes #7599.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Ignore YANG stderr messages in test_all_protocol_startup test
Martin Winter [Fri, 27 Nov 2020 02:20:16 +0000 (03:20 +0100)]
tests: Ignore YANG stderr messages in test_all_protocol_startup test

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agotests: Fix logging output directory for older tests
Martin Winter [Fri, 27 Nov 2020 02:16:55 +0000 (03:16 +0100)]
tests: Fix logging output directory for older tests

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agotests: Fix FRR process shutdown in failed topotest teardown phase
Martin Winter [Wed, 25 Nov 2020 21:59:40 +0000 (22:59 +0100)]
tests: Fix FRR process shutdown in failed topotest teardown phase

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agotests: Fix Topotest runs with newerversion of Address Sanitizer
Martin Winter [Mon, 23 Nov 2020 03:06:07 +0000 (04:06 +0100)]
tests: Fix Topotest runs with newerversion of Address Sanitizer

Fix Address Sanitizer Issue detection with newer ASAN versions

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #7614 from donaldsharp/more_use_after_free
Renato Westphal [Fri, 27 Nov 2020 11:51:24 +0000 (08:51 -0300)]
Merge pull request #7614 from donaldsharp/more_use_after_free

ldpd: Prevent usage after free

3 years agoMerge pull request #7593 from opensourcerouting/bgp_features_ospf_fix
Donald Sharp [Thu, 26 Nov 2020 23:36:54 +0000 (18:36 -0500)]
Merge pull request #7593 from opensourcerouting/bgp_features_ospf_fix

tests: Make ospf in bgp_features testsuite predictable

3 years agoMerge pull request #7611 from opensourcerouting/docker_key_update
Donald Sharp [Thu, 26 Nov 2020 23:33:12 +0000 (18:33 -0500)]
Merge pull request #7611 from opensourcerouting/docker_key_update

tests: Update topotest Dockerfile to pick up keys from deb repo

3 years agoldpd: Prevent usage after free
Donald Sharp [Thu, 26 Nov 2020 23:23:57 +0000 (18:23 -0500)]
ldpd: Prevent usage after free

error 26-Nov-2020 14:35:02 ERROR: AddressSanitizer: heap-use-after-free on address 0x631000024838 at pc 0x55cefae977e9 bp 0x7ffdd3546860 sp 0x7ffdd3546850
error 26-Nov-2020 14:35:02 READ of size 4 at 0x631000024838 thread T0
error 26-Nov-2020 14:35:02     #0 0x55cefae977e8 in ldpe_imsg_compose_parent_sync ldpd/ldpe.c:256
error 26-Nov-2020 14:35:02     #1 0x55cefae9ab13 in vlog ldpd/log.c:53
error 26-Nov-2020 14:35:02     #2 0x55cefae9b21f in log_info ldpd/log.c:102
error 26-Nov-2020 14:35:02     #3 0x55cefae96eae in ldpe_shutdown ldpd/ldpe.c:237
error 26-Nov-2020 14:35:02     #4 0x55cefae99254 in ldpe_dispatch_main ldpd/ldpe.c:585
error 26-Nov-2020 14:35:02     #5 0x55cefaf93875 in thread_call lib/thread.c:1681
error 26-Nov-2020 14:35:02     #6 0x55cefae97304 in ldpe ldpd/ldpe.c:136
error 26-Nov-2020 14:35:02     #7 0x55cefae5a2e2 in main ldpd/ldpd.c:322
error 26-Nov-2020 14:35:02     #8 0x7f4ef0c33b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
error 26-Nov-2020 14:35:02     #9 0x55cefae525e9 in _start (/usr/lib/frr/ldpd+0xb35e9)
error 26-Nov-2020 14:35:02
error 26-Nov-2020 14:35:02 0x631000024838 is located 65592 bytes inside of 65632-byte region [0x631000014800,0x631000024860)
error 26-Nov-2020 14:35:02 freed by thread T0 here:
error 26-Nov-2020 14:35:02     #0 0x7f4ef21e37a8 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7a8)
error 26-Nov-2020 14:35:02     #1 0x55cefae96e91 in ldpe_shutdown ldpd/ldpe.c:234
error 26-Nov-2020 14:35:02     #2 0x55cefae99254 in ldpe_dispatch_main ldpd/ldpe.c:585
error 26-Nov-2020 14:35:02     #3 0x55cefaf93875 in thread_call lib/thread.c:1681
error 26-Nov-2020 14:35:02     #4 0x55cefae97304 in ldpe ldpd/ldpe.c:136
error 26-Nov-2020 14:35:02     #5 0x55cefae5a2e2 in main ldpd/ldpd.c:322
error 26-Nov-2020 14:35:02     #6 0x7f4ef0c33b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
error 26-Nov-2020 14:35:02
error 26-Nov-2020 14:35:02 previously allocated by thread T0 here:
error 26-Nov-2020 14:35:02     #0 0x7f4ef21e3d28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
error 26-Nov-2020 14:35:02     #1 0x55cefae9725d in ldpe ldpd/ldpe.c:127
error 26-Nov-2020 14:35:02     #2 0x55cefae5a2e2 in main ldpd/ldpd.c:322
error 26-Nov-2020 14:35:02     #3 0x7f4ef0c33b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Clean this problem up in the same way as the previous commit

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Update topotest Dockerfile to pick up keys from deb repo
Martin Winter [Thu, 26 Nov 2020 13:50:38 +0000 (14:50 +0100)]
tests: Update topotest Dockerfile to pick up keys from deb repo

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #7603 from donaldsharp/ospf_crash_fix
Donatas Abraitis [Thu, 26 Nov 2020 12:53:18 +0000 (14:53 +0200)]
Merge pull request #7603 from donaldsharp/ospf_crash_fix

ospfd: Prevent crash by accessing memory not owned.

3 years agoMerge pull request #7586 from kuldeepkash/bgp_multi_vrf
Donatas Abraitis [Thu, 26 Nov 2020 07:48:54 +0000 (09:48 +0200)]
Merge pull request #7586 from kuldeepkash/bgp_multi_vrf

tests: Add tests to bgp_multi_vrf_topo2

3 years agotests: Make ospf convergence predictable by setting if priority
Martin Winter [Mon, 23 Nov 2020 22:34:51 +0000 (23:34 +0100)]
tests: Make ospf convergence predictable by setting if priority

Added OSPF priorities to force a predictable DR/Backup router selection

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #7600 from pjdruddy/evpn-mh-sa
Donald Sharp [Wed, 25 Nov 2020 21:30:29 +0000 (16:30 -0500)]
Merge pull request #7600 from pjdruddy/evpn-mh-sa

bgpd: correctly store allocated ES struct

3 years agoMerge pull request #7608 from qlyoung/fix-missing-sockunion-init
Mark Stapp [Wed, 25 Nov 2020 21:07:08 +0000 (16:07 -0500)]
Merge pull request #7608 from qlyoung/fix-missing-sockunion-init

bgpd: remove unused, uninitialized sockunion

3 years agoMerge pull request #7607 from pguibert6WIND/topo_python3_preparation
Mark Stapp [Wed, 25 Nov 2020 19:22:10 +0000 (14:22 -0500)]
Merge pull request #7607 from pguibert6WIND/topo_python3_preparation

Topo python3 preparation

3 years agobgpd: correctly store allocated ES struct
Pat Ruddy [Wed, 25 Nov 2020 10:18:45 +0000 (10:18 +0000)]
bgpd: correctly store allocated ES struct

in the rare situation where we allocate the ES during the path link
we fail to check/store the allocated ES pointer thus leading to a
NULL dereference later in the function.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoMerge pull request #7602 from donaldsharp/ldp_use_after_free
Renato Westphal [Wed, 25 Nov 2020 17:51:53 +0000 (14:51 -0300)]
Merge pull request #7602 from donaldsharp/ldp_use_after_free

ldpd: Prevent usage after free

3 years agobgpd: remove unused, uninitialized sockunion
Quentin Young [Wed, 25 Nov 2020 17:49:06 +0000 (12:49 -0500)]
bgpd: remove unused, uninitialized sockunion

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agotopotests: precise importation folder
Philippe Guibert [Tue, 24 Nov 2020 13:10:16 +0000 (13:10 +0000)]
topotests: precise importation folder

the topolog importation folder must be precised. otherwise following
error message appears:

root@dut-vm:~/topotests/bgp_flowspec# python3 test_bgp_flowspec_topo.py
Traceback (most recent call last):
  File "test_bgp_flowspec_topo.py", line 96, in <module>
    from lib.lutil import lUtil
  File "/root/topotests/bgp_flowspec/../lib/lutil.py", line 25, in <module>
    from topolog import logger
ImportError: No module named 'topolog'
root@dut-vm:~/topotests/bgp_flowspec#

The same error occurs with lutil and bgprib which are 2 libraries
located under lib/ folder. Some precisions are added too.

PR=71290
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agotopotests: python3, replace iteritems with items
Philippe Guibert [Wed, 25 Nov 2020 16:23:19 +0000 (16:23 +0000)]
topotests: python3, replace iteritems with items

replace iteritems() calls with items()

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agotopotests: python3, rename iterkey() with key() for dictionary usage
Philippe Guibert [Wed, 25 Nov 2020 12:49:45 +0000 (12:49 +0000)]
topotests: python3, rename iterkey() with key() for dictionary usage

dictionary method iterkey() is not used in python3 and is replaced with
key() method.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agotopotests: python3, fix error ValueError: can't have unbuffered text I/O
Philippe Guibert [Wed, 25 Nov 2020 09:32:51 +0000 (09:32 +0000)]
topotests: python3, fix error ValueError: can't have unbuffered text I/O

This error occurs when passing some 0 values to open() extra argument.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agotopotests: python3, replace execfile with exec
Philippe Guibert [Wed, 25 Nov 2020 09:37:15 +0000 (09:37 +0000)]
topotests: python3, replace execfile with exec

python3 does not support execfile implementation.
replace it with open and exec api that are available in both python 2
and 3 implementations.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoospfd: Prevent crash by accessing memory not owned.
Donald Sharp [Wed, 25 Nov 2020 14:49:28 +0000 (09:49 -0500)]
ospfd: Prevent crash by accessing memory not owned.

When allocating memory for the `struct ospf_metric` we
were using `uint32_t` instead of the actual size of this
structure.  When we wrote to it we would be writing
into other people's memory.

Found-by: Amol Lad
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoldpd: Prevent usage after free
Donald Sharp [Wed, 25 Nov 2020 12:36:43 +0000 (07:36 -0500)]
ldpd: Prevent usage after free

We are using data after it has been freed and handed back to the
OS.
Address Sanitizer output:

error 23-Nov-2020 18:53:57 ERROR: AddressSanitizer: heap-use-after-free on address 0x631000024838 at pc 0x55f825998f58 bp 0x7fffa5b0f5b0 sp 0x7fffa5b0f5a0
error 23-Nov-2020 18:53:57 READ of size 4 at 0x631000024838 thread T0
error 23-Nov-2020 18:53:57     #0 0x55f825998f57 in lde_imsg_compose_parent_sync ldpd/lde.c:226
error 23-Nov-2020 18:53:57     #1 0x55f8259ca9ed in vlog ldpd/log.c:48
error 23-Nov-2020 18:53:57     #2 0x55f8259cb1c8 in log_info ldpd/log.c:102
error 23-Nov-2020 18:53:57     #3 0x55f82599e841 in lde_shutdown ldpd/lde.c:208
error 23-Nov-2020 18:53:57     #4 0x55f8259a2703 in lde_dispatch_parent ldpd/lde.c:666
error 23-Nov-2020 18:53:57     #5 0x55f825ac3815 in thread_call lib/thread.c:1681
error 23-Nov-2020 18:53:57     #6 0x55f825998d5e in lde ldpd/lde.c:160
error 23-Nov-2020 18:53:57     #7 0x55f82598a289 in main ldpd/ldpd.c:320
error 23-Nov-2020 18:53:57     #8 0x7fe3f749db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
error 23-Nov-2020 18:53:57     #9 0x55f825982579 in _start (/usr/lib/frr/ldpd+0xb3579)
error 23-Nov-2020 18:53:57
error 23-Nov-2020 18:53:57 0x631000024838 is located 65592 bytes inside of 65632-byte region [0x631000014800,0x631000024860)
error 23-Nov-2020 18:53:57 freed by thread T0 here:
error 23-Nov-2020 18:53:57     #0 0x7fe3f8a4d7a8 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7a8)
error 23-Nov-2020 18:53:57     #1 0x55f82599e830 in lde_shutdown ldpd/lde.c:206
error 23-Nov-2020 18:53:57     #2 0x55f8259a2703 in lde_dispatch_parent ldpd/lde.c:666
error 23-Nov-2020 18:53:57     #3 0x55f825ac3815 in thread_call lib/thread.c:1681
error 23-Nov-2020 18:53:57     #4 0x55f825998d5e in lde ldpd/lde.c:160
error 23-Nov-2020 18:53:57     #5 0x55f82598a289 in main ldpd/ldpd.c:320
error 23-Nov-2020 18:53:57     #6 0x7fe3f749db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
error 23-Nov-2020 18:53:57
error 23-Nov-2020 18:53:57 previously allocated by thread T0 here:
error 23-Nov-2020 18:53:57     #0 0x7fe3f8a4dd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
error 23-Nov-2020 18:53:57     #1 0x55f825998cb7 in lde ldpd/lde.c:151
error 23-Nov-2020 18:53:57     #2 0x55f82598a289 in main ldpd/ldpd.c:320
error 23-Nov-2020 18:53:57     #3 0x7fe3f749db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
error 23-Nov-2020 18:53:57

The fix is to put this in global space.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7594 from ton31337/feature/show_pfxSnt_for_show_bgp_summary
Donald Sharp [Wed, 25 Nov 2020 12:02:13 +0000 (07:02 -0500)]
Merge pull request #7594 from ton31337/feature/show_pfxSnt_for_show_bgp_summary

bgpd: Show pfxSnt in JSON output for show bgp summary even if not established

3 years agoMerge pull request #7502 from AnuradhaKaruppiah/evpn-mh-irb
Patrick Ruddy [Wed, 25 Nov 2020 09:57:56 +0000 (09:57 +0000)]
Merge pull request #7502 from AnuradhaKaruppiah/evpn-mh-irb

evpn-mh: support for symmetric routing

3 years agotests: Add tests to bgp_multi_vrf_topo2
Kuldeep Kashyap [Mon, 23 Nov 2020 04:37:55 +0000 (04:37 +0000)]
tests: Add tests to bgp_multi_vrf_topo2

1. Added 4 test cases for frr/daemon restart(chaos testing)

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agobgpd: Show pfxSnt in JSON output for show bgp summary even if not established
Donatas Abraitis [Tue, 24 Nov 2020 08:22:01 +0000 (10:22 +0200)]
bgpd: Show pfxSnt in JSON output for show bgp summary even if not established

spine1-debian-9# show ip bgp summary json
{
"ipv4Unicast":{
  "routerId":"192.168.3.2",
  "as":200,
  "vrfId":0,
  "vrfName":"default",
  "tableVersion":4,
  "ribCount":1,
  "ribMemory":184,
  "peerCount":1,
  "peerMemory":23384,
  "peers":{
    "192.168.0.1":{
      "hostname":"exit1-debian-9",
      "remoteAs":100,
      "version":4,
      "msgRcvd":5,
      "msgSent":6,
      "tableVersion":0,
      "outq":0,
      "inq":0,
      "peerUptime":"00:00:09",
      "peerUptimeMsec":9000,
      "peerUptimeEstablishedEpoch":1606206209,
      "pfxRcd":0,
      "pfxSnt":0,
      "state":"Idle (Admin)",
      "connectionsEstablished":1,
      "connectionsDropped":1,
      "idType":"ipv4"
    }
  },
  "failedPeers":1,
  "totalPeers":1,
  "dynamicPeers":0,
  "bestPath":{
    "multiPathRelax":"false"
  }
}
}

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7591 from opensourcerouting/isisd-bug-fixes
Donald Sharp [Wed, 25 Nov 2020 01:59:50 +0000 (20:59 -0500)]
Merge pull request #7591 from opensourcerouting/isisd-bug-fixes

isisd: assorted bug fixes

3 years agoMerge pull request #7595 from ton31337/feature/bgpState_json
Donald Sharp [Wed, 25 Nov 2020 01:55:34 +0000 (20:55 -0500)]
Merge pull request #7595 from ton31337/feature/bgpState_json

bgpd: Add peerStatus for show bgp summary json

3 years agobgpd: enable L3NHG installation for EVPN host routes by default
Anuradha Karuppiah [Wed, 17 Jun 2020 18:43:58 +0000 (11:43 -0700)]
bgpd: enable L3NHG installation for EVPN host routes by default

L3NHG allows for fast failover of routed traffic (from remote-rack
to local-rack).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agobgpd: add a config knob to enable use of L3 NHG for EVPN host routes
Anuradha Karuppiah [Mon, 18 May 2020 22:55:39 +0000 (15:55 -0700)]
bgpd: add a config knob to enable use of L3 NHG for EVPN host routes

Sample config -
vtysh -c "conf t"  -c "router bgp <N>" -c "address-family l2vpn evpn" -c "use-es-l3nhg"

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agobgpd: Use L3NHGs for symmetric IRB host routes
Anuradha Karuppiah [Fri, 15 May 2020 23:33:41 +0000 (16:33 -0700)]
bgpd: Use L3NHGs for symmetric IRB host routes

Two L3 next groups are installed per-VRF per-ES for v4 and v6. These
NHGs are used as an indirect destination for symmetric IRB host routes.

Using L3NHGs allows for efficient failover of an ES (similar to the
use of L2NHGs) i.e. when an ES goes down the number of dataplane
updates are limited to 2xN (where N is the number of tenant VRFs
associated with the ES) instead of updating all host-routes behind the
ES.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: change the nhg format from hex to dec for easy match up with the dp
Anuradha Karuppiah [Tue, 19 May 2020 00:52:52 +0000 (17:52 -0700)]
zebra: change the nhg format from hex to dec for easy match up with the dp

Dataplane/kernel prints the NHG and NH ids as decimal. Zebra
was printing it as hex (to display type vs. val). This became a
debugging hassle hence normalizing the format.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agobgpd: commands to display L3 NHGs and MAC-IP paths linked to an ES
Anuradha Karuppiah [Sat, 9 May 2020 02:49:33 +0000 (19:49 -0700)]
bgpd: commands to display L3 NHGs and MAC-IP paths linked to an ES

Sample output -
===============
torm-11# sh bgp l2vpn evpn es-vrf
ES-VRF Flags: A Active
ESI                            VRF             Flags IPv4-NHG IPv6-NHG Ref
03:44:38:39:ff:ff:01:00:00:01  vrf3            A     1        0        2
03:44:38:39:ff:ff:01:00:00:01  vrf2            A     6        0        4
03:44:38:39:ff:ff:01:00:00:01  vrf1            A     7        0        4
03:44:38:39:ff:ff:01:00:00:02  vrf3            A     2        0        2
03:44:38:39:ff:ff:01:00:00:02  vrf2            A     4        0        4
03:44:38:39:ff:ff:01:00:00:02  vrf1            A     8        0        4

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agobgpd: use L3NHG while installing EVPN host routes in zebra
Anuradha Karuppiah [Sat, 9 May 2020 02:44:35 +0000 (19:44 -0700)]
bgpd: use L3NHG while installing EVPN host routes in zebra

Host routes imported into the VRF can have a destination ES (per-VRF)
which is set up as a L3NHG for efficient failover.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agobgpd: Handle ES VTEP add/del to a host route
Anuradha Karuppiah [Sat, 9 May 2020 02:36:47 +0000 (19:36 -0700)]
bgpd: Handle ES VTEP add/del to a host route

1. MAC-IP routes in the VPN routing table are linked to the
destination ES for efficient handling for remote ES link flaps.
2. Only MAC-IP paths whose nexthops are active (added via EAD-ES)
are imported into the VRF routing table.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agobgpd: L3NHG infrastructure for host routes in EVPN
Anuradha Karuppiah [Sat, 9 May 2020 02:24:56 +0000 (19:24 -0700)]
bgpd: L3NHG infrastructure for host routes in EVPN

ES-VRF entries are maintained for the purpose of L3-NHG creation -
1. Each ES-EVI entry is associated with a tenant VRF. This associaton
triggers the creation of an ES-VRF entry.
2. Type-2/MAC-IP routes are imported into a tenant VRF and programmed as
a /32 or host route entry in the dataplane. If the destination of
the host route is a remote-ES the route is programmed with the
corresponding (keyed in by {vrf,ES-id}) L3-NHG.
3. The reason for this indirection (route->L3-NHG, L3-NHG->list-of-VTEPs)
is to avoid route updates to the dplane when a remote-ES link flaps i.e.
instead of updating all the dependent routes the NHG's contents are
updated. This reduces the amount of dataplane updates (fewer nhg updates vs.
route updates) allowing for a faster failover.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agobgpd: skip VRF import of MAC-IP routes that belong to locally attached hosts
Anuradha Karuppiah [Sat, 9 May 2020 02:19:57 +0000 (19:19 -0700)]
bgpd: skip VRF import of MAC-IP routes that belong to locally attached hosts

Local attached hosts are routed via the access ports using the neigh and
fdb/MAC dplane entries.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: Keep DAD disabled if EVPN MH is turned on
Anuradha Karuppiah [Mon, 11 May 2020 01:02:37 +0000 (18:02 -0700)]
zebra: Keep DAD disabled if EVPN MH is turned on

DAD is not supported currently with EVPN-MH so we turn it off internally
when the first ES config is detected.

PS: Note that when all local ESs are deleted DAD will stay off and
will need to be cleared via a daemon restart.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agoMerge pull request #7475 from eololab/add-more-parameters-for-crosscompilation
Quentin Young [Tue, 24 Nov 2020 16:44:29 +0000 (11:44 -0500)]
Merge pull request #7475 from eololab/add-more-parameters-for-crosscompilation

build: add more precious variables for cross-compilation

3 years agoMerge pull request #7560 from opensourcerouting/fix_topotest_logs
Donald Sharp [Tue, 24 Nov 2020 16:30:14 +0000 (11:30 -0500)]
Merge pull request #7560 from opensourcerouting/fix_topotest_logs

topotests: Fix logging by redirecting it to correct file

3 years agoospfd: fix a couple of typos
ckishimo [Tue, 24 Nov 2020 15:35:49 +0000 (07:35 -0800)]
ospfd: fix a couple of typos

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agobgpd: Add peerState field into JSON output for show bgp summary
Donatas Abraitis [Tue, 24 Nov 2020 13:51:51 +0000 (15:51 +0200)]
bgpd: Add peerState field into JSON output for show bgp summary

vtysh -c 'show bgp summary json' | \
> jq '.ipv4Unicast.peers."192.168.0.2".peerState'
"Passive"

vtysh -c 'show bgp summary json' | \
> jq '.ipv4Unicast.peers."192.168.0.2".state'
"Established"

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoRevert "bgpd: identify passive connections in JSON summary"
Donatas Abraitis [Tue, 24 Nov 2020 13:32:35 +0000 (15:32 +0200)]
Revert "bgpd: identify passive connections in JSON summary"

This reverts commit 266ae3aa532d26d4e4ed2d1d1ca5887bb2ac882e.

3 years agoMerge pull request #7577 from donaldsharp/datacenter_stuff
Donatas Abraitis [Tue, 24 Nov 2020 08:02:39 +0000 (10:02 +0200)]
Merge pull request #7577 from donaldsharp/datacenter_stuff

Datacenter stuff

3 years agoMerge pull request #7592 from mjstapp/fix_restore_topo_scale
Donatas Abraitis [Tue, 24 Nov 2020 08:01:36 +0000 (10:01 +0200)]
Merge pull request #7592 from mjstapp/fix_restore_topo_scale

tests: restore route scale test to 1M routes

3 years agotests: restore route scale test to 1M routes
Mark Stapp [Mon, 23 Nov 2020 21:53:43 +0000 (16:53 -0500)]
tests: restore route scale test to 1M routes

Restore the scale topotest config to use 1M routes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7223 from idryzhov/fix-vtysh-view-node
Quentin Young [Mon, 23 Nov 2020 18:36:41 +0000 (13:36 -0500)]
Merge pull request #7223 from idryzhov/fix-vtysh-view-node

vtysh: fix execution of commands from the view node

3 years agoisisd, tests: fix bug when sending TI-LFA repair paths to zebra
Renato Westphal [Fri, 20 Nov 2020 03:54:41 +0000 (00:54 -0300)]
isisd, tests: fix bug when sending TI-LFA repair paths to zebra

Commit 4c75f7c7730220b fixed a bug in which the TI-LFA repair paths
weren't preserving the original Prefix-SID of the routes. That
commit, however, didn't update the zebra interface code to account
for backup nexthops that don't have a repair list but do have a
SR label. As a consequence, backup nexthops that didn't have any
repair label were not preserving the original Prefix-SID of the
corresponding routes. Fix this and update the TI-LFA topotest
accordingly.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: check vertex type before checking its data
Renato Westphal [Fri, 20 Nov 2020 22:26:45 +0000 (19:26 -0300)]
isisd: check vertex type before checking its data

vertex->N is an union whose "id" and "ip" fields are only valid
depending on the vertex type (IS adjacency or IP reachability
information). As such, add a vertex type check before consulting
vertex->N.id in order to prevent unexpected behavior from happening.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: fix some crashes with --tcli
Renato Westphal [Fri, 6 Nov 2020 13:02:16 +0000 (10:02 -0300)]
isisd: fix some crashes with --tcli

The "ifp" variable returned by nb_running_get_entry() might be
NULL when using the transactional CLI mode. Make the required
modifications to avoid null pointer dereferences.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: uninstall local routes that don't have any valid nexthop
Renato Westphal [Thu, 5 Nov 2020 12:40:26 +0000 (09:40 -0300)]
isisd: uninstall local routes that don't have any valid nexthop

Once the remote end of a connected link is shut down (or lose
its address), isisd will remove the corresponding route from its
RIB after SPF runs. A new route for the same destination should
be computed based on the local LSP, and that route by definition
doesn't have any nexthop.  The problem is that, when isisd tries
to replace the old route by the new one, it fails because routes
without nexthops can't be installed.  That causes the old invalid
route to remain in the RIB when it shouldn't. To fix this problem,
change the zebra interface code to uninstall a route whenever it
can't be installed (because it lacks nexthops) instead of doing
nothing in that case.

This change should fix occasional failures of the test_isis_sr_topo1
topotest.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoMerge pull request #7565 from vishaldhingra/bgp_nb
Donatas Abraitis [Sat, 21 Nov 2020 20:19:53 +0000 (22:19 +0200)]
Merge pull request #7565 from vishaldhingra/bgp_nb

bgpd: sh running config is not considering values provided via -e for max-paths

3 years agoMerge pull request #7580 from ckishimo/bit-Nt
Donald Sharp [Sat, 21 Nov 2020 16:36:01 +0000 (11:36 -0500)]
Merge pull request #7580 from ckishimo/bit-Nt

ospfd: fix NSSA translate-always

3 years agoMerge pull request #7581 from mboehn/master
Donald Sharp [Sat, 21 Nov 2020 16:33:28 +0000 (11:33 -0500)]
Merge pull request #7581 from mboehn/master

doc: add bpgd --listenon implies --no_kernel

3 years agodoc: add bpgd --listenon implies --no_kernel
Mathias Bøhn Grytemark [Sat, 21 Nov 2020 12:42:44 +0000 (13:42 +0100)]
doc: add bpgd --listenon implies --no_kernel

The bgpd --listenon option implies --no_kernel. This commit makes note
of that in the documentation.

Signed-off-by: Mathias Bøhn Grytemark <mathias@grytemark.no>
3 years agovtysh: fix node for "show yang operational-data"
Igor Ryzhov [Sat, 21 Nov 2020 12:06:04 +0000 (15:06 +0300)]
vtysh: fix node for "show yang operational-data"

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agovtysh: fix execution of commands from the view node
Igor Ryzhov [Thu, 1 Oct 2020 16:12:10 +0000 (19:12 +0300)]
vtysh: fix execution of commands from the view node

We should not prepend "do" when executing commands from the view node,
because view node doesn't support "do" shortcut.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: fix NSSA translate-always
ckishimo [Fri, 20 Nov 2020 21:53:20 +0000 (13:53 -0800)]
ospfd: fix NSSA translate-always

When an ABR NSSA router is configured to be ALWAYS the translator:
  r22(config-router)# area 1 nssa translate-always

It will advertise this condition in the type-1 LSA setting the Nt
bit, taking over the translator role from r33

  r22# show ip ospf
     We are an ABR and always an NSSA Translator.
  r33# show ip ospf
     We are an ABR, but not the NSSA Elected Translator.

However when the command above is removed:
  r22(config-router)# no area 1 nssa translate-always

the bit Nt needs to be cleared otherwise we end up with no translator
in the area
  r22# show ip ospf
     We are an ABR, but not the NSSA Elected Translator.
  r33# show ip ospf
     We are an ABR, but not the NSSA Elected Translator.

This PR forces the ABR to send a type-1 LSA with the Nt bit updated
according to the translator role

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agopimd: fix formatting in pim_cmd.c
Mark Stapp [Fri, 20 Nov 2020 21:06:34 +0000 (16:06 -0500)]
pimd: fix formatting in pim_cmd.c

Fix whitespace/indentation in pim_cmd.c

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agopimd: fix compilation errors in pim_cmd.c
Mark Stapp [Fri, 20 Nov 2020 20:45:32 +0000 (15:45 -0500)]
pimd: fix compilation errors in pim_cmd.c

Fix buffer sizes to eliminate compiliation warnings.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agopimd: remove duplicate block from subdir.am
Mark Stapp [Fri, 20 Nov 2020 20:37:11 +0000 (15:37 -0500)]
pimd: remove duplicate block from subdir.am

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7576 from donaldsharp/rpki_stuff
Mark Stapp [Fri, 20 Nov 2020 20:07:44 +0000 (15:07 -0500)]
Merge pull request #7576 from donaldsharp/rpki_stuff

bgpd: Cleanup rpki indentation

3 years agobgpd: Remove restriction on certain connection types under HAVE_CUMULUS
Donald Sharp [Fri, 20 Nov 2020 13:00:08 +0000 (08:00 -0500)]
bgpd: Remove restriction on certain connection types under HAVE_CUMULUS

Current code when we are establishing a peering relationship when
under the HAVE_CUMULUS block will dissallow v4/v6 connections if
we do not have v4/v6 addresses applied.  This restriction is
a bit harsh and should be allowed but warned against.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agovtysh: Start deprecation cycle for `address-family evpn`
Donald Sharp [Fri, 20 Nov 2020 01:46:55 +0000 (20:46 -0500)]
vtysh: Start deprecation cycle for `address-family evpn`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7574 from idryzhov/fix-quit
Donald Sharp [Fri, 20 Nov 2020 18:00:56 +0000 (13:00 -0500)]
Merge pull request #7574 from idryzhov/fix-quit

vtysh: send quit command to watchfrr

3 years agoMerge pull request #7551 from mjstapp/fix_doc_no_index
Quentin Young [Fri, 20 Nov 2020 17:15:31 +0000 (12:15 -0500)]
Merge pull request #7551 from mjstapp/fix_doc_no_index

doc: don't index 'no' forms of commands

3 years agotopotests: Fix logging by redirecting it to correct file
Martin Winter [Thu, 19 Nov 2020 01:45:24 +0000 (02:45 +0100)]
topotests: Fix logging by redirecting it to correct file

Fix lib to start loggin to correct daemon file on startup
Fix bgp-auth tests for the logging changes
Fixes Issue # 7545

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agovtysh: send quit command to watchfrr
Igor Ryzhov [Fri, 20 Nov 2020 14:42:39 +0000 (17:42 +0300)]
vtysh: send quit command to watchfrr

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: Cleanup rpki indentation
Donald Sharp [Fri, 20 Nov 2020 13:44:25 +0000 (08:44 -0500)]
bgpd: Cleanup rpki indentation

Rework a couple functions to allow the indentation to be a bit
cleaner.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7569 from patrasar/pim_coverity_fix
Donald Sharp [Fri, 20 Nov 2020 12:40:06 +0000 (07:40 -0500)]
Merge pull request #7569 from patrasar/pim_coverity_fix

pimd: Fix SA issues found in Coverity Scan

3 years agobgpd: sh running config is not considering values provided via -e for max-paths
vdhingra [Thu, 19 Nov 2020 12:46:39 +0000 (04:46 -0800)]
bgpd: sh running config is not considering values provided via -e for max-paths

problem
1. run the bgp with -e1 option
2. c t
   router bgp 100
3. show running config
    !
     address-family ipv6 multicast
      maximum-paths 1
      maximum-paths ibgp 1
     exit-address-family
    !
address families should not dump maximum-paths if there
value is same as value provided at run time.

fix
if the maxpaths_ebgp value is same as multipath_num global
object, don't dump maximum-paths.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
3 years agopimd: Fix SA issues found in Coverity Scan
Sarita Patra [Fri, 20 Nov 2020 08:01:19 +0000 (00:01 -0800)]
pimd: Fix SA issues found in Coverity Scan

Signed-off-by: Sarita Patra <saritap@vmware.com>
3 years agoMerge pull request #7562 from donaldsharp/python_fixes
Donatas Abraitis [Fri, 20 Nov 2020 07:37:58 +0000 (09:37 +0200)]
Merge pull request #7562 from donaldsharp/python_fixes

tests: Fix common_config.py issues

3 years agoMerge pull request #7559 from ckishimo/translator
Donald Sharp [Fri, 20 Nov 2020 00:33:59 +0000 (19:33 -0500)]
Merge pull request #7559 from ckishimo/translator

ospfd: fix NSSA translator

3 years agoMerge pull request #7546 from mjstapp/limit_fds
Donald Sharp [Fri, 20 Nov 2020 00:28:57 +0000 (19:28 -0500)]
Merge pull request #7546 from mjstapp/limit_fds

lib: add startup-time option to limit fds used

3 years agoMerge pull request #7568 from idryzhov/fix-naming
Donald Sharp [Fri, 20 Nov 2020 00:25:56 +0000 (19:25 -0500)]
Merge pull request #7568 from idryzhov/fix-naming

lib: fix local variable shadowing global one

3 years agoMerge pull request #7544 from andylemin/master
Donald Sharp [Fri, 20 Nov 2020 00:24:42 +0000 (19:24 -0500)]
Merge pull request #7544 from andylemin/master

bgpd: added bmp read check to detect broken sessions

3 years agoMerge pull request #7564 from pguibert6WIND/fix_typo_topotest
Donald Sharp [Thu, 19 Nov 2020 23:36:48 +0000 (18:36 -0500)]
Merge pull request #7564 from pguibert6WIND/fix_typo_topotest

doc: topotest json typo error