]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 years agoMerge pull request #10226 from bisdn/jogo_fix_support_bundle_backup
Donald Sharp [Thu, 6 Jan 2022 13:17:12 +0000 (08:17 -0500)]
Merge pull request #10226 from bisdn/jogo_fix_support_bundle_backup

tools: fix backing up previous logs in generate_support_bundle.py

2 years agoMerge pull request #10284 from ton31337/fix/adjust_rfc4486
Donald Sharp [Thu, 6 Jan 2022 12:49:00 +0000 (07:49 -0500)]
Merge pull request #10284 from ton31337/fix/adjust_rfc4486

bgpd: Adjust symbolic names for cease notifications according to rfc4486

2 years agoMerge pull request #10287 from ton31337/fix/rfc7196
Donald Sharp [Thu, 6 Jan 2022 12:34:45 +0000 (07:34 -0500)]
Merge pull request #10287 from ton31337/fix/rfc7196

bgpd: Increase maximum supress threshold for dampening to 50,000

2 years agoMerge pull request #10296 from anlancs/fix-doc-version
Donald Sharp [Thu, 6 Jan 2022 12:26:28 +0000 (07:26 -0500)]
Merge pull request #10296 from anlancs/fix-doc-version

doc: minor grammar correction

2 years agoMerge pull request #10297 from ton31337/fix/gr_can_be_0
Donald Sharp [Thu, 6 Jan 2022 12:26:03 +0000 (07:26 -0500)]
Merge pull request #10297 from ton31337/fix/gr_can_be_0

bgpd: Graceful Restart restart-time can be 0

2 years agobgpd: Graceful Restart restart-time can be 0
Donatas Abraitis [Thu, 6 Jan 2022 09:24:48 +0000 (11:24 +0200)]
bgpd: Graceful Restart restart-time can be 0

Using with LLGR, this should be allowed setting GR restart-time timer to 0,
to immediately start LLGR timers.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agodoc: minor grammar correction
anlan_cs [Thu, 6 Jan 2022 08:28:27 +0000 (03:28 -0500)]
doc: minor grammar correction

Need one empty line.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2 years agoMerge pull request #10291 from mjstapp/fix_topo_doc_reqs
Donatas Abraitis [Thu, 6 Jan 2022 08:14:32 +0000 (10:14 +0200)]
Merge pull request #10291 from mjstapp/fix_topo_doc_reqs

docs: clarify topotest requirements

2 years agobgpd: Increase maximum supress threshold for dampening to 50,000
Donatas Abraitis [Wed, 5 Jan 2022 09:30:38 +0000 (11:30 +0200)]
bgpd: Increase maximum supress threshold for dampening to 50,000

rfc7196 recommends:

In addition, BGP implementations have an internal constant, which we
   will call the 'maximum penalty', and the current computed penalty may
   not exceed it.

Router Maximum Penalty:  The internal constant for the maximum
      penalty value MUST be raised to at least 50,000.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Adjust symbolic names for cease notifications according to rfc4486
Donatas Abraitis [Wed, 5 Jan 2022 07:39:44 +0000 (09:39 +0200)]
bgpd: Adjust symbolic names for cease notifications according to rfc4486

The following subcodes are defined for the Cease NOTIFICATION
   message:

      Subcode     Symbolic Name

         1        Maximum Number of Prefixes Reached
         2        Administrative Shutdown
         3        Peer De-configured
         4        Administrative Reset
         5        Connection Rejected
         6        Other Configuration Change
         7        Connection Collision Resolution
         8        Out of Resources

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #10294 from opensourcerouting/topotests-nhrp-require-5.0
Christian Hopps [Thu, 6 Jan 2022 03:25:07 +0000 (22:25 -0500)]
Merge pull request #10294 from opensourcerouting/topotests-nhrp-require-5.0

topotests: require Linux 5.0 for NHRP

2 years agotopotests: require Linux 5.0 for NHRP
David Lamparter [Wed, 5 Jan 2022 19:59:38 +0000 (20:59 +0100)]
topotests: require Linux 5.0 for NHRP

It fails on 4.19, so let's go minimum 5.0 for the time being.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agodocs: clarify topotest requirements
Mark Stapp [Wed, 5 Jan 2022 15:27:17 +0000 (10:27 -0500)]
docs: clarify topotest requirements

The developer docs weren't clear about some pre-reqs.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agoMerge pull request #10208 from adrianomarto/master
Russ White [Wed, 5 Jan 2022 15:10:23 +0000 (10:10 -0500)]
Merge pull request #10208 from adrianomarto/master

Babel configuration parameter fixes

2 years agoMerge pull request #10260 from ton31337/feature/bgp_llgr_helper_mode
Russ White [Wed, 5 Jan 2022 15:08:31 +0000 (10:08 -0500)]
Merge pull request #10260 from ton31337/feature/bgp_llgr_helper_mode

bgpd: Implement LLGR helper mode

2 years agoMerge pull request #10274 from anlancs/fix-spell-error-bfd
Donald Sharp [Sun, 2 Jan 2022 22:57:46 +0000 (17:57 -0500)]
Merge pull request #10274 from anlancs/fix-spell-error-bfd

bfdd: correct one spelling error of comment

2 years agobfdd: correct one spelling error of comment
anlan_cs [Fri, 31 Dec 2021 10:30:52 +0000 (05:30 -0500)]
bfdd: correct one spelling error of comment

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2 years agoMerge pull request #10219 from donaldsharp/l3vpn_to_bgp_vrf_fixes
Russ White [Thu, 30 Dec 2021 23:42:21 +0000 (18:42 -0500)]
Merge pull request #10219 from donaldsharp/l3vpn_to_bgp_vrf_fixes

tests: Further fix bgp_l3vpn_to_bgp_vrf

2 years agotests: Add basic BGP Long-lived Graceful restart tests
Donatas Abraitis [Tue, 28 Dec 2021 10:23:26 +0000 (12:23 +0200)]
tests: Add basic BGP Long-lived Graceful restart tests

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Change default long-lived graceful restart stale timer to 0 seconds
Donatas Abraitis [Thu, 23 Dec 2021 12:23:48 +0000 (14:23 +0200)]
bgpd: Change default long-lived graceful restart stale timer to 0 seconds

That means the feature is off by default.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Implement LLGR helper mode
Donatas Abraitis [Mon, 20 Dec 2021 21:03:09 +0000 (23:03 +0200)]
bgpd: Implement LLGR helper mode

Tested between GoBGP and FRR (this commit).

```
┌───────────┐             ┌────────────┐
│           │             │            │
│ GoBGPD    │             │ FRRouting  │
│ (restart) │             │            │
│           │             │            │
└──────┬────┘             └───────┬────┘
       │                          │
       │                          │
       │                          │
       │     ┌───────────┐        │
       │     │           │        │
       │     │           │        │
       └─────┤ FRRouting ├────────┘
             │ (helper)  │
             │           │
             └───────────┘

// GoBGPD
% cat /etc/gobgp/config.toml
[global.config]
    as = 65002
    router-id = "2.2.2.2"
    port = 179

[[neighbors]]
    [neighbors.config]
        peer-as = 65001
        neighbor-address = "2a02:abc::123"
    [neighbors.graceful-restart.config]
        enabled = true
        restart-time = 3
        long-lived-enabled = true
    [[neighbors.afi-safis]]
        [neighbors.afi-safis.config]
            afi-safi-name = "ipv6-unicast"
        [neighbors.afi-safis.mp-graceful-restart.config]
            enabled = true
        [neighbors.afi-safis.long-lived-graceful-restart.config]
            enabled = true
            restart-time = 10
    [[neighbors.afi-safis]]
        [neighbors.afi-safis.config]
            afi-safi-name = "ipv4-unicast"
        [neighbors.afi-safis.mp-graceful-restart.config]
            enabled = true
        [neighbors.afi-safis.long-lived-graceful-restart.config]
            enabled = true
            restart-time = 20

% ./gobgp global rib add -a ipv6 2001:db8:4::/64
% ./gobgp global rib add -a ipv6 2001:db8:5::/64 community 65535:7
% ./gobgp global rib add -a ipv4 100.100.100.100/32
% ./gobgp global rib add -a ipv4 100.100.100.200/32 community 65535:7
```

1. When killing GoBGPD, graceful restart timer starts in FRR helper router;
2. When GR timer expires in helper router:
   a) LLGR_STALE community is attached to routes to be retained;
   b) Clear stale routes that have NO_LLGR community attached;
   c) Start LLGR timer per AFI/SAFI;
   d) Recompute bestpath and reannounce routes to peers;
   d) When LLGR timer expires, clear all routes on particular AFI/SAFI.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #10254 from ton31337/fix/typo
Donald Sharp [Mon, 27 Dec 2021 13:21:49 +0000 (08:21 -0500)]
Merge pull request #10254 from ton31337/fix/typo

bgpd: Fix typo in bgp_aggr_community_hash_alloc()

2 years agoMerge pull request #10261 from ton31337/fix/remove_if0
Igor Ryzhov [Thu, 23 Dec 2021 22:09:41 +0000 (01:09 +0300)]
Merge pull request #10261 from ton31337/fix/remove_if0

2 years agoMerge pull request #10259 from anlancs/add-assert-ospf6
Donatas Abraitis [Thu, 23 Dec 2021 12:50:47 +0000 (14:50 +0200)]
Merge pull request #10259 from anlancs/add-assert-ospf6

ospf6d: clean coverity warning of possible null pointer

2 years agobgpd: Drop `if 0` blocks
Donatas Abraitis [Thu, 23 Dec 2021 12:41:11 +0000 (14:41 +0200)]
bgpd: Drop `if 0` blocks

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #10256 from anlancs/cleanup-zebra_evpn_mac_add
Igor Ryzhov [Thu, 23 Dec 2021 10:10:18 +0000 (13:10 +0300)]
Merge pull request #10256 from anlancs/cleanup-zebra_evpn_mac_add

zebra: cleanup checking zebra_evpn_mac_add function's return value

2 years agoospf6d: clean coverity warning of possible null pointer
anlan_cs [Thu, 23 Dec 2021 02:51:55 +0000 (21:51 -0500)]
ospf6d: clean coverity warning of possible null pointer

Add assert to protect it.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2 years agozebra: cleanup checking zebra_evpn_mac_add function's return value
anlan_cs [Wed, 22 Dec 2021 01:03:36 +0000 (20:03 -0500)]
zebra: cleanup checking zebra_evpn_mac_add function's return value

This function is sure to return correct value by "assert", so the
checking its return value should be removed.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2 years agodoc: Minor grammar correction
Adriano Marto Reis [Tue, 7 Dec 2021 08:20:03 +0000 (18:20 +1000)]
doc: Minor grammar correction

No comma needed.

Signed-off-by: "Adriano Marto Reis" <adrianomarto@gmail.com>
2 years agobabeld: C-style comments
Adriano Marto Reis [Tue, 7 Dec 2021 08:18:33 +0000 (18:18 +1000)]
babeld: C-style comments

Replacing C++-style comments with C-style comments.

Signed-off-by: "Adriano Marto Reis" <adrianomarto@gmail.com>
2 years agodoc: Updating babel default configuration parameters
Adriano Marto Reis [Sun, 5 Dec 2021 23:41:25 +0000 (09:41 +1000)]
doc: Updating babel default configuration parameters

Updating babel default configuration parameters rtt-min and
max-rtt-penalty according to the actual implementation.

Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
2 years agobabeld: Presenting interface configuration parameters
Adriano Marto Reis [Sun, 5 Dec 2021 23:37:51 +0000 (09:37 +1000)]
babeld: Presenting interface configuration parameters

* Presenting the configuration parameters enable-timestamps,
max-rtt-penalty, rtt-min, and rtt-max.
* Using #defines for the default configuration values instead of magic
numbers.
* rtt-max and rtt-min are entered and presented in milliseconds, but
stored and internally used in microseconds.

Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
2 years agoMerge pull request #8494 from donaldsharp/wfi_failures
Donatas Abraitis [Wed, 22 Dec 2021 07:53:44 +0000 (09:53 +0200)]
Merge pull request #8494 from donaldsharp/wfi_failures

bgpd, tests: Add code to handle failed installations

2 years agoMerge pull request #10255 from qlyoung/fix-ldpd-doc-option-typo
Igor Ryzhov [Wed, 22 Dec 2021 04:49:47 +0000 (07:49 +0300)]
Merge pull request #10255 from qlyoung/fix-ldpd-doc-option-typo

2 years agodoc: fix typo in ldpd docs
Quentin Young [Tue, 21 Dec 2021 22:04:11 +0000 (17:04 -0500)]
doc: fix typo in ldpd docs

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agobgpd: Fix typo in bgp_aggr_community_hash_alloc()
Donatas Abraitis [Tue, 21 Dec 2021 19:18:17 +0000 (21:18 +0200)]
bgpd: Fix typo in bgp_aggr_community_hash_alloc()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #10216 from opensourcerouting/lib-assorted-20211214
Quentin Young [Tue, 21 Dec 2021 16:18:08 +0000 (11:18 -0500)]
Merge pull request #10216 from opensourcerouting/lib-assorted-20211214

2 years agoMerge pull request #10228 from opensourcerouting/bgp-agg-aspath
Igor Ryzhov [Tue, 21 Dec 2021 16:14:19 +0000 (19:14 +0300)]
Merge pull request #10228 from opensourcerouting/bgp-agg-aspath

bgpd: fix aggregate route AS Path attribute

2 years agoMerge pull request #9750 from mjstapp/zebra_installed_nhg_id
Lou Berger [Tue, 21 Dec 2021 15:31:04 +0000 (10:31 -0500)]
Merge pull request #9750 from mjstapp/zebra_installed_nhg_id

zebra: add installed nexthop-group id value

2 years agoMerge pull request #10182 from mjstapp/fix_clang_break_opers
Igor Ryzhov [Tue, 21 Dec 2021 15:23:00 +0000 (18:23 +0300)]
Merge pull request #10182 from mjstapp/fix_clang_break_opers

tools: clang-format break after operators

2 years agobgpd: fix aggregate route AS Path attribute
Rafael Zalamena [Mon, 13 Dec 2021 20:21:56 +0000 (17:21 -0300)]
bgpd: fix aggregate route AS Path attribute

Always free the locally allocated attribute not the one we are using for
return. This fixes a memory leak and a crash when AS Path is set with
route-map.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2 years agoMerge pull request #10098 from opensourcerouting/ospf-gr-topotest-fix
Donald Sharp [Tue, 21 Dec 2021 13:43:32 +0000 (08:43 -0500)]
Merge pull request #10098 from opensourcerouting/ospf-gr-topotest-fix

ospfd: fix incorrect detection of topology changes in helper mode

2 years agoMerge pull request #10250 from ton31337/fix/no_need_to_test_for_BGP_TIMER_OFF
Igor Ryzhov [Tue, 21 Dec 2021 11:16:53 +0000 (14:16 +0300)]
Merge pull request #10250 from ton31337/fix/no_need_to_test_for_BGP_TIMER_OFF

bgpd: No need to test if a thread is running for BGP_TIMER_OFF

2 years agobgpd: No need to test if a thread is running for BGP_TIMER_OFF
Donatas Abraitis [Tue, 21 Dec 2021 08:57:07 +0000 (10:57 +0200)]
bgpd: No need to test if a thread is running for BGP_TIMER_OFF

Handles that inside the macro.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #10245 from anlancs/fix-spell-error
Donatas Abraitis [Mon, 20 Dec 2021 13:14:53 +0000 (15:14 +0200)]
Merge pull request #10245 from anlancs/fix-spell-error

zebra: correct one spell error

2 years agoMerge pull request #10181 from ton31337/fix/default-originate_route-map
Igor Ryzhov [Mon, 20 Dec 2021 13:13:07 +0000 (16:13 +0300)]
Merge pull request #10181 from ton31337/fix/default-originate_route-map

doc: Add `default-originate route-map WORD` for bgpd

2 years agoMerge pull request #10236 from ffontaine/master
Igor Ryzhov [Mon, 20 Dec 2021 13:12:03 +0000 (16:12 +0300)]
Merge pull request #10236 from ffontaine/master

configure.ac: fix enable_bmp typo

2 years agozebra: correct one spell error
anlan_cs [Mon, 20 Dec 2021 01:46:58 +0000 (20:46 -0500)]
zebra: correct one spell error

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2 years agoMerge pull request #10243 from Drumato/pathd-fix-typo
Donald Sharp [Mon, 20 Dec 2021 01:14:56 +0000 (20:14 -0500)]
Merge pull request #10243 from Drumato/pathd-fix-typo

pathd: fix typo in pathd/path_ted.c

2 years agopathd: fix typo in pathd/path_ted.c
Yamato Sugawara [Sun, 19 Dec 2021 11:25:15 +0000 (11:25 +0000)]
pathd: fix typo in pathd/path_ted.c

Signed-off-by: Yamato Sugawara <yamato.sugawara@linecorp.com>
2 years agobgpd, tests: Add code to handle failed installations
Donald Sharp [Fri, 16 Apr 2021 15:34:30 +0000 (11:34 -0400)]
bgpd, tests: Add code to handle failed installations

Currently the Wait for Install code ( bgp_suppress_fib ) does
not properly handle two states from zebra:  ROUTE_INSTALL_FAILED
and BETTER_ADMIN_DISTANCE_WON.  Pre this change the WFI code
would just never notify our peers about a route install failure
but more is needed.  In the ROUTE_INSTALL_FAILED and the
BETTER_ADMIN_DISTANCE_WON we need to notify our peers with
a withdrawal about the route, else we will continue to
draw traffic to us when we cannot legally do so.

Why is this needed?  In either case imagine that we've already
received a bgp route, installed it and sent to our peers.
In the Better admin distance won case, say a static route is installed
at this point in time we must stop advertising the route through
us since we are not installed.  As such a withdrawal must be sent.

In the ROUTE_INSTALL_FAILED case, the code was not properly handling
the situation where we have Route A, it was successfully installed
and then we received a update to Route A that was attempted to be
installed but failed.  In this case we also need to send a withdrawal

Finally update the bgp_suppress_fib topotest to test both of these
situations.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoconfigure.ac: fix enable_bmp typo
Fabrice Fontaine [Thu, 16 Dec 2021 19:10:26 +0000 (20:10 +0100)]
configure.ac: fix enable_bmp typo

enable_bmp doesn't exist, use enable_bgp_bmp

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2 years agoMerge pull request #10213 from idryzhov/isis-adj-uaf
Donatas Abraitis [Thu, 16 Dec 2021 14:41:11 +0000 (16:41 +0200)]
Merge pull request #10213 from idryzhov/isis-adj-uaf

isisd: fix use after free

2 years agoMerge pull request #10215 from FRRouting/revert-10164-name_change
Stephen Worley [Wed, 15 Dec 2021 22:40:53 +0000 (17:40 -0500)]
Merge pull request #10215 from FRRouting/revert-10164-name_change

Revert "pimd: Modifying members of pim_interface to accommodate IPv6 changes"

2 years agoMerge pull request #10224 from ffontaine/master
David Lamparter [Wed, 15 Dec 2021 22:32:06 +0000 (23:32 +0100)]
Merge pull request #10224 from ffontaine/master

2 years agoconfigure.ac: drop --enable-pcep option and HAVE_PATHD_PCEP
Fabrice Fontaine [Wed, 15 Dec 2021 08:08:28 +0000 (09:08 +0100)]
configure.ac: drop --enable-pcep option and HAVE_PATHD_PCEP

Drop --enable-pcep option and HAVE_PATHD_PCEP which does nothing since
https://github.com/FRRouting/frr/commit/749714731ee9a59ae39be77e7db3915ce3ad0bd8

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2 years agotools: fix backing up previous logs in generate_support_bundle.py
Jonas Gorski [Wed, 15 Dec 2021 09:33:33 +0000 (10:33 +0100)]
tools: fix backing up previous logs in generate_support_bundle.py

subprocess.check_call needs to be called with shell=True, else it will
interpret the string as a single path to execute instead of a command
with arguments:

Fixes the following error:

$ /usr/lib/frr/generate_support_bundle.py
Making backup of /var/log/frr/bgp_support_bundle.log
Traceback (most recent call last):
  File "/usr/lib/frr/generate_support_bundle.py", line 89, in <module>
    main()
  File "/usr/lib/frr/generate_support_bundle.py", line 80, in main
    stdout=open_with_backup(ofn),
  File "/usr/lib/frr/generate_support_bundle.py", line 32, in open_with_backup
    subprocess.check_call("mv {0} {0}.prev".format(path))
  File "/usr/lib/python3.8/subprocess.py", line 359, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 340, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'mv /var/log/frr/bgp_support_bundle.log /var/log/frr/bgp_support_bundle.log.prev'

Fixes: 5417cc2de ("tests: collect support bundle data in parallel, fix bugs")
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
2 years agoMerge pull request #10211 from idryzhov/doc-pathd-warning
Donald Sharp [Tue, 14 Dec 2021 23:25:21 +0000 (18:25 -0500)]
Merge pull request #10211 from idryzhov/doc-pathd-warning

doc: fix undefined label warning

2 years agolib: default VRF may not exist on early exit
David Lamparter [Thu, 11 Nov 2021 16:23:55 +0000 (17:23 +0100)]
lib: default VRF may not exist on early exit

If we're exiting before we finished initializing, we can end up trying
to shut down a NULL vrf here.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: shuffle around command line options
David Lamparter [Thu, 11 Nov 2021 16:22:59 +0000 (17:22 +0100)]
lib: shuffle around command line options

New `FRR_NO_SPLIT_CONFIG` flag for newly added daemons where we're just
rolling without split config and always expect configs to be loaded via
vtysh/integrated config.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #10167 from mobash-rasool/pim-upst-1
David Lamparter [Tue, 14 Dec 2021 16:54:22 +0000 (17:54 +0100)]
Merge pull request #10167 from mobash-rasool/pim-upst-1

2 years agoMerge pull request #10168 from SaiGomathiN/struct-change
David Lamparter [Tue, 14 Dec 2021 16:53:59 +0000 (17:53 +0100)]
Merge pull request #10168 from SaiGomathiN/struct-change

2 years agoRevert "pimd: Modifying members of pim_interface to accommodate IPv6 changes"
David Lamparter [Tue, 14 Dec 2021 16:33:24 +0000 (17:33 +0100)]
Revert "pimd: Modifying members of pim_interface to accommodate IPv6 changes"

2 years agoMerge pull request #10214 from opensourcerouting/fix_bgp_orf
Russ White [Tue, 14 Dec 2021 15:54:12 +0000 (10:54 -0500)]
Merge pull request #10214 from opensourcerouting/fix_bgp_orf

bgpd: fix BGP ORF Prefix-length matching

2 years agobgpd: fix BGP ORF Prefix-length matching
Martin Winter [Tue, 14 Dec 2021 13:53:53 +0000 (14:53 +0100)]
bgpd: fix BGP ORF Prefix-length matching

BGP ORF Prefix list incorrectly rejected list with a GE or LE to match the actual
prefix.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2 years agoisisd: fix use after free
Igor Ryzhov [Tue, 14 Dec 2021 13:28:08 +0000 (16:28 +0300)]
isisd: fix use after free

Pointers to the adjacency must be cleared only when the adjacency is
deleted. Otherwise, when the ISIS router is deleted later, the adjacency
is not deleted and a crash happens because of UAF.

Fixes #10209.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agotests: Further fix bgp_l3vpn_to_bgp_vrf
Donald Sharp [Tue, 14 Dec 2021 12:29:41 +0000 (07:29 -0500)]
tests: Further fix bgp_l3vpn_to_bgp_vrf

There still existed chances that best path consideration
has not taken place for both bgp_l3vpn_to_bgp_vrf and
bgp_instance_del_test ( since they both used the same
check_routes.py scripting ).  Add some more checks
to ensure that we have all the data.  Prior to this
change I could see one of these two tests failing
every 2-3 runs on my test system.  I am not seeing
this anymore after ~5 complete test runs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agodoc: fix undefined label warning
Igor Ryzhov [Tue, 14 Dec 2021 09:31:19 +0000 (12:31 +0300)]
doc: fix undefined label warning

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #9472 from rampxxxx/pathd_doc_augmented
Donatas Abraitis [Tue, 14 Dec 2021 07:16:11 +0000 (09:16 +0200)]
Merge pull request #9472 from rampxxxx/pathd_doc_augmented

doc: Augmented pathd documentation.

2 years agoMerge pull request #9899 from Drumato/zebra-srv6-locator-detail-json-support
Donatas Abraitis [Tue, 14 Dec 2021 07:11:36 +0000 (09:11 +0200)]
Merge pull request #9899 from Drumato/zebra-srv6-locator-detail-json-support

zebra: Add support for json output in srv6 locator detail command

2 years agoMerge pull request #9937 from Jafaral/rel-script
Quentin Young [Mon, 13 Dec 2021 17:26:22 +0000 (12:26 -0500)]
Merge pull request #9937 from Jafaral/rel-script

2 years agoMerge pull request #10201 from donaldsharp/ospf_lan_fixup
Russ White [Mon, 13 Dec 2021 14:45:42 +0000 (09:45 -0500)]
Merge pull request #10201 from donaldsharp/ospf_lan_fixup

tests: test_ospf_lan.py is looking for a certain order enforce it

2 years agotests: test_ospf_lan.py is looking for a certain order enforce it
Donald Sharp [Sat, 11 Dec 2021 17:05:36 +0000 (12:05 -0500)]
tests: test_ospf_lan.py is looking for a certain order enforce it

OSPF when converging will choose a DR / Backup DR based upon
who has already come up.  Irrelevant of priority.  As such if
under system load OSPF comes up first and elects a DR that under
normal circumstances not be the elected one due to priority
OSPF does not go back through and re-elect to keep the system
stable in this case.  Tests are experiencing this:

unet> r0 show ip ospf neigh

Neighbor ID     Pri State           Up Time         Dead Time Address         Interface                        RXmtL RqstL DBsmL
100.1.1.1        99 Full/Backup     4m14s              3.780s 10.0.1.2        r0-s1-eth0:10.0.1.1                  0     0     0
100.1.1.2         0 Full/DROther    4m14s              3.848s 10.0.1.3        r0-s1-eth0:10.0.1.1                  0     0     0
100.1.1.3         0 Full/DROther    4m14s              3.912s 10.0.1.4        r0-s1-eth0:10.0.1.1                  0     0     0

unet> r1 show ip ospf neigh

Neighbor ID     Pri State           Up Time         Dead Time Address         Interface                        RXmtL RqstL DBsmL
100.1.1.0        98 Full/DR         4m15s              3.011s 10.0.1.1        r1-s1-eth1:10.0.1.2                  0     0     0
100.1.1.2         0 Full/DROther    4m19s              3.124s 10.0.1.3        r1-s1-eth1:10.0.1.2                  0     0     0
100.1.1.3         0 Full/DROther    4m19s              3.188s 10.0.1.4        r1-s1-eth1:10.0.1.2                  0     0     0

unet> r2 show ip ospf neigh

Neighbor ID     Pri State           Up Time         Dead Time Address         Interface                        RXmtL RqstL DBsmL
100.1.1.0        98 Full/DR         4m27s              3.483s 10.0.1.1        r2-s1-eth0:10.0.1.3                  0     0     0
100.1.1.1        99 Full/Backup     4m32s              3.527s 10.0.1.2        r2-s1-eth0:10.0.1.3                  0     0     0
100.1.1.3         0 2-Way/DROther   4m32s              3.660s 10.0.1.4        r2-s1-eth0:10.0.1.3                  0     0     0

unet> r3 show ip ospf neigh

Neighbor ID     Pri State           Up Time         Dead Time Address         Interface                        RXmtL RqstL DBsmL
100.1.1.0        98 Full/DR         4m55s              3.786s 10.0.1.1        r3-s1-eth1:10.0.1.4                  0     0     0
100.1.1.1        99 Full/Backup     4m55s              3.829s 10.0.1.2        r3-s1-eth1:10.0.1.4                  0     0     0
100.1.1.2         0 2-Way/DROther   4m54s              3.897s 10.0.1.3        r3-s1-eth1:10.0.1.4                  0     0     0

Modify the test to do a clear to enforce the order we are specifically looking for.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10148 from sworleys/NHG-ID-Dump
Donatas Abraitis [Wed, 8 Dec 2021 07:52:06 +0000 (09:52 +0200)]
Merge pull request #10148 from sworleys/NHG-ID-Dump

zebra: add optional NHG ID output to `show ip ro`

2 years agoMerge pull request #10186 from idryzhov/bfd-receive-timer-cb
Mark Stapp [Tue, 7 Dec 2021 17:21:40 +0000 (12:21 -0500)]
Merge pull request #10186 from idryzhov/bfd-receive-timer-cb

bfdd: remove unnecessary receive timer restart

2 years agoMerge pull request #10187 from chiragshah6/freload
Russ White [Tue, 7 Dec 2021 16:40:36 +0000 (11:40 -0500)]
Merge pull request #10187 from chiragshah6/freload

tools: exit when reload fails to parse config file

2 years agoMerge pull request #10135 from donaldsharp/ripng_faster_timers
Russ White [Tue, 7 Dec 2021 11:41:45 +0000 (06:41 -0500)]
Merge pull request #10135 from donaldsharp/ripng_faster_timers

tests: Allow ripng_topo1 to converge a bit faster

2 years agoMerge pull request #10081 from ckishimo/ospf6d_type4
Russ White [Tue, 7 Dec 2021 11:39:00 +0000 (06:39 -0500)]
Merge pull request #10081 from ckishimo/ospf6d_type4

ospf6d: do not originate Type-4 lsa when NSSA

2 years agoMerge pull request #10120 from idryzhov/bfd-detect-to
Russ White [Tue, 7 Dec 2021 11:38:15 +0000 (06:38 -0500)]
Merge pull request #10120 from idryzhov/bfd-detect-to

bfdd: fix detection timeout update

2 years agoMerge pull request #10039 from chiragshah6/mdev
Russ White [Tue, 7 Dec 2021 11:05:37 +0000 (06:05 -0500)]
Merge pull request #10039 from chiragshah6/mdev

frr-reload: fix bgp nbr remote-as rendering

2 years agoMerge pull request #10177 from qlyoung/fix-pceplib-style
Donatas Abraitis [Tue, 7 Dec 2021 07:26:14 +0000 (09:26 +0200)]
Merge pull request #10177 from qlyoung/fix-pceplib-style

pceplib: fix style issues

2 years agotools: exit when reload fails to parse config file
Chirag Shah [Thu, 2 Dec 2021 06:13:37 +0000 (22:13 -0800)]
tools: exit when reload fails to parse config file

frr-reload triggers restart of service in case
it fails to parse new config file and conjunction with
running config contains 'router bgp' (default bgp instnace).

When frr-reload fails to parse new config file, it fails
to build newconfig context (empty object).
Instead of bailing out it compares against the running config
context. If the running config contains default bgp instance
it thinks new config is removing default bgp instance so it
triggers frr restart.

Fix is to to bail out reload script when it fails to parse
config file.

Ticket:#2861989
Reviewed By: MR-83
Testing Done:

router bgp 102 vrf RED
bgp router-id 2.2.2.2
neighbor underlay peer-group
neighbor underlay remote-as <---- Partial config

Before fix:
2021-12-02 02:43:16,987 ERROR: vtysh failed to process new
configuration: vtysh (mark file) exited with status 4:
b'line 79: % Command incomplete: neighbor underlay remote-as\n\n'
2021-12-02 02:43:17,145  INFO: Loading Config object from vtysh show
running
2021-12-02 02:43:17,362  INFO: "frr version 7.5+cl5.0.0u0" cannot be
removed
2021-12-02 02:43:17,362  INFO: "frr defaults datacenter" cannot be
removed
2021-12-02 02:43:17,362  INFO: "service integrated-vtysh-config" cannot
be removed
2021-12-02 02:43:17,363  INFO: "line vty" cannot be removed
2021-12-02 02:43:17,522  INFO: EVPN is enabled and default instance del
needed
2021-12-02 02:43:17,522  INFO: Restarting FRR          <---- Restart frr

After fix:

Just throw Error and abort the script.

root@TORS1:mgmt:/home/cumulus# /usr/lib/frr/frr-reload.py --debug
--reload --stdout /etc/frr/frr.conf
2021-12-02 04:00:56,519  INFO: Called via "Namespace(bindir='/usr/bin',
confdir='/etc/frr', daemon='', debug=True, filename='/etc/frr/$
rr.conf', input=None, overwrite=False, pathspace=None, reload=True,
rundir='/var/run/frr', stdout=True, test=False, vty_socket=None)"
2021-12-02 04:00:56,520  INFO: Loading Config object from file
/etc/frr/frr.conf
2021-12-02 04:00:56,679   ERROR: vtysh failed to process new
configuration: vtysh (mark file) exited with status 4:
b'line 79: % Command incomplete: neighbor underlay remote-as\n\n'
root@TORS1:mgmt:/home/cumulus#

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agotools: add a script to generate draft release changelog
Jafar Al-Gharaibeh [Tue, 2 Nov 2021 15:28:54 +0000 (10:28 -0500)]
tools: add a script to generate draft release changelog

This utility script helps in generated formatted and consistent
change log including:
       1- group logs per daemon
       2- standarize daemon names (lowercase, end with d)
       3- capitalize all log lines
       4- no merge commits

caveat: comments are assumed to be in the form

   daemon-name : message

Sample Output:

```
sharpd
    Follow the practice on cli design for json output
    Install route supports nexthop-seg6 (step3)
    Install_routes_helper support zapi_route flags (step1)

snapcraft
    Add missing dependency
    Add pathd to frr snap daemons
    Change base to ubuntu 18.04 and libyang 2.0.7

staticd
    Convert typedef to enum
    Fix distance processing
    Fix late initialization of blackhole type
    Output config using nb callbacks instead of operational data
```

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agobfdd: remove unnecessary receive timer restart
Igor Ryzhov [Wed, 17 Nov 2021 23:20:43 +0000 (02:20 +0300)]
bfdd: remove unnecessary receive timer restart

When the detection time expires, we put the session down and restart the
timer. As the comment in the code says, it's needed to zero the remote
discriminator after the second expiration.

But the RFC clearly says that this must be done on the first expiration:

   bfd.RemoteDiscr

      The remote discriminator for this BFD session.  This is the
      discriminator chosen by the remote system, and is totally opaque
      to the local system.  This MUST be initialized to zero.  If a
      period of a Detection Time passes without the receipt of a valid,
      authenticated BFD packet from the remote system, this variable
      MUST be set to zero.

And we actually already do it in `ptm_bfd_sess_dn`, so there's no need
to reset the timer and wait for it twice.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agotools: clang-format break after operators
Mark Stapp [Mon, 6 Dec 2021 15:50:43 +0000 (10:50 -0500)]
tools: clang-format break after operators

Break after binary operators, rather than before.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agodoc: Add `default-originate route-map WORD` for bgpd
Donatas Abraitis [Mon, 6 Dec 2021 07:51:29 +0000 (09:51 +0200)]
doc: Add `default-originate route-map WORD` for bgpd

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agofrr-reload: fix bgp nbr remote-as
Chirag Shah [Thu, 11 Nov 2021 01:22:24 +0000 (17:22 -0800)]
frr-reload: fix bgp nbr remote-as

Remove neighbor <> remote-as <> config line,
if the neighbor is part of the peer-group and
peer-group contains remote-as config.

Neighbors which are part of the peer-group
cannot override remote-as.

Fix:
Frr-reload needs to remote 'neighbor <> remote-as <>'
from lines_to_add if its already part of peer-group
and peer-group has remote-as config.

Testing Done:

Before:

Config snippet:
neighbor PEERS peer-group
neighbor PEERS remote-as external
neighbor PEERS timers 3 9
neighbor 10.2.1.1 remote-as external
neighbor 10.2.1.1 peer-group PEERS
neighbor 10.2.1.1 timers 3 9
neighbor 10.2.1.2 remote-as external
neighbor 10.2.1.2 peer-group PEERS

Frr-reload failure:
line 179: Failure to communicate[13] to bgpd, line:  neighbor 10.2.1.1
remote-as external
% Peer-group member cannot override remote-as of peer-group
line 179: Failure to communicate[13] to bgpd, line:  neighbor 10.2.1.2
remote-as external
% Peer-group member cannot override remote-as of peer-group

After:
frr-reload apply the config successfully.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agopceplib: fix style issues
Quentin Young [Mon, 6 Dec 2021 05:06:23 +0000 (00:06 -0500)]
pceplib: fix style issues

run clang-format
run clang-format
run clang-format
run clang-format
run clang-format

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agoMerge pull request #10144 from ton31337/fix/bmp_memory_leaks
Quentin Young [Mon, 6 Dec 2021 05:00:27 +0000 (00:00 -0500)]
Merge pull request #10144 from ton31337/fix/bmp_memory_leaks

2 years agoMerge pull request #10165 from ton31337/fix/add_connect_timer
Quentin Young [Mon, 6 Dec 2021 04:48:57 +0000 (23:48 -0500)]
Merge pull request #10165 from ton31337/fix/add_connect_timer

2 years agoMerge pull request #10170 from idryzhov/route-map-show
Quentin Young [Mon, 6 Dec 2021 04:46:16 +0000 (23:46 -0500)]
Merge pull request #10170 from idryzhov/route-map-show

2 years agoMerge pull request #10169 from idryzhov/doc-match-ip-nexthop-prefix-list
Quentin Young [Mon, 6 Dec 2021 04:39:47 +0000 (23:39 -0500)]
Merge pull request #10169 from idryzhov/doc-match-ip-nexthop-prefix-list

2 years agoMerge pull request #10017 from AnuradhaKaruppiah/evpn-pim-register
Russ White [Sat, 4 Dec 2021 11:36:03 +0000 (06:36 -0500)]
Merge pull request #10017 from AnuradhaKaruppiah/evpn-pim-register

pimd: handle vxlan sg add/del for upstream entries that are in a reg-join state

2 years agodoc: add missing route-map match command
Igor Ryzhov [Fri, 3 Dec 2021 18:49:54 +0000 (21:49 +0300)]
doc: add missing route-map match command

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agopimd: Modifying struct igmp_sock to gm_sock for IPv6
Sai Gomathi [Fri, 3 Dec 2021 18:23:23 +0000 (10:23 -0800)]
pimd: Modifying struct igmp_sock to gm_sock for IPv6

Modifying name of struct igmp_sock to struct gm_sock, which is to be used
by both IPv4 and IPv6(for both MLD and IGMP).

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2 years agopimd: Modifying name of struct igmp_group to struct gm_group for IPv6.
Sai Gomathi [Fri, 3 Dec 2021 17:41:52 +0000 (09:41 -0800)]
pimd: Modifying name of struct igmp_group to struct gm_group for IPv6.

Modifying name of struct igmp_group to struct gm_group, which is to be used
by both IPv4 and IPv6(for both MLD and IGMP).

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2 years agopimd: Modifying name of struct igmp_source to struct gm_source for IPv6.
Sai Gomathi [Fri, 3 Dec 2021 17:33:53 +0000 (09:33 -0800)]
pimd: Modifying name of struct igmp_source to struct gm_source for IPv6.

Modifying name of struct igmp_source to struct gm_source, which is to be used
by both IPv4 and IPv6(for both MLD and IGMP).

Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2 years agolib: routemap config output cleanup
Igor Ryzhov [Fri, 3 Dec 2021 18:00:01 +0000 (21:00 +0300)]
lib: routemap config output cleanup

Just a small cleanup to unify the code and remove duplication.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #9396 from idryzhov/fix-dup-key-config
Quentin Young [Fri, 3 Dec 2021 17:37:44 +0000 (12:37 -0500)]
Merge pull request #9396 from idryzhov/fix-dup-key-config

2 years agopimd: Modifying name of struct igmp_join to struct gm_join to accomodate IPv6 changes.
Mobashshera Rasool [Fri, 3 Dec 2021 17:25:20 +0000 (09:25 -0800)]
pimd: Modifying name of struct igmp_join to struct gm_join to accomodate IPv6 changes.

Fix:
====
Modifying name of struct igmp_join to struct gm_join, which is to be used
by both IPv4 and IPv6(for both MLD and IGMP).

Co-authored-by: Abhishek N R abnr@vmware.com
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>