Commit Graph

26797 Commits

Author SHA1 Message Date
Igor Ryzhov
947ecff5a7
Merge pull request #10236 from ffontaine/master
configure.ac: fix enable_bmp typo
2021-12-20 16:12:03 +03:00
anlan_cs
b816de6213 zebra: correct one spell error
Signed-off-by: anlan_cs <anlan_cs@tom.com>
2021-12-19 20:47:01 -05:00
Donald Sharp
997acc8944
Merge pull request #10243 from Drumato/pathd-fix-typo
pathd: fix typo in pathd/path_ted.c
2021-12-19 20:14:56 -05:00
Yamato Sugawara
1e519577ab pathd: fix typo in pathd/path_ted.c
Signed-off-by: Yamato Sugawara <yamato.sugawara@linecorp.com>
2021-12-19 11:25:15 +00:00
Donald Sharp
be785e356a 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>
2021-12-17 13:28:56 -05:00
Fabrice Fontaine
bacabf2476 configure.ac: fix enable_bmp typo
enable_bmp doesn't exist, use enable_bgp_bmp

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-12-16 23:23:43 +01:00
Donatas Abraitis
a98380bb93
Merge pull request #10213 from idryzhov/isis-adj-uaf
isisd: fix use after free
2021-12-16 16:41:11 +02:00
Stephen Worley
ad1229a077
Merge pull request #10215 from FRRouting/revert-10164-name_change
Revert "pimd: Modifying members of pim_interface to accommodate IPv6 changes"
2021-12-15 17:40:53 -05:00
David Lamparter
24f91867d2
Merge pull request #10224 from ffontaine/master 2021-12-15 23:32:06 +01:00
Fabrice Fontaine
c919fce32d configure.ac: drop --enable-pcep option and HAVE_PATHD_PCEP
Drop --enable-pcep option and HAVE_PATHD_PCEP which does nothing since
749714731e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-12-15 16:51:33 +01:00
Jonas Gorski
b321edc51b 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>
2021-12-15 10:41:49 +01:00
Donald Sharp
2c32234f11
Merge pull request #10211 from idryzhov/doc-pathd-warning
doc: fix undefined label warning
2021-12-14 18:25:21 -05:00
David Lamparter
b8984d4e90 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>
2021-12-14 18:12:25 +01:00
David Lamparter
b1dc60f4ab 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>
2021-12-14 18:12:20 +01:00
David Lamparter
62646e1350
Merge pull request #10167 from mobash-rasool/pim-upst-1 2021-12-14 17:54:22 +01:00
David Lamparter
8627cf473b
Merge pull request #10168 from SaiGomathiN/struct-change 2021-12-14 17:53:59 +01:00
David Lamparter
29e5822590
Revert "pimd: Modifying members of pim_interface to accommodate IPv6 changes" 2021-12-14 17:33:24 +01:00
Russ White
991ff333b6
Merge pull request #10214 from opensourcerouting/fix_bgp_orf
bgpd: fix BGP ORF Prefix-length matching
2021-12-14 10:54:12 -05:00
Martin Winter
e574b842a1
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>
2021-12-14 14:53:53 +01:00
Igor Ryzhov
7209d2a4cc 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>
2021-12-14 16:28:08 +03:00
Donald Sharp
a3a0d43585 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>
2021-12-14 07:29:41 -05:00
Igor Ryzhov
d1aa7c01c4 doc: fix undefined label warning
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-12-14 12:31:19 +03:00
Donatas Abraitis
a64829d3c5
Merge pull request #9472 from rampxxxx/pathd_doc_augmented
doc: Augmented pathd documentation.
2021-12-14 09:16:11 +02:00
Donatas Abraitis
e69ae079b7
Merge pull request #9899 from Drumato/zebra-srv6-locator-detail-json-support
zebra: Add support for json output in srv6 locator detail command
2021-12-14 09:11:36 +02:00
Quentin Young
d64d20fcd4
Merge pull request #9937 from Jafaral/rel-script 2021-12-13 12:26:22 -05:00
Russ White
a4c68845e1
Merge pull request #10201 from donaldsharp/ospf_lan_fixup
tests: test_ospf_lan.py is looking for a certain order enforce it
2021-12-13 09:45:42 -05:00
Donald Sharp
235f1ccd9b 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>
2021-12-11 12:05:36 -05:00
Donatas Abraitis
562b5f391f
Merge pull request #10148 from sworleys/NHG-ID-Dump
zebra: add optional NHG ID output to `show ip ro`
2021-12-08 09:52:06 +02:00
Mark Stapp
8acb2480a7
Merge pull request #10186 from idryzhov/bfd-receive-timer-cb
bfdd: remove unnecessary receive timer restart
2021-12-07 12:21:40 -05:00
Russ White
46507be0fe
Merge pull request #10187 from chiragshah6/freload
tools: exit when reload fails to parse config file
2021-12-07 11:40:36 -05:00
Russ White
476a3613aa
Merge pull request #10135 from donaldsharp/ripng_faster_timers
tests: Allow ripng_topo1 to converge a bit faster
2021-12-07 06:41:45 -05:00
Russ White
6e3a134e09
Merge pull request #10081 from ckishimo/ospf6d_type4
ospf6d: do not originate Type-4 lsa when NSSA
2021-12-07 06:39:00 -05:00
Russ White
46565af731
Merge pull request #10120 from idryzhov/bfd-detect-to
bfdd: fix detection timeout update
2021-12-07 06:38:15 -05:00
Russ White
10d77aab86
Merge pull request #10039 from chiragshah6/mdev
frr-reload: fix bgp nbr remote-as rendering
2021-12-07 06:05:37 -05:00
Donatas Abraitis
5ace4607b4
Merge pull request #10177 from qlyoung/fix-pceplib-style
pceplib: fix style issues
2021-12-07 09:26:14 +02:00
Chirag Shah
3a442b25ec 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>
2021-12-06 14:20:57 -08:00
Jafar Al-Gharaibeh
339bd66fde 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>
2021-12-06 13:44:57 -06:00
Igor Ryzhov
a0f9b0c7c8 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>
2021-12-06 19:48:25 +03:00
Mark Stapp
9afa78de7a tools: clang-format break after operators
Break after binary operators, rather than before.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2021-12-06 10:50:43 -05:00
Donatas Abraitis
91342239ca doc: Add default-originate route-map WORD for bgpd
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-12-06 09:51:29 +02:00
Chirag Shah
2134a5fe51 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>
2021-12-05 21:28:11 -08:00
Quentin Young
b8cc7b6276 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>
2021-12-06 00:09:13 -05:00
Quentin Young
2e38d79e64
Merge pull request #10144 from ton31337/fix/bmp_memory_leaks 2021-12-06 00:00:27 -05:00
Quentin Young
6316270230
Merge pull request #10165 from ton31337/fix/add_connect_timer 2021-12-05 23:48:57 -05:00
Quentin Young
ed856b1e59
Merge pull request #10170 from idryzhov/route-map-show 2021-12-05 23:46:16 -05:00
Quentin Young
0fd3edadcb
Merge pull request #10169 from idryzhov/doc-match-ip-nexthop-prefix-list 2021-12-05 23:39:47 -05:00
Russ White
c400ebde1c
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
2021-12-04 06:36:03 -05:00
Igor Ryzhov
c5ec8f66e0 doc: add missing route-map match command
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-12-03 21:49:54 +03:00
Sai Gomathi
c5f76fad1a 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>
2021-12-03 10:27:12 -08:00
Sai Gomathi
a16db099e4 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>
2021-12-03 10:11:13 -08:00