]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #8158 from idryzhov/staticd-fix-blackhole
Russ White [Tue, 9 Mar 2021 14:35:37 +0000 (09:35 -0500)]
Merge pull request #8158 from idryzhov/staticd-fix-blackhole

staticd: forbid blackhole and non-blackhole nexthops in a single route

3 years agoMerge pull request #6807 from opensourcerouting/xref-extract
Russ White [Tue, 9 Mar 2021 12:58:43 +0000 (07:58 -0500)]
Merge pull request #6807 from opensourcerouting/xref-extract

xrefs extraction tool

3 years agoMerge pull request #8176 from LabNConsulting/chopps/fix-locale-fail
David Lamparter [Tue, 9 Mar 2021 11:34:38 +0000 (12:34 +0100)]
Merge pull request #8176 from LabNConsulting/chopps/fix-locale-fail

tests: Sort expected and actual to avoid locale issues

3 years agoMerge pull request #8180 from kuldeepkash/topojson_framework
Donatas Abraitis [Mon, 8 Mar 2021 07:32:09 +0000 (09:32 +0200)]
Merge pull request #8180 from kuldeepkash/topojson_framework

tests: Improve error/assert message logging

3 years agoMerge pull request #8208 from donaldsharp/validation_state
Donatas Abraitis [Mon, 8 Mar 2021 07:22:54 +0000 (09:22 +0200)]
Merge pull request #8208 from donaldsharp/validation_state

bgpd: Display RPKI validation state if we have it

3 years agoMerge pull request #8195 from qlyoung/fix-community-type-command
Donatas Abraitis [Sun, 7 Mar 2021 15:04:57 +0000 (17:04 +0200)]
Merge pull request #8195 from qlyoung/fix-community-type-command

tests: fix community-list invalid command

3 years agoMerge pull request #8185 from volta-networks/fix_ospf6_changing_area_to_stub
Donald Sharp [Sun, 7 Mar 2021 14:02:58 +0000 (09:02 -0500)]
Merge pull request #8185 from volta-networks/fix_ospf6_changing_area_to_stub

ospf6d: Don't advertise AS-External LSAs into stub area

3 years agoMerge pull request #8206 from aldobrrrr/add_isis_redist_routemap_match_tag
Donald Sharp [Sun, 7 Mar 2021 13:49:22 +0000 (08:49 -0500)]
Merge pull request #8206 from aldobrrrr/add_isis_redist_routemap_match_tag

isisd: added support for routemap match tag in redistribution

3 years agoMerge pull request #8207 from opensourcerouting/bgp-opt-read
Donald Sharp [Sun, 7 Mar 2021 13:38:03 +0000 (08:38 -0500)]
Merge pull request #8207 from opensourcerouting/bgp-opt-read

bgpd,lib: small improvement in BGP read

3 years agobgpd: Display RPKI validation state if we have it
Donald Sharp [Sat, 6 Mar 2021 14:31:45 +0000 (09:31 -0500)]
bgpd: Display RPKI validation state if we have it

When dumping data about prefixes in bgp.  Let's dump the
rpki validation state as well:

Output if rpki is turned on:
janelle# show rpki prefix 2003::/19
Prefix                                   Prefix Length  Origin-AS
2003::                                      19 -  19         3320
janelle# show bgp ipv6 uni 2003::/19
BGP routing table entry for 2003::/19
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  15096 6939 3320
    ::ffff:4113:867a from 65.19.134.122 (193.72.216.231)
    (fe80::e063:daff:fe79:1dab) (used)
      Origin IGP, valid, external, best (First path received), validation-state: valid
      Last update: Sat Mar  6 09:20:51 2021
janelle# show rpki prefix 8.8.8.0/24
Prefix                                   Prefix Length  Origin-AS
janelle# show bgp ipv4 uni 8.8.8.0/24
BGP routing table entry for 8.8.8.0/24
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  100.99.229.142
  15096 6939 15169
    65.19.134.122 from 65.19.134.122 (193.72.216.231)
      Origin IGP, valid, external, best (First path received), validation-state: not found
      Last update: Sat Mar  6 09:21:25 2021

Example output when rpki is not configured:
eva# show bgp ipv4 uni 8.8.8.0/24
BGP routing table entry for 8.8.8.0/24
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  janelle(192.168.161.137)
  64539 15096 6939 15169
    192.168.161.137(janelle) from janelle(192.168.161.137) (192.168.44.1)
      Origin IGP, valid, external, bestpath-from-AS 64539, best (First path received)
      Last update: Sat Mar  6 09:33:51 2021

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Improve error/assert message logging
Kuldeep Kashyap [Tue, 2 Mar 2021 03:22:25 +0000 (19:22 -0800)]
tests: Improve error/assert message logging

1. Improved error meesage logging.
2. No functionality changes only put some meaningfull error messages.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoisisd: added support for routemap match tag in redistribution
Emanuele Altomare [Fri, 5 Mar 2021 22:12:00 +0000 (22:12 +0000)]
isisd: added support for routemap match tag in redistribution

Now it's possible to filter routes redistributed by another protocol using tag
which comes from zebra daemon.

Example of a possible configuration:

```
!
ipv6 route fd00::/48 blackhole tag 20
ipv6 route fd00::/60 blackhole tag 10
!
interface one
 ipv6 router isis COMMON
 isis circuit-type level-1
!
interface two
 ipv6 router isis COMMON
 isis circuit-type level-2-only
!
router isis COMMON
 net fd.0000.0000.0000.0001.00
 redistribute ipv6 static level-1 route-map static-l1
 redistribute ipv6 static level-2 route-map static-l2
 topology ipv6-unicast
!
route-map static-l1 permit 10
 match tag 10
!
route-map static-l2 permit 10
 match tag 20
!
```

Signed-off-by: Emanuele Altomare <emanuele@common-net.org>
3 years agobgpd: improve socket read performance
Rafael Zalamena [Fri, 5 Mar 2021 21:15:15 +0000 (18:15 -0300)]
bgpd: improve socket read performance

Use the new ringbuffer API function to read file descriptors directly
to the ringbuffer instead of using intermediary buffers.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agolib: add ringbuf socket read function
Rafael Zalamena [Fri, 5 Mar 2021 21:14:11 +0000 (18:14 -0300)]
lib: add ringbuf socket read function

Implement new ringbuf function to do the proper socket reads without
the need of intermediary buffers.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #8188 from volta-networks/fix_ospf6_cost_flag
Donald Sharp [Fri, 5 Mar 2021 12:22:43 +0000 (07:22 -0500)]
Merge pull request #8188 from volta-networks/fix_ospf6_cost_flag

ospf6d: fix setting NOAUTOCOST flag

3 years agoMerge pull request #8196 from ton31337/feature/rfc8654_bgpd
Donald Sharp [Fri, 5 Mar 2021 12:18:42 +0000 (07:18 -0500)]
Merge pull request #8196 from ton31337/feature/rfc8654_bgpd

bgpd: Add BGP Extended message support

3 years agoMerge pull request #8191 from idryzhov/bfd-cli-fixes
Rafael Zalamena [Fri, 5 Mar 2021 11:25:13 +0000 (11:25 +0000)]
Merge pull request #8191 from idryzhov/bfd-cli-fixes

bfd cli/nb fixes

3 years agoMerge pull request #8165 from wesleycoakley/misc-qol-fixups
Rafael Zalamena [Fri, 5 Mar 2021 11:22:47 +0000 (11:22 +0000)]
Merge pull request #8165 from wesleycoakley/misc-qol-fixups

staticd, pimd, tests: small fixups and cov fix

3 years agobgpd: Add BGP Extended message support
Donatas Abraitis [Thu, 25 Feb 2021 17:46:49 +0000 (19:46 +0200)]
bgpd: Add BGP Extended message support

Implement https://www.rfc-editor.org/rfc/rfc8654.txt

```
> | jq '."192.168.10.25".neighborCapabilities.extendedMessage'
"advertisedAndReceived"
```

Another side is Bird:

```
BIRD 2.0.7 ready.
Name       Proto      Table      State  Since         Info
v4         BGP        ---        up     19:39:15.689  Established
  BGP state:          Established
    Neighbor address: 192.168.10.123
    Neighbor AS:      65534
    Local AS:         65025
    Neighbor ID:      192.168.100.1
    Local capabilities
      Multiprotocol
        AF announced: ipv4
      Route refresh
      Extended message
      Graceful restart
      4-octet AS numbers
      Enhanced refresh
      Long-lived graceful restart
    Neighbor capabilities
      Multiprotocol
        AF announced: ipv4
      Route refresh
      Extended message
      Graceful restart
      4-octet AS numbers
      ADD-PATH
        RX: ipv4
        TX:
      Enhanced refresh
    Session:          external AS4
    Source address:   192.168.10.25
    Hold timer:       140.139/180
    Keepalive timer:  9.484/60
  Channel ipv4
    State:          UP
    Table:          master4
    Preference:     100
    Input filter:   ACCEPT
    Output filter:  ACCEPT
    Routes:         9 imported, 3 exported, 8 preferred
    Route change stats:     received   rejected   filtered    ignored   accepted
      Import updates:              9          0          0          0          9
      Import withdraws:            2          0        ---          2          0
      Export updates:             11          8          0        ---          3
      Export withdraws:            0        ---        ---        ---          0
    BGP Next hop:   192.168.10.25
```

Tested at least as well with to make sure it works with backward compat.:
ExaBGP 4.0.2-1c737d99.
Arista vEOS 4.21.14M

Testing by injecint 10k routes with:
```
sharp install routes 172.16.0.1 nexthop 192.168.10.123 10000
```

Before extended message support:
```
2021/03/01 07:18:51 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:51 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:51 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:51 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:51 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:51 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:52 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:52 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:52 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:52 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:52 BGP: u1:s1 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/03/01 07:18:52 BGP: u1:s1 send UPDATE len 2186 (max message len: 4096) numpfx 427
2021/03/01 07:18:53 BGP: u1:s1 send UPDATE len 3421 (max message len: 4096) numpfx 674
```

After extended message support:
```
2021/03/01 07:20:11 BGP: u1:s1 send UPDATE len 50051 (max message len: 65535) numpfx 10000
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobfdd: fix echo configuration in profile
Igor Ryzhov [Thu, 4 Mar 2021 18:17:20 +0000 (21:17 +0300)]
bfdd: fix echo configuration in profile

It's not currently possible to configure echo mode in profile node:
```
(config)# bfd
(config-bfd)# profile test
(config-bfd-profile)# echo-mode
% Echo mode is only available for single hop sessions.
(config-bfd-profile)# echo-interval 20
% Echo mode is only available for single hop sessions.
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Sort expected and actual to avoid locale issues
Christian Hopps [Mon, 1 Mar 2021 22:25:54 +0000 (17:25 -0500)]
tests: Sort expected and actual to avoid locale issues

Avoid undocumented topotest dependency on installing en_US locale.
With this change dependency is removed.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #8199 from taspelund/evpn_stats
Patrick Ruddy [Thu, 4 Mar 2021 10:04:26 +0000 (10:04 +0000)]
Merge pull request #8199 from taspelund/evpn_stats

bgpd: fix bgp statistics for l2vpn evpn

3 years agoMerge pull request #8194 from LabNConsulting/chopps/fix-log-msg
Igor Ryzhov [Thu, 4 Mar 2021 07:18:45 +0000 (10:18 +0300)]
Merge pull request #8194 from LabNConsulting/chopps/fix-log-msg

pimd: correctly get interface name for error message

3 years agopimd: correctly get interface name for error message
Christian Hopps [Sun, 28 Feb 2021 16:49:40 +0000 (11:49 -0500)]
pimd: correctly get interface name for error message

This was found while doing libyang2 work (causes assert); however, it is
also incorrect for libyang1 (empty canonical value for incorrectly
referenced interface vs interface-name node).

While here, fix 2 other incorrect uses of "." on a container node.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agobgpd: fix bgp statistics for l2vpn evpn
Trey Aspelund [Thu, 4 Mar 2021 02:05:56 +0000 (02:05 +0000)]
bgpd: fix bgp statistics for l2vpn evpn

'show bgp l2vpn evpn statistics' was returning 0 for all stats
because bgp_table_stats_walker bailed out if afi != AFI_IP or AFI_IP6.
Add case condition to catch AFI_L2VPN.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
3 years agoMerge pull request #8197 from idryzhov/pip2-link
Martin Winter [Wed, 3 Mar 2021 21:19:22 +0000 (22:19 +0100)]
Merge pull request #8197 from idryzhov/pip2-link

doc: fix link for python2 get-pip.py

3 years agodoc: fix link for python2 get-pip.py
Igor Ryzhov [Wed, 3 Mar 2021 21:13:44 +0000 (00:13 +0300)]
doc: fix link for python2 get-pip.py

Script by the current link doesn't work with Python 2 anymore:
```
ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6.
Please use https://bootstrap.pypa.io/2.7/get-pip.py instead.
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8190 from gromit1811/fix_topotest_pylint
Quentin Young [Wed, 3 Mar 2021 20:43:38 +0000 (15:43 -0500)]
Merge pull request #8190 from gromit1811/fix_topotest_pylint

tests: Fix topotest.py pylint errors

3 years agodoc: Add rfc8654 to supported RFCs list
Donatas Abraitis [Thu, 25 Feb 2021 17:45:35 +0000 (19:45 +0200)]
doc: Add rfc8654 to supported RFCs list

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotests: Use BGP Extended Message length
Donatas Abraitis [Thu, 25 Feb 2021 17:44:15 +0000 (19:44 +0200)]
tests: Use BGP Extended Message length

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobfdd: forbid creation of the same peer with and without interface name
Igor Ryzhov [Wed, 3 Mar 2021 20:10:19 +0000 (23:10 +0300)]
bfdd: forbid creation of the same peer with and without interface name

Currently it is possible to configure the same peer with and without
interface name:
```
bfd
 peer 1.1.1.1
 !
 peer 1.1.1.1 interface enp0s3
 !
```

There are multiple problems with that:
1. Both nodes actually control the same BFD session. So the config is
   either duplicated or, even worse, different - and there is no way to
   say which one actually works.
2. When the user deletes both nodes, the session is not actually freed,
   because its refcount is always greater than 1.

Such configuration must be forbidden. User should either have single
node with wildcard name or multiple nodes with actual names.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8189 from idryzhov/topotest-mkdir
Rafael Zalamena [Wed, 3 Mar 2021 19:30:11 +0000 (19:30 +0000)]
Merge pull request #8189 from idryzhov/topotest-mkdir

tests: don't complain when /tmp/topotests exists

3 years agotests: fix community-list invalid command
Quentin Young [Wed, 3 Mar 2021 18:56:39 +0000 (13:56 -0500)]
tests: fix community-list invalid command

Didn't test this but it's already randomly broken so cant be worse

Hopefully fixes:

raise InvalidCLIError("%s" % output)
InvalidCLIError: line 2: % Command incomplete[4]: bgp
large-community-list standard Test1 permit

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agobfdd: actually return validation error instead of logging
Igor Ryzhov [Wed, 3 Mar 2021 16:43:00 +0000 (19:43 +0300)]
bfdd: actually return validation error instead of logging

Before:
```
(config-bfd)# peer fe80::a00:27ff:fea2:5803 multihop local-address fe80::a00:27ff:fea2:5802
% Configuration failed.

Error type: validation
```

After:
```
(config-bfd)# peer fe80::a00:27ff:fea2:5803 multihop local-address fe80::a00:27ff:fea2:5802
% Configuration failed.

Error type: validation
Error description: When using link-local you must specify an interface
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobfdd: require local-address when using multihop
Igor Ryzhov [Wed, 3 Mar 2021 16:38:38 +0000 (19:38 +0300)]
bfdd: require local-address when using multihop

If local-address is not supplied, then an incorrect xpath is generated
which is not expected by NB CLI.

Fixes #7465.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Fix topotest.py pylint errors
Martin Buck [Wed, 3 Mar 2021 14:50:05 +0000 (15:50 +0100)]
tests: Fix topotest.py pylint errors

Fix 2 string formatting errors (cosmetic only - remove unused string
formatting arguments). Also fix obvious typos in empty class FreeBSDRouter
implementation.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
3 years agostaticd: forbid blackhole and non-blackhole nexthops in a single route
Igor Ryzhov [Fri, 26 Feb 2021 15:32:37 +0000 (18:32 +0300)]
staticd: forbid blackhole and non-blackhole nexthops in a single route

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8183 from kuldeepkash/multicast_pim_bsm
Igor Ryzhov [Wed, 3 Mar 2021 15:05:41 +0000 (18:05 +0300)]
Merge pull request #8183 from kuldeepkash/multicast_pim_bsm

tests: Fix for test failure in PR #8158

3 years agoospf6d: Don't advertise AS-External LSAs into stub area
lynne [Tue, 2 Mar 2021 21:40:56 +0000 (16:40 -0500)]
ospf6d: Don't advertise AS-External LSAs into stub area

If area is a normal area and has adjacencies up and then the user changes
the area to a stub area, the code was leaving existing AS-External LSAs in
the database and was sending AS-External LSAs into the stub area causing
the adjacency to stay in Ex-Start.   With this change we now cleanup the
AS-External LSAs that existed when area was not a stub and do not advertise
AS-External LSAs into the stub area.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
3 years agotests: don't complain when /tmp/topotests exists
Igor Ryzhov [Wed, 3 Mar 2021 11:22:15 +0000 (14:22 +0300)]
tests: don't complain when /tmp/topotests exists

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8168 from donaldsharp/test_evpn
Patrick Ruddy [Wed, 3 Mar 2021 10:28:39 +0000 (10:28 +0000)]
Merge pull request #8168 from donaldsharp/test_evpn

Test cleanup and fix evpn_type5_test_topo1

3 years agoospf6d: fix setting NOAUTOCOST flag
Emanuele Di Pascale [Wed, 3 Mar 2021 09:56:51 +0000 (10:56 +0100)]
ospf6d: fix setting NOAUTOCOST flag

ospf6 keeps a flag to remember whether the cost for an interface
was manually added via config or computed automatically, but if
the configured value matches the auto-computed one we were not
setting this flag, meaning that the config would not show up in
the config.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agotests: address coverity / styling issues in topotests
Wesley Coakley [Mon, 30 Nov 2020 22:12:01 +0000 (14:12 -0800)]
tests: address coverity / styling issues in topotests

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agoMerge pull request #8170 from mjstapp/fix_sa_pim
Donald Sharp [Tue, 2 Mar 2021 20:51:57 +0000 (15:51 -0500)]
Merge pull request #8170 from mjstapp/fix_sa_pim

bgpd, pimd: fix coverity SA warnings

3 years agotests: Don't generate support bundles when we get the results we want
Donald Sharp [Sun, 28 Feb 2021 04:05:40 +0000 (23:05 -0500)]
tests: Don't generate support bundles when we get the results we want

We are generating support bundles for tests being run that
are passing.  Tell the system...

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Remove sleep(60) and look for convergence
Donald Sharp [Sun, 28 Feb 2021 04:02:53 +0000 (23:02 -0500)]
tests: Remove sleep(60) and look for convergence

Sleeping when convergence is not guaranteed in 60 seconds
and then testing the rib to see if it has the data is
not a great way to have a test complete all the time.

Modify the code so that we check for convergence
and if we have converged then look in the rib.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: show ip mroute column realign
Wesley Coakley [Fri, 4 Dec 2020 19:37:22 +0000 (11:37 -0800)]
pimd: show ip mroute column realign

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agostaticd: warn on attempted delete of non-existent route
Wesley Coakley [Tue, 15 Dec 2020 01:01:24 +0000 (20:01 -0500)]
staticd: warn on attempted delete of non-existent route

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agoMerge pull request #8152 from idryzhov/fix-zebra-blackhole
Stephen Worley [Tue, 2 Mar 2021 16:50:46 +0000 (11:50 -0500)]
Merge pull request #8152 from idryzhov/fix-zebra-blackhole

zebra: don't use kernel nexthops for blackhole routes

3 years agoMerge pull request #8150 from pguibert6WIND/ecomm_seq_0_possible
Russ White [Tue, 2 Mar 2021 16:46:41 +0000 (11:46 -0500)]
Merge pull request #8150 from pguibert6WIND/ecomm_seq_0_possible

bgpd: accept (ext)community list sequence number set to 0

3 years agoMerge pull request #8175 from mjstapp/fix_printfrr_nulls
Russ White [Tue, 2 Mar 2021 16:36:49 +0000 (11:36 -0500)]
Merge pull request #8175 from mjstapp/fix_printfrr_nulls

lib, bgpd: handle NULL inputs in printfrr extensions

3 years agotests: Fix for test failure in PR #8158
Kuldeep Kashyap [Tue, 2 Mar 2021 13:24:34 +0000 (05:24 -0800)]
tests: Fix for test failure in PR #8158

1. There were few tests where routes were configured with blackhole and
non-blackhole nexthops simultaneously, enhanced tests accordingly and
verified in master branch and with PR #8158 changes.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoMerge pull request #8084 from ranjanyash54/spf_json
Donald Sharp [Tue, 2 Mar 2021 12:26:49 +0000 (07:26 -0500)]
Merge pull request #8084 from ranjanyash54/spf_json

ospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"

3 years agoMerge pull request #7951 from mjstapp/fix_cancel_event
Donald Sharp [Tue, 2 Mar 2021 12:21:47 +0000 (07:21 -0500)]
Merge pull request #7951 from mjstapp/fix_cancel_event

libs, bgpd: improve task cancellation by argument value

3 years agoMerge pull request #8021 from AnuradhaKaruppiah/evpn-weak-override-fix
Patrick Ruddy [Tue, 2 Mar 2021 10:44:43 +0000 (10:44 +0000)]
Merge pull request #8021 from AnuradhaKaruppiah/evpn-weak-override-fix

zebra: disable setting weak override flag in neigh updates

3 years agoMerge pull request #8117 from AnuradhaKaruppiah/evpn-consistency-checks
Patrick Ruddy [Tue, 2 Mar 2021 10:37:59 +0000 (10:37 +0000)]
Merge pull request #8117 from AnuradhaKaruppiah/evpn-consistency-checks

bgpd: enable ES consistency checks on first ES add

3 years agoospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"
Yash Ranjan [Mon, 9 Nov 2020 09:52:45 +0000 (01:52 -0800)]
ospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"

Modify code to add JSON format output in show command
"show ipv6 ospf6 spf tree" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoMerge pull request #8172 from donaldsharp/more_pytest_bgp
Donatas Abraitis [Tue, 2 Mar 2021 07:30:06 +0000 (09:30 +0200)]
Merge pull request #8172 from donaldsharp/more_pytest_bgp

More pytest stuff

3 years agoMerge pull request #8178 from donaldsharp/bgp_fib_install
Donatas Abraitis [Tue, 2 Mar 2021 06:56:35 +0000 (08:56 +0200)]
Merge pull request #8178 from donaldsharp/bgp_fib_install

bgpd: Wait for Install should not always set the flag

3 years agoMerge pull request #8171 from mjstapp/print_nh_null
Donald Sharp [Tue, 2 Mar 2021 01:22:54 +0000 (20:22 -0500)]
Merge pull request #8171 from mjstapp/print_nh_null

lib: print NULL for NULL nexthops

3 years agolib: protect printfrr extensions from NULL input
Mark Stapp [Mon, 1 Mar 2021 20:41:30 +0000 (15:41 -0500)]
lib: protect printfrr extensions from NULL input

Protect the lib printfrr extension handlers from NULL inputs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agobgpd: protect bgp printfrr extension from NULLs
Mark Stapp [Mon, 1 Mar 2021 20:40:51 +0000 (15:40 -0500)]
bgpd: protect bgp printfrr extension from NULLs

Protect the bgp printfrr extension from NULL input.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agobgpd: Wait for Install should not always set the flag
Donald Sharp [Mon, 1 Mar 2021 18:09:11 +0000 (13:09 -0500)]
bgpd: Wait for Install should not always set the flag

If we are filtering a route due to any of the filter reasons
we should not be setting the BGP_NODE_FIB_INSTALL_FIB_PENDING
flag.  This is especially evident with say a loopback that
is covered by a network statement.  When we receive the route
back from our peer we should not be setting the
BGP_NODE_FIB_INSTALL_PENDING flag on it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: don't use kernel nexthops for blackhole routes
Igor Ryzhov [Thu, 25 Feb 2021 15:28:51 +0000 (18:28 +0300)]
zebra: don't use kernel nexthops for blackhole routes

Fixes #6522 and #8149.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Run `black` against tests again to clean up formatting
Donald Sharp [Mon, 1 Mar 2021 14:18:49 +0000 (09:18 -0500)]
tests: Run `black` against tests again to clean up formatting

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.snmp
Donald Sharp [Mon, 1 Mar 2021 14:17:53 +0000 (09:17 -0500)]
tests: Add pytest.mark.snmp

Add the ability to run snmp tests

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add some pytest.mark.bgpd
Donald Sharp [Mon, 1 Mar 2021 14:11:38 +0000 (09:11 -0500)]
tests: Add some pytest.mark.bgpd

Add some pytest.mark.bgpd.  This is about all I could stomach doing
in one patch.  I'll do another pass at another time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: print NULL for NULL nexthops
Mark Stapp [Mon, 1 Mar 2021 13:51:13 +0000 (08:51 -0500)]
lib: print NULL for NULL nexthops

Instead of crashing, print "NULL" when printfrr callback for
nexthops is called for a NULL nexthop argument.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agobgpd, pimd: fix coverity SA warnings
Mark Stapp [Mon, 1 Mar 2021 13:46:29 +0000 (08:46 -0500)]
bgpd, pimd: fix coverity SA warnings

Fix a couple of coverity warnings in pim and bgp.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #8073 from idryzhov/vtysh-show-config
Santosh P K [Mon, 1 Mar 2021 13:10:06 +0000 (18:40 +0530)]
Merge pull request #8073 from idryzhov/vtysh-show-config

lib: allow "show config running" command for non-transactional CLI

3 years agobgpd: accept (ext)community list sequence number set to 0
Philippe Guibert [Thu, 25 Feb 2021 12:54:31 +0000 (13:54 +0100)]
bgpd: accept (ext)community list sequence number set to 0

now that sequence number is configurable, there is no problem in
permitting to configure seq 0 sequence number.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #8166 from donaldsharp/ospfv3_info
Mark Stapp [Sun, 28 Feb 2021 15:57:01 +0000 (10:57 -0500)]
Merge pull request #8166 from donaldsharp/ospfv3_info

ospf6d: turn some info->debug

3 years agoospf6d: turn some info->debug
Donald Sharp [Sat, 27 Feb 2021 15:42:07 +0000 (10:42 -0500)]
ospf6d: turn some info->debug

The log is being spammed every spf interval:

Feb 27 16:19:34  ospf6d[462371]: SPF processing: # Areas: 1, SPF runtime: 0 sec 2043 usec, Reason: R+, R-, N+
Feb 27 16:20:59  ospf6d[462371]: SPF: Scheduled in 0 msec
Feb 27 16:20:59  ospf6d[462371]: SPF processing: # Areas: 1, SPF runtime: 0 sec 2284 usec, Reason: R+, R-
Feb 27 16:21:01  ospf6d[462371]: SPF: Scheduled in 0 msec
Feb 27 16:21:01  ospf6d[462371]: SPF processing: # Areas: 1, SPF runtime: 0 sec 2153 usec, Reason: R+, R-, N-

There is no reason to do this

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8164 from opensourcerouting/isisd-ti-lfa-fixes
Mark Stapp [Sat, 27 Feb 2021 15:13:14 +0000 (10:13 -0500)]
Merge pull request #8164 from opensourcerouting/isisd-ti-lfa-fixes

isisd: TI-LFA fixes

3 years agoisisd: handle corner case involving TI-LFA and the SR No-PHP flag
Renato Westphal [Fri, 26 Feb 2021 16:39:02 +0000 (13:39 -0300)]
isisd: handle corner case involving TI-LFA and the SR No-PHP flag

When the last SID in the TI-LFA repair list is an Adj-SID from the
penultimate hop router towards the final hop, the No-PHP flag of the
original Prefix-SID must be honored in the repair list itself since
the penultimate hop router won't have a chance to process that SID
and pop it if necessary.

Reported-by: Fredi Raspall <fredi@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: remove assert from the TI-LFA repair list computation algorithm
Renato Westphal [Fri, 26 Feb 2021 16:37:12 +0000 (13:37 -0300)]
isisd: remove assert from the TI-LFA repair list computation algorithm

In some cases it's possible that the TI-LFA algorithms will try to
compute a SID repair list more than once for the same backup nexthop
[1]. This of course shouldn't be allowed, as a backup nexthop can't
have multiple label stacks. When that happens, we should just ignore
the new repair list if one is already applied, instead of asserting
and crashing the daemon.

[1] One scenario this can happen is when there's ECMP involving
different P-nodes in the PQ-space intersection.

Reported-by: Fredi Raspall <fredi@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agodoc: improve documentation of the IS-IS fast reroute commands
Renato Westphal [Thu, 25 Feb 2021 17:40:34 +0000 (14:40 -0300)]
doc: improve documentation of the IS-IS fast reroute commands

* Clarify which commands are applicable to which flavors of LFA;
* Explain the default prefix priority for different prefix types;
* Rearrange some command descriptions so that they appear in this
  order: local LFA, remote LFA and then TI-LFA.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoMerge pull request #8157 from kuldeepkash/multicast_pim_bsm
Mark Stapp [Fri, 26 Feb 2021 16:48:17 +0000 (11:48 -0500)]
Merge pull request #8157 from kuldeepkash/multicast_pim_bsm

tests: Fix for blackhole test in test_mcast_pim_bsmp suite

3 years agotests: Fix for blackhole test in test_mcast_pim_bsmp suite
Kuldeep Kashyap [Fri, 26 Feb 2021 07:49:58 +0000 (23:49 -0800)]
tests: Fix for blackhole test in test_mcast_pim_bsmp suite

1. Fixed for blackhole test in test_mcast_pim_bsmp suite

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoMerge pull request #8139 from volta-networks/fix_ospf6_show_database
Donald Sharp [Thu, 25 Feb 2021 11:34:52 +0000 (06:34 -0500)]
Merge pull request #8139 from volta-networks/fix_ospf6_show_database

ospf6d: fix display of unknown LSAs in show ipv6 ospf6 database command

3 years agoMerge pull request #8025 from AnuradhaKaruppiah/lacp-bypass
Patrick Ruddy [Thu, 25 Feb 2021 09:26:11 +0000 (09:26 +0000)]
Merge pull request #8025 from AnuradhaKaruppiah/lacp-bypass

bgp, zebra: Support for lacp bypass with EVPN-MH

3 years agoMerge pull request #8146 from qlyoung/doc-fix-tracing-indent
Donatas Abraitis [Thu, 25 Feb 2021 07:54:50 +0000 (09:54 +0200)]
Merge pull request #8146 from qlyoung/doc-fix-tracing-indent

doc: fix indent depth in tracing doc

3 years agoMerge pull request #8148 from qlyoung/fix-pim-nb-static-mroute-loop-check
Jafar Al-Gharaibeh [Wed, 24 Feb 2021 23:50:57 +0000 (17:50 -0600)]
Merge pull request #8148 from qlyoung/fix-pim-nb-static-mroute-loop-check

pimd: do static mroute loop check in NB VALIDATE

3 years agopimd: do static mroute loop check in NB VALIDATE
Quentin Young [Wed, 24 Feb 2021 22:57:26 +0000 (17:57 -0500)]
pimd: do static mroute loop check in NB VALIDATE

We can proactively check whether this mroute will be nacked by loopfree
MFC checks so let's do it in the apply phase and emit a useful error
message.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #8128 from qlyoung/docs-cleanup
Mark Stapp [Wed, 24 Feb 2021 21:53:42 +0000 (16:53 -0500)]
Merge pull request #8128 from qlyoung/docs-cleanup

General docs cleanup

3 years agodoc: fix indent depth in tracing doc
Quentin Young [Wed, 24 Feb 2021 19:53:33 +0000 (14:53 -0500)]
doc: fix indent depth in tracing doc

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #7957 from idryzhov/ospf-instance
Quentin Young [Wed, 24 Feb 2021 18:30:10 +0000 (13:30 -0500)]
Merge pull request #7957 from idryzhov/ospf-instance

3 years agoMerge pull request #8023 from volta-networks/feat_add_agentx_enabled_hook
Quentin Young [Wed, 24 Feb 2021 18:24:33 +0000 (13:24 -0500)]
Merge pull request #8023 from volta-networks/feat_add_agentx_enabled_hook

lib: add agentx_enabled hook

3 years agodoc: more misc. cleanups
Quentin Young [Wed, 24 Feb 2021 18:06:26 +0000 (13:06 -0500)]
doc: more misc. cleanups

- Re-add wrongly removed ISIS commands
- Re-add distribution commands in BGP
- Remove nonexistent commands in pathd
- Fix typo in OSPF6
- Improve command defs in PIM

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agozebra: fix problem with bypass getting set accidentally on all ESs
Anuradha Karuppiah [Fri, 19 Feb 2021 01:49:20 +0000 (17:49 -0800)]
zebra: fix problem with bypass getting set accidentally on all ESs

This was caused because of uninitialized netlint attrs in the bond-member
netlink parse API.

PS: It was caught by the upstream topotests on ARM8 (passed everywhere
else).

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agotests: increase ping attempts in EVPN MH to fix failures on ARM
Anuradha Karuppiah [Tue, 16 Feb 2021 19:17:04 +0000 (11:17 -0800)]
tests: increase ping attempts in EVPN MH to fix failures on ARM

There are two fixes to handle slow convergence on ARM -
1. Ping on every re-try attempt to account for initial packet loss
2. Handle incomplete show outputs gracefully

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agobgpd: support for lacp bypass with EVPN MH
Anuradha Karuppiah [Tue, 11 Aug 2020 00:46:09 +0000 (17:46 -0700)]
bgpd: support for lacp bypass with EVPN MH

When a local ES is in LACP bypass state BGP doesn't advertise
reachability to it i.e. the Type-1/EAD-per-ES routes and Type-4
route for the ES is not advertised. This is the equivalent of
oper-down handling.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: del/add remote mac if there is a change from es->non-es dst and vicevera
Anuradha Karuppiah [Tue, 22 Sep 2020 13:16:52 +0000 (06:16 -0700)]
zebra: del/add remote mac if there is a change from es->non-es dst and vicevera

This is needed as kernel currently doesn't allow a mac replace if the dst
changes from a L2NHG to a single-VTEP and viceversa.

Ticket: CM-31561

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: flush macs linked to the bond when it moves out of bypass
Anuradha Karuppiah [Tue, 8 Sep 2020 16:23:04 +0000 (09:23 -0700)]
zebra: flush macs linked to the bond when it moves out of bypass

When a ES-bond is in bypass state MACs learnt on it are linked to the
access port instead of the ES. When LACP converges on the bond it moves
out of bypass and the MACs previously learnt on it are flushed to force
a re-learn on new traffic.

Ticket: CM-31326

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: link local MACs to destination port for efficient lacp-bypass processing
Anuradha Karuppiah [Tue, 8 Sep 2020 13:56:33 +0000 (06:56 -0700)]
zebra: link local MACs to destination port for efficient lacp-bypass processing

When an ES-bond comes out of bypass FRR needs to flush the local MACs learnt
while the bond was in bypass. To do that efficiently local MACs are linked
to the dest-access port. This only happens if the access-port is in
LACP-bypass or if it is non-ES.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: support for lacp bypass with EVPN MH
Anuradha Karuppiah [Wed, 5 Aug 2020 14:13:55 +0000 (07:13 -0700)]
zebra: support for lacp bypass with EVPN MH

Feature overview:
=================
A 802.3ad bond can be setup to allow lacp-bypass. This is done to enable
servers to pxe boot without a LACP license i.e. allows the bond to go oper
up (with a single link) without LACP converging.

If an ES-bond is oper-up in an "LACP-bypass" state MH treats it as a non-ES
bond. This involves the following special handling -
1. If the bond is in a bypass-state the associated ES is placed in a
bypass state.
2. If an ES is in a bypass state -
a. DF election is disabled (i.e. assumed DF)
b. SPH filter is not installed.
3. MACs learnt via the host bond are advertised with a zero ESI.
When the ES moves out of "bypass" the MACs are moved from a zero-ESI to
the correct non-zero id. This is treated as a local station move.

Implementation:
===============
When (a) an ES is detached from a hostbond or (b) an ES-bond goes into
LACP bypass zebra deletes all the local macs (with that ES as destination)
in the kernel and its local db. BGP re-sends any imported MAC-IP routes
that may exist with this ES destination as remote routes i.e. zebra can
end up programming a MAC that was perviously local as remote pointing
to a VTEP-ECMP group.

When an ES is attached to a hostbond or an ES-bond goes
LACP-up (out of bypss) zebra again deletes all the local macs in the
kernel and its local db. At this point BGP resends any imported MAC-IP
routes that may exist with this ES destination as sync routes i.e.
zebra can end up programming a MAC that was perviously remote
as local pointing to an access port.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agovtysh: fix show_per_daemon for multi-instance ospfd
Igor Ryzhov [Wed, 27 Jan 2021 23:41:42 +0000 (02:41 +0300)]
vtysh: fix show_per_daemon for multi-instance ospfd

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: don't rely on instance existence in vty
Igor Ryzhov [Wed, 27 Jan 2021 23:41:07 +0000 (02:41 +0300)]
ospfd: don't rely on instance existence in vty

Store instance index at startup and use it when processing vty commands.
The instance itself may be created and deleted by the user in runtime
using `[no] router ospf X` command.

Fixes #7908

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #7879 from AnuradhaKaruppiah/advertise-svi-mac
Patrick Ruddy [Wed, 24 Feb 2021 10:20:24 +0000 (10:20 +0000)]
Merge pull request #7879 from AnuradhaKaruppiah/advertise-svi-mac

evpn-mh: Advertise SVI MAC as a type-2 route if EVPN MH is enabled

3 years agodoc: add libelf to build docs
David Lamparter [Wed, 24 Feb 2021 06:15:38 +0000 (07:15 +0100)]
doc: add libelf to build docs

Signed-off-by: David Lamparter <equinox@diac24.net>