]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
4 years agofpm: use printfrr exts
David Lamparter [Fri, 12 Mar 2021 01:01:08 +0000 (02:01 +0100)]
fpm: use printfrr exts

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years ago*: fix printf extension types
David Lamparter [Fri, 12 Mar 2021 00:58:16 +0000 (01:58 +0100)]
*: fix printf extension types

Some mistakes have crept in again.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: Convert to builtin printf functionality
Donald Sharp [Wed, 10 Mar 2021 18:05:51 +0000 (13:05 -0500)]
lib: Convert to builtin printf functionality

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoospf6d: Convert to use builtin printf functionality
Donald Sharp [Wed, 10 Mar 2021 18:00:32 +0000 (13:00 -0500)]
ospf6d: Convert to use builtin printf functionality

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoeigrpd: Convert to using our builtin printf stuff
Donald Sharp [Wed, 10 Mar 2021 17:52:24 +0000 (12:52 -0500)]
eigrpd: Convert to using our builtin printf stuff

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopimd: Use builtin printf functionality
Donald Sharp [Wed, 10 Mar 2021 15:16:42 +0000 (10:16 -0500)]
pimd: Use builtin printf functionality

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobabeld: We do not need to put Warning into our warning messages
Donald Sharp [Wed, 10 Mar 2021 15:09:38 +0000 (10:09 -0500)]
babeld: We do not need to put Warning into our warning messages

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agosharpd: Convert over to using builtin printf functionality
Donald Sharp [Wed, 10 Mar 2021 15:03:22 +0000 (10:03 -0500)]
sharpd: Convert over to using builtin printf functionality

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #8244 from opensourcerouting/ci-fix-tests
Igor Ryzhov [Sun, 14 Mar 2021 17:05:26 +0000 (20:05 +0300)]
Merge pull request #8244 from opensourcerouting/ci-fix-tests

topotests: fix some recent test failures

4 years agotopotests: temporary disable test assert
Rafael Zalamena [Sun, 14 Mar 2021 13:15:20 +0000 (10:15 -0300)]
topotests: temporary disable test assert

The test has been failing often recently and it is causing some false
positives for unrelated PRs.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotests: remove some interface index check
Rafael Zalamena [Fri, 12 Mar 2021 20:33:23 +0000 (17:33 -0300)]
topotests: remove some interface index check

Don't expect the interface index to be always the same.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotests: remove some FRR version checks
Rafael Zalamena [Fri, 12 Mar 2021 20:32:12 +0000 (17:32 -0300)]
topotests: remove some FRR version checks

We version the tests with the source code so we should no longer attempt
to support old versions in development branch.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #8085 from volta-networks/isis_label_blocks
Olivier Dugeon [Fri, 12 Mar 2021 17:26:36 +0000 (18:26 +0100)]
Merge pull request #8085 from volta-networks/isis_label_blocks

isisd: configure SRGB and SRLB together

4 years agoMerge pull request #7827 from GalaxyGorilla/ospf_sr_topotests
Olivier Dugeon [Fri, 12 Mar 2021 16:36:07 +0000 (17:36 +0100)]
Merge pull request #7827 from GalaxyGorilla/ospf_sr_topotests

tests: enhance OSPF SR topotests

4 years agoMerge pull request #8241 from Jafaral/first_p
Igor Ryzhov [Fri, 12 Mar 2021 07:21:20 +0000 (10:21 +0300)]
Merge pull request #8241 from Jafaral/first_p

4 years agoRevert "zebra: Remove `first_p` which is never used"
Jafar Al-Gharaibeh [Fri, 12 Mar 2021 07:02:25 +0000 (01:02 -0600)]
Revert "zebra: Remove `first_p` which is never used"

This reverts commit 8617eb7c5ff9fe9ae1efb69af1493585d69a37f5.

4 years agoMerge pull request #8239 from donaldsharp/first_p
Jafar Al-Gharaibeh [Fri, 12 Mar 2021 05:20:39 +0000 (23:20 -0600)]
Merge pull request #8239 from donaldsharp/first_p

zebra: Remove `first_p` which is never used

4 years agozebra: Remove `first_p` which is never used
Donald Sharp [Fri, 12 Mar 2021 02:22:53 +0000 (21:22 -0500)]
zebra: Remove `first_p` which is never used

Remove dead code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #8223 from mjstapp/fix_pim_nb_sa
Jafar Al-Gharaibeh [Thu, 11 Mar 2021 16:27:32 +0000 (10:27 -0600)]
Merge pull request #8223 from mjstapp/fix_pim_nb_sa

pimd: fix coverity SA warning in pim_nb_config.c

4 years agoMerge pull request #8124 from pguibert6WIND/ipsec_iptable_dplane
Mark Stapp [Wed, 10 Mar 2021 21:43:15 +0000 (16:43 -0500)]
Merge pull request #8124 from pguibert6WIND/ipsec_iptable_dplane

zebra: move netfilter contexts to zebra dplane

4 years agoMerge pull request #8177 from Jafaral/nhrp-ev-handler
Quentin Young [Wed, 10 Mar 2021 21:35:55 +0000 (16:35 -0500)]
Merge pull request #8177 from Jafaral/nhrp-ev-handler

4 years agoMerge pull request #8227 from donaldsharp/flex_this
Mark Stapp [Wed, 10 Mar 2021 17:49:27 +0000 (12:49 -0500)]
Merge pull request #8227 from donaldsharp/flex_this

Start work to switch over to using our now built-in printf functionality

4 years agotools: add explicit licence phrase
Jafar Al-Gharaibeh [Fri, 5 Mar 2021 17:20:17 +0000 (11:20 -0600)]
tools: add explicit licence phrase

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agotools: example bash script client for the nhrpd event sock
Joe Maimon [Mon, 1 Mar 2021 17:34:50 +0000 (17:34 +0000)]
tools: example bash script client for the nhrpd event sock

Signed-off-by: Joe Maimon <jmaimon@jmaimon.com>
4 years agonhrp: enables the event system to interpret client results correctly
Joe Maimon [Mon, 1 Mar 2021 17:25:25 +0000 (17:25 +0000)]
nhrp: enables the event system to interpret client results correctly

Signed-off-by: Joe Maimon <jmaimon@jmaimon.com>
4 years agozebra: move ipset and ipset_entry to zebra dplane contexts
Philippe Guibert [Wed, 17 Feb 2021 10:43:52 +0000 (11:43 +0100)]
zebra: move ipset and ipset_entry to zebra dplane contexts

like it has been done for iptable contexts, a zebra dplane context is
created for each ipset/ipset entry event. The zebra_dplane_ctx job is
then enqueued and processed by separate thread. Like it has been done
for zebra_pbr_iptable context, the ipset and ipset entry contexts are
encapsulated into an union of structures in zebra_dplane_ctx.

There is a specificity in that when storing ipset_entry structure, there
was a backpointer pointer to the ipset structure that is necessary
to get some complementary information before calling the hook. The
proposal is to use an ipset_entry_info structure next to the ipset_entry,
in the zebra_dplane context. That information is used for ipset_entry
processing. The ipset name and the ipset type are the only fields
 necessary.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agonhrpd: Use our built-in printf functionality
Donald Sharp [Wed, 10 Mar 2021 12:25:49 +0000 (07:25 -0500)]
nhrpd: Use our built-in printf functionality

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotests: Replace ospf-sr-topo1 by ospf-sr-topo2
GalaxyGorilla [Wed, 10 Mar 2021 10:00:01 +0000 (10:00 +0000)]
tests: Replace ospf-sr-topo1 by ospf-sr-topo2

The new ospf-sr-topo2 tests are much broader and detailed,
hence it makes no sense to keep the old ospf-sr-topo1
tests.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agoMerge pull request #8224 from idryzhov/fix-bfd-detect-to
Rafael Zalamena [Wed, 10 Mar 2021 10:27:00 +0000 (10:27 +0000)]
Merge pull request #8224 from idryzhov/fix-bfd-detect-to

bfdd: fix detect timeout

4 years agotests: OSPF SR topotests (ospf-sr-topo2)
GalaxyGorilla [Thu, 24 Dec 2020 15:31:20 +0000 (15:31 +0000)]
tests: OSPF SR topotests (ospf-sr-topo2)

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agoisisd, yang, doc: combine config cmd for SRGB+SRLB
Emanuele Di Pascale [Tue, 9 Mar 2021 15:56:45 +0000 (16:56 +0100)]
isisd, yang, doc: combine config cmd for SRGB+SRLB

when changing both ranges at the same time the order of the commands
matters, as we need to make sure that the intermediate state is valid.
This represents a problem when pushing configuration via frr-reload.
To fix this, the global-block command was extended to optionally
allow setting the local-block range as well. The local-block command
is deprecated with a 1-year notice.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #8221 from mjstapp/fix_thread_xref_event
Donatas Abraitis [Wed, 10 Mar 2021 09:04:41 +0000 (11:04 +0200)]
Merge pull request #8221 from mjstapp/fix_thread_xref_event

lib: use correct type in add_event xref

4 years agoripd: Convert to using internal printf formatters
Donald Sharp [Wed, 10 Mar 2021 01:07:20 +0000 (20:07 -0500)]
ripd: Convert to using internal printf formatters

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoripngd: Convet to using internal printf modifiers
Donald Sharp [Wed, 10 Mar 2021 01:04:26 +0000 (20:04 -0500)]
ripngd: Convet to using internal printf modifiers

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agowatchfrr: Convert to not use warning in warning messages
Donald Sharp [Wed, 10 Mar 2021 01:02:26 +0000 (20:02 -0500)]
watchfrr: Convert to not use warning in warning messages

We do not need to display: `Warning: ...` in a zlog_warn
message

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoospfd: Convert to using proper string formatting
Donald Sharp [Wed, 10 Mar 2021 01:00:45 +0000 (20:00 -0500)]
ospfd: Convert to using proper string formatting

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Convert remaining string output to our internal types
Donald Sharp [Wed, 10 Mar 2021 00:50:42 +0000 (19:50 -0500)]
bgpd: Convert remaining string output to our internal types

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobfdd: fix detect timeout
Igor Ryzhov [Tue, 9 Mar 2021 20:08:41 +0000 (23:08 +0300)]
bfdd: fix detect timeout

RFC 5880 Section 6.8.4:

In Asynchronous mode, the Detection Time calculated in the local
system is equal to the value of Detect Mult received from the remote
system, multiplied by the agreed transmit interval of the remote
system (the greater of bfd.RequiredMinRxInterval and the last
received Desired Min TX Interval).

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agopimd: fix coverity SA warning in pim_nb_config.c
Mark Stapp [Tue, 9 Mar 2021 19:36:58 +0000 (14:36 -0500)]
pimd: fix coverity SA warning in pim_nb_config.c

Fix a coverity warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: use correct type in add_event xref
Mark Stapp [Tue, 9 Mar 2021 18:41:58 +0000 (13:41 -0500)]
lib: use correct type in add_event xref

the add_event api xref should use THREAD_EVENT, rather than
THREAD_TIMER.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #8217 from Orange-OpenSource/ospf_sr
Mark Stapp [Tue, 9 Mar 2021 17:23:33 +0000 (12:23 -0500)]
Merge pull request #8217 from Orange-OpenSource/ospf_sr

ospfd: Correct Segment Routing prefix bugs

4 years agoMerge pull request #8219 from mjstapp/fix_babel_doc_dup
Rafael Zalamena [Tue, 9 Mar 2021 17:20:25 +0000 (17:20 +0000)]
Merge pull request #8219 from mjstapp/fix_babel_doc_dup

doc: remove duplicate entry from babeld doc

4 years agoMerge pull request #8123 from gromit1811/fix_topotest_ipv6_linklocal
Russ White [Tue, 9 Mar 2021 16:25:10 +0000 (11:25 -0500)]
Merge pull request #8123 from gromit1811/fix_topotest_ipv6_linklocal

tests: Fix determination of IPv6 link-local addresses

4 years agoMerge pull request #8138 from ckishimo/ospfv3_prefix
Russ White [Tue, 9 Mar 2021 15:56:54 +0000 (10:56 -0500)]
Merge pull request #8138 from ckishimo/ospfv3_prefix

ospf6d: fix LSA prefix options

4 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

4 years agodoc: remove duplicate entry from babeld doc
Mark Stapp [Tue, 9 Mar 2021 13:37:47 +0000 (08:37 -0500)]
doc: remove duplicate entry from babeld doc

Remove a duplicated entry from the babeld doc.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 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

4 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

4 years agoospfd: Correct Segment Routing prefix bugs
Olivier Dugeon [Tue, 9 Mar 2021 10:00:32 +0000 (11:00 +0100)]
ospfd: Correct Segment Routing prefix bugs

This patch solves 2 Segment Routing prefix bugs:

- If Segment Routing is not enabled in the initial configuration, Extended
  Prefix Opaque LSA is not flood. This is due to a control flag which is
  set only when Segment Routing is enabled at startup and not latter.
- Attempting to modify Segment Routing prefix flag e.g. adding or removing
  no-php or explicit-null flag, doesn't work as expected: Corresponding entry
  in the MPLS table is not updated, Extended Prefix Opaque LSA carry wrong flag
  value, and neighbor set a wrong configuration in the MPLS table for this
  Segment Routing prefix.

The first bug is corrected in ospfd/ospf_ext.c:

- Flag setting is moved from ospf_ext_ism_change() to set_ext_prefix() function

The seconf one is corrected in ospfd/ospf_sr.c:

- For self node, previous MPLS entry is removed if needed and flag reset before
  setting the new Segment Routing prefix configuration
- For neighbor node, srnext field of sr_prefix structure is always set and not
  only for new SR Prefix.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 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

4 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

4 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

4 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

4 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

4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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

4 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

4 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

4 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>
4 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>
4 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>
4 years agozebra: move iptable handling in zebra_dplane
Philippe Guibert [Tue, 16 Feb 2021 14:29:29 +0000 (15:29 +0100)]
zebra: move iptable handling in zebra_dplane

The iptable processing was not handled in remote dataplane, and was
directly processed by the thread in charge of zapi calls. Now that call
can be handled in the zebra_dplane separate thread. once a
zebra_dplane_ctx is allocated for iptable handling, the hook call is
performed later. Subsequently, a return code may be triggered to zclient
interface if any problem occurs when calling the hook call.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 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

4 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

4 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>
4 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>
4 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

4 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>
4 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

4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 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

4 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>
4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 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

4 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

4 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

4 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>
4 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]"