]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 years agoMerge pull request #8661 from donaldsharp/more_privs
Mark Stapp [Wed, 12 May 2021 11:54:14 +0000 (07:54 -0400)]
Merge pull request #8661 from donaldsharp/more_privs

lib: Add ZCAP_IPC_LOCK

3 years agoMerge pull request #8660 from qlyoung/fix-bgp-conditional-advertisement-deconfig...
Donatas Abraitis [Wed, 12 May 2021 09:57:50 +0000 (12:57 +0300)]
Merge pull request #8660 from qlyoung/fix-bgp-conditional-advertisement-deconfig-removing-unrelated-filters

bgpd: fix deconfig of conditional advertisement

3 years agoMerge pull request #8629 from donaldsharp/parse_rtattr
Igor Ryzhov [Wed, 12 May 2021 08:38:09 +0000 (11:38 +0300)]
Merge pull request #8629 from donaldsharp/parse_rtattr

Parse rtattr

3 years agoMerge pull request #8509 from volta-networks/pathd_ls_client
Olivier Dugeon [Wed, 12 May 2021 07:42:56 +0000 (09:42 +0200)]
Merge pull request #8509 from volta-networks/pathd_ls_client

pathd: Traffic Engineering Database support

3 years agoMerge pull request #8622 from volta-networks/fix_ospf6_max_if_addr
Russ White [Wed, 12 May 2021 02:04:07 +0000 (22:04 -0400)]
Merge pull request #8622 from volta-networks/fix_ospf6_max_if_addr

ospf6d: Limit the number of interface addresses being supported in ospfv3

3 years agozebra: Consolidate on 1 function netlink_parse_rattr_nested
Donald Sharp [Wed, 5 May 2021 03:48:17 +0000 (23:48 -0400)]
zebra: Consolidate on 1 function netlink_parse_rattr_nested

if_netlink.c created it's on nested parsing #define which
is identical to netlink_parse_rtattr_nested.  Consolidate
on one instead of having this duality.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: memset the `struct rtattr *tb[SIZE]` in setting function
Donald Sharp [Wed, 5 May 2021 03:43:47 +0000 (23:43 -0400)]
zebra: memset the `struct rtattr *tb[SIZE]` in setting function

In order to parse the netlink message into the
`struct rtattr *tb[size]` it is assumed that the buffer is
memset to 0 before the parsing.  As such if you attempt
to read a value that was not returned in the message
you will not crash when you test for it.

The code has places were we memset it and places where we don't.
This *will* lead to crashes when the kernel changes.  In
our parsing routines let's have them memset instead of having
to remember to do it pre pass in to the parser.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Add ZCAP_IPC_LOCK
Donald Sharp [Tue, 11 May 2021 23:50:07 +0000 (19:50 -0400)]
lib: Add ZCAP_IPC_LOCK

We'll need ZCAP_IPC_LOCK for future work coming down the pike
related to dataplane work being done.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: fix deconfig of conditional advertisement
Quentin Young [Tue, 11 May 2021 20:58:38 +0000 (16:58 -0400)]
bgpd: fix deconfig of conditional advertisement

Deconfiguring conditional advertisement resulted in all other policy
settings on the peer getting removed due to an excessively large memset.

This also created a desync with the northbound config tree, which caused
its own set of problems...

Fix the memset to just remove the conditional advertisement config.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoospf6d: document the interface address limits for ospfv3
lynne [Tue, 11 May 2021 13:10:10 +0000 (09:10 -0400)]
ospf6d: document the interface address limits for ospfv3

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
3 years agoospf6d: Limit the number of interface addresses being supported
lynne [Tue, 4 May 2021 15:06:49 +0000 (11:06 -0400)]
ospf6d: Limit the number of interface addresses being supported

The code had no limits on addresses configured on an interface running
ospf6d.  The code would crash when more than 100 addresses were added.
This change limits the number of interface address to 100 if mtu is set
to the default value.  If the mtu is set to a jumbo packet size or larger
we will support 200 interface addresses.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
3 years agoMerge pull request #8652 from ton31337/fix/doc_bgp_alias
Igor Ryzhov [Tue, 11 May 2021 13:11:46 +0000 (16:11 +0300)]
Merge pull request #8652 from ton31337/fix/doc_bgp_alias

doc: Move BGP community alias under a separate section

3 years agoMerge pull request #8589 from idryzhov/bgp-cli-nb-fixes
Russ White [Tue, 11 May 2021 11:58:23 +0000 (07:58 -0400)]
Merge pull request #8589 from idryzhov/bgp-cli-nb-fixes

bgp cli/nb fixes

3 years agoMerge pull request #8650 from idryzhov/bgp-fix-redist
Russ White [Tue, 11 May 2021 11:28:42 +0000 (07:28 -0400)]
Merge pull request #8650 from idryzhov/bgp-fix-redist

bgpd: fix redistribution in vrf

3 years agodoc: Move BGP community alias under a separate section
Donatas Abraitis [Mon, 10 May 2021 06:18:54 +0000 (09:18 +0300)]
doc: Move BGP community alias under a separate section

There are more useful CLI commands comming, thus it's desired to have it's
own section.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8406 from adharkar/frr-es_rd
Russ White [Tue, 11 May 2021 10:51:41 +0000 (06:51 -0400)]
Merge pull request #8406 from adharkar/frr-es_rd

bgpd: Handle EAD/EVI local route updates on VNI RD change

3 years agopathd. Pathd TED support . Documentation update - [part 4/4]
Javier Garcia [Thu, 22 Apr 2021 14:09:54 +0000 (16:09 +0200)]
pathd. Pathd TED support . Documentation update - [part 4/4]

    - As an example of pathd and igp (ospfd) config:

    ! igp ospfv2 snippet
    interface eth0
     ip ospf network point-to-point
    !
    router ospf$
     mpls-te on
     mpls-te export
     ...

    !pathd snippet
    segment-routing
     traffic-eng
      mpls-te on
      mpls-te import ospfv2

      segment-list sl-1
      index 10  nai adjacency 10.1.2.11 10.1.2.1
      index 20  nai adjacency 10.1.20.1 10.1.20.2
      index 30  nai adjacency 10.2.5.2 10.2.5.5
      !
      policy color 5 endpoint 10.10.10.5
      name five
      binding-sid 5555
      candidate-path preference 600 name cp51 explicit segment-list sl-1
      candidate-path preference 500 name cp52-dyn dynamic

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agopathd. TED support . Topotest - [part 3/4]
Javier Garcia [Thu, 22 Apr 2021 14:08:52 +0000 (16:08 +0200)]
pathd. TED support . Topotest - [part 3/4]

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agopathd. TED support . Validation of candidate path - [part 2/4]
Javier Garcia [Thu, 22 Apr 2021 14:04:42 +0000 (16:04 +0200)]
pathd. TED support . Validation of candidate path - [part 2/4]

    - Explicit segment list nai will be resolved to corresponded sid.
    - Dynamic segment list (from pce) will be validated.
    - If segment list could not be resolved or validated won't be used.
    - Now this new config is supported

segment-list sl-1
 index 10  nai prefix 10.1.2.1/32 iface 1
 index 30  nai adjacency 10.2.5.2 10.2.5.5
 index 40  nai prefix 10.10.10.5/32 algorithm 0

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agoMerge pull request #8648 from idryzhov/fix-test-assert
David Lamparter [Mon, 10 May 2021 10:52:21 +0000 (12:52 +0200)]
Merge pull request #8648 from idryzhov/fix-test-assert

tests: fix build warning

3 years agopathd. TED support . Client to link State - [part 1/4]
Javier Garcia [Thu, 22 Apr 2021 13:52:27 +0000 (15:52 +0200)]
pathd. TED support . Client to link State - [part 1/4]

    - pathd will act as a client to for the configured igp.
    - pathd must be configured to activate and receive data from igp.

    !pathd config snippet
    segment-routing
     traffic-eng
      mpls-te on
      mpls-te import ospfv2

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agobgpd: deregister bgp instance from zebra when vrf is deleted
Igor Ryzhov [Sun, 9 May 2021 22:22:34 +0000 (01:22 +0300)]
bgpd: deregister bgp instance from zebra when vrf is deleted

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8639 from idryzhov/isis-new-bfd-lib
Rafael Zalamena [Sun, 9 May 2021 20:10:42 +0000 (17:10 -0300)]
Merge pull request #8639 from idryzhov/isis-new-bfd-lib

isisd: rework BFD integration

3 years agoRevert "bgpd: vrf route leaking, fix vrf redistribute"
Igor Ryzhov [Sun, 9 May 2021 19:28:36 +0000 (22:28 +0300)]
Revert "bgpd: vrf route leaking, fix vrf redistribute"

This reverts commit 6b2433c63f7fd3027cea8e06ca45f85bd3eea6f2.

3 years agoMerge pull request #8627 from volta-networks/fix_pceplib_scan_build
David Lamparter [Sun, 9 May 2021 18:25:24 +0000 (20:25 +0200)]
Merge pull request #8627 from volta-networks/fix_pceplib_scan_build

pceplib. Clean scan-build static analyzer messages.

3 years agoMerge pull request #8441 from mjstapp/fix_topo_pylint1
David Lamparter [Sun, 9 May 2021 17:48:33 +0000 (19:48 +0200)]
Merge pull request #8441 from mjstapp/fix_topo_pylint1

3 years agoMerge pull request #8626 from idryzhov/fix-isis-topo1
David Lamparter [Sun, 9 May 2021 17:46:01 +0000 (19:46 +0200)]
Merge pull request #8626 from idryzhov/fix-isis-topo1

tests: fix isis-topo1 topologies

3 years agoMerge branch 'pull/8563'
David Lamparter [Sun, 9 May 2021 17:38:24 +0000 (19:38 +0200)]
Merge branch 'pull/8563'

w/ style fix to speed things along

3 years agozebra: fix style warnings in previous commits
David Lamparter [Sun, 9 May 2021 17:37:12 +0000 (19:37 +0200)]
zebra: fix style warnings in previous commits

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #8631 from dslicenc/pimd-timer-fix
David Lamparter [Sun, 9 May 2021 17:31:36 +0000 (19:31 +0200)]
Merge pull request #8631 from dslicenc/pimd-timer-fix

3 years agoMerge pull request #8380 from mjstapp/nexthop_cmp_basic
David Lamparter [Sun, 9 May 2021 17:29:45 +0000 (19:29 +0200)]
Merge pull request #8380 from mjstapp/nexthop_cmp_basic

3 years agoMerge pull request #8642 from idryzhov/bgp-gr-no-oper
David Lamparter [Sun, 9 May 2021 17:24:10 +0000 (19:24 +0200)]
Merge pull request #8642 from idryzhov/bgp-gr-no-oper

bgpd: don't return error for GR no-op commands

3 years agoMerge pull request #8640 from pjdruddy/fix-bgp-auth-key-error
David Lamparter [Sun, 9 May 2021 17:22:55 +0000 (19:22 +0200)]
Merge pull request #8640 from pjdruddy/fix-bgp-auth-key-error

tests: fix intermittent key error in bgp-auth topotest

3 years agoMerge pull request #8472 from donaldsharp/more_valgrind_stuff
David Lamparter [Sun, 9 May 2021 17:20:47 +0000 (19:20 +0200)]
Merge pull request #8472 from donaldsharp/more_valgrind_stuff

tools: Add some more data to ignore for valgrind

3 years agotests: fix build warning
Igor Ryzhov [Sun, 9 May 2021 15:23:43 +0000 (18:23 +0300)]
tests: fix build warning

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8634 from idryzhov/ospf-vrf-redist
Mark Stapp [Fri, 7 May 2021 19:22:19 +0000 (15:22 -0400)]
Merge pull request #8634 from idryzhov/ospf-vrf-redist

ospf redistribution fixes

3 years agoMerge pull request #8347 from volta-networks/fix_ospv6_filter_debug
Russ White [Fri, 7 May 2021 18:27:01 +0000 (14:27 -0400)]
Merge pull request #8347 from volta-networks/fix_ospv6_filter_debug

ospf6d: Fix when an "export-list" or "filter-list out" is configured

3 years agoospfd: free "default-information originate" config when removing router
Igor Ryzhov [Fri, 7 May 2021 15:10:01 +0000 (18:10 +0300)]
ospfd: free "default-information originate" config when removing router

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8632 from wesleycoakley/le-32-128-fix
Igor Ryzhov [Fri, 7 May 2021 09:05:59 +0000 (12:05 +0300)]
Merge pull request #8632 from wesleycoakley/le-32-128-fix

lib: ip prefix-list "le" and "ge" bug squish

3 years agolib: remove old bfd library
Igor Ryzhov [Thu, 6 May 2021 12:17:11 +0000 (15:17 +0300)]
lib: remove old bfd library

This commit also adds missing `bfd_protocol_integration_set_shutdown` to
ospf6d and pimd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix bfd config output
Igor Ryzhov [Thu, 6 May 2021 12:00:36 +0000 (15:00 +0300)]
isisd: fix bfd config output

Don't show default BFD config ("no isis bfd") if show_enabled flag is not set.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: enable autocompletion for bfd profiles
Igor Ryzhov [Thu, 6 May 2021 11:54:54 +0000 (14:54 +0300)]
isisd: enable autocompletion for bfd profiles

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix "no bfd profile" command
Igor Ryzhov [Thu, 6 May 2021 11:54:37 +0000 (14:54 +0300)]
isisd: fix "no bfd profile" command

Instead of setting the profile to an empty string we should destroy the
NB node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: rework BFD integration
Igor Ryzhov [Thu, 6 May 2021 11:44:05 +0000 (14:44 +0300)]
isisd: rework BFD integration

Rewrite the BFD integration code to use the new library.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8581 from qlyoung/bgp-fix-last-reset-buffer-size
Donatas Abraitis [Thu, 6 May 2021 19:31:09 +0000 (22:31 +0300)]
Merge pull request #8581 from qlyoung/bgp-fix-last-reset-buffer-size

bgpd: rework BGP_MAX_PACKET_SIZE & friends

3 years agobgpd: don't return error for GR no-op commands
Igor Ryzhov [Thu, 6 May 2021 18:33:14 +0000 (21:33 +0300)]
bgpd: don't return error for GR no-op commands

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: ip prefix-list enforce expected ge le behavior
Wesley Coakley [Wed, 5 May 2021 14:28:53 +0000 (10:28 -0400)]
lib: ip prefix-list enforce expected ge le behavior

When specifying only an "le" for an existing ip prefix-list qualified with
both an "le" and "ge" make sure to remove the "ge" property so it does
not stay in the tree.

E.g. Saying these two things in order:

ip prefix-list test seq 1 permit 1.1.0.0/16 ge 18 le 24
ip prefix-list test seq 1 permit 1.1.0.0/16 ge 18

... should result in the second statement "overwriting" the first like
this:

vxdev-arch# do show ip prefix-list
ZEBRA: ip prefix-list foobar: 3 entries
   seq 1 permit 15.0.0.0/16 ge 18

Previously this did not happen and "le" would stick around since it was
never given NB_OP_DESTROY and purged from the data tree.

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agotools: stop frr-reload squashing le 32 / le 128
Wesley Coakley [Thu, 6 May 2021 16:31:37 +0000 (12:31 -0400)]
tools: stop frr-reload squashing le 32 / le 128

frr-reload no longer consolidates ip prefix-list "le 32" or "le 128"
rules when a "ge" is present, more accurately representing existing user
config and reflecting also what is accepted in CLI.

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agobgpd: rework BGP_MAX_PACKET_SIZE & friends
Quentin Young [Tue, 27 Apr 2021 20:20:27 +0000 (16:20 -0400)]
bgpd: rework BGP_MAX_PACKET_SIZE & friends

BGP_MAX_PACKET_SIZE no longer represented the absolute maximum BGP
packet size as it did before, instead it was defined as 4096 bytes,
which is the maximum unless extended message capability is negotiated,
in which case the maximum goes to 65k.

That introduced at least one bug - last_reset_cause was undersized for
extended messages, and when sending an extended message > 4096 bytes
back to a peer as part of NOTIFY data would trigger a bounds check
assert.

This patch redefines the macro to restore its previous meaning,
introduces a new macro - BGP_STANDARD_MESSAGE_MAX_PACKET_SIZE - to
represent the 4096 byte size, and renames the extended size to
BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE for consistency. Code locations
that definitely should use the small size have been updated, locations
that semantically always need whatever the max is, no matter what that
is, use BGP_MAX_PACKET_SIZE.

BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE should only be used as a constant
when storing what the negotiated max size is for use at runtime and to
define BGP_MAX_PACKET_SIZE. Unless there is a future standard that
introduces a third valid size it should not be used for any other
purpose.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #8638 from ton31337/fix/bgp_doc
Quentin Young [Thu, 6 May 2021 14:24:50 +0000 (14:24 +0000)]
Merge pull request #8638 from ton31337/fix/bgp_doc

doc: Remove trailing whitespaces and fix WARNING: Error in "code-block"

3 years agotests: fix intermittent key error in bgp-auth topotest
Pat Ruddy [Thu, 6 May 2021 13:36:52 +0000 (14:36 +0100)]
tests: fix intermittent key error in bgp-auth topotest

There is a rare case where with prefix peers the peer is
completely absent from the json output when checking the
peer state resulting in a python key error. Check key exists
before checking the state.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoMerge pull request #8636 from idryzhov/ospfv3-vrf-support
Rafael Zalamena [Thu, 6 May 2021 11:50:32 +0000 (08:50 -0300)]
Merge pull request #8636 from idryzhov/ospfv3-vrf-support

OSPFv3 VRF support

3 years agodoc: Remove trailing whitespaces and fix WARNING: Error in "code-block"
Donatas Abraitis [Thu, 6 May 2021 11:09:10 +0000 (14:09 +0300)]
doc: Remove trailing whitespaces and fix WARNING: Error in "code-block"

maximum 1 argument(s) allowed, 56 supplied.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8497 from ton31337/feature/bgp_community_alias
Donald Sharp [Thu, 6 May 2021 10:07:07 +0000 (06:07 -0400)]
Merge pull request #8497 from ton31337/feature/bgp_community_alias

bgpd: Create BGP alias names for community/large-community

3 years agodoc: update ospf6d for vrf support
Igor Ryzhov [Wed, 5 May 2021 20:40:13 +0000 (23:40 +0300)]
doc: update ospf6d for vrf support

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: add topotest for ospf6d vrf support
harios_niral [Wed, 5 May 2021 20:19:31 +0000 (23:19 +0300)]
tests: add topotest for ospf6d vrf support

Co-authored-by: Kaushik Nath <kaushiknath.null@gmail.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
3 years agoospf6d: add vty support for multiple vrfs
harios_niral [Wed, 5 May 2021 20:19:01 +0000 (23:19 +0300)]
ospf6d: add vty support for multiple vrfs

Co-authored-by: Kaushik Nath <kaushiknath.null@gmail.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
3 years agoMerge pull request #8635 from pjdruddy/fix_isis_snmp_clang
Igor Ryzhov [Wed, 5 May 2021 21:56:04 +0000 (00:56 +0300)]
Merge pull request #8635 from pjdruddy/fix_isis_snmp_clang

isisd: fix clang-11 warnings in snmp code

3 years agoospf6d: add internal support for multiple vrfs
harios_niral [Wed, 5 May 2021 20:17:01 +0000 (23:17 +0300)]
ospf6d: add internal support for multiple vrfs

Co-authored-by: Kaushik Nath <kaushiknath.null@gmail.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
3 years agoisisd: fix clang-11 warnings in snmp code
Pat Ruddy [Wed, 5 May 2021 16:35:40 +0000 (17:35 +0100)]
isisd: fix clang-11 warnings in snmp code

fix a number of SA errors thrown up by the newer clang

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospfd: fix redistribution config when vrf doesn't exist
Igor Ryzhov [Wed, 5 May 2021 16:26:19 +0000 (19:26 +0300)]
ospfd: fix redistribution config when vrf doesn't exist

Currently ospfd relies on vrf bitmaps in zclient to check that the
redistribution is configured. This doesn't work when the VRF for OSPF
instance doesn't exist yet, because vrf bitmaps ignore VRF_UNKNOWN id.

Because of this, the following problems occur when the VRF doesn't exist:
- repeated "redistribute smth" command is processed as a first-time
  instead of an update
- "no redistribute smth" doesn't work at all

This commit fixes both issues by relying on internal redistribution
config instead of zclient vrf bitmaps.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: deregister vrf from zebra when vrf is disabled
Igor Ryzhov [Wed, 5 May 2021 14:25:15 +0000 (17:25 +0300)]
ospfd: deregister vrf from zebra when vrf is disabled

Currently the VRF is deregistered only when it is re-enabled again.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8630 from donaldsharp/max_port
Igor Ryzhov [Wed, 5 May 2021 16:27:18 +0000 (19:27 +0300)]
Merge pull request #8630 from donaldsharp/max_port

bgpd: Another call path with uninited data

3 years agoMerge pull request #8598 from idryzhov/fix-topotest-bgp-auth
Donald Sharp [Wed, 5 May 2021 15:17:37 +0000 (11:17 -0400)]
Merge pull request #8598 from idryzhov/fix-topotest-bgp-auth

tests: fix bgp-auth topotest

3 years agotools: Add some more data to ignore for valgrind
Donald Sharp [Wed, 14 Apr 2021 14:56:34 +0000 (10:56 -0400)]
tools: Add some more data to ignore for valgrind

When running valgrind there are some possible memory leaks.
These memory leaks we have absolutely no control over, mark
them as not worthy of being reported.

Finally move the valgrind suppressions file from bgpd/ to tools/
this is because this suppressions file can be used beyond bgpd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Reduce per vrf memory usage from hash table creation
Donald Sharp [Mon, 26 Apr 2021 13:34:41 +0000 (09:34 -0400)]
zebra: Reduce per vrf memory usage from hash table creation

When creating a large number of vrf's we are creating a fairly
large number of hash tables per vrf.  Reduce memory usage on
startup as well as let us identify the table these things come
from.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Reduce size of vni hash tables to a more reasonable start size
Donald Sharp [Mon, 26 Apr 2021 13:24:48 +0000 (09:24 -0400)]
zebra: Reduce size of vni hash tables to a more reasonable start size

We are creating 2 hash tables per vni in zebra.  Once we start to
scale the number of vni's we start to see some serious memory
usage in zebra.  Let's reduce the memory usage at startup
for scale of vni's.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Add some ability to know what hash is for what vni
Donald Sharp [Mon, 26 Apr 2021 13:21:43 +0000 (09:21 -0400)]
zebra: Add some ability to know what hash is for what vni

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Allow the zvrf to know it's vrf when allocing
Donald Sharp [Mon, 26 Apr 2021 13:47:39 +0000 (09:47 -0400)]
zebra: Allow the zvrf to know it's vrf when allocing

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Check if `bgp community alias NAME ALIAS` commands works
Donatas Abraitis [Wed, 21 Apr 2021 19:35:13 +0000 (22:35 +0300)]
tests: Check if `bgp community alias NAME ALIAS` commands works

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agodoc: Add `bgp community alias NAME ALIAS` command
Donatas Abraitis [Wed, 21 Apr 2021 19:34:44 +0000 (22:34 +0300)]
doc: Add `bgp community alias NAME ALIAS` command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Create BGP alias names for community/large-community
Donatas Abraitis [Wed, 21 Apr 2021 19:34:12 +0000 (22:34 +0300)]
bgpd: Create BGP alias names for community/large-community

Show alias name instead of numerical value in `show bgp <prefix>. E.g.:

```
root@exit1-debian-9:~/frr# vtysh -c 'sh run' | grep 'bgp community alias'
bgp community alias 65001:123 community-1
bgp community alias 65001:123:1 lcommunity-1
root@exit1-debian-9:~/frr#
```

```
exit1-debian-9# sh ip bgp 172.16.16.1/32
BGP routing table entry for 172.16.16.1/32, version 21
Paths: (2 available, best #2, table default)
  Advertised to non peer-group peers:
  65030
    192.168.0.2 from home-spine1.donatas.net(192.168.0.2) (172.16.16.1)
      Origin incomplete, metric 0, valid, external, best (Neighbor IP)
      Community: 65001:12 65001:13 community-1 65001:65534
      Large Community: lcommunity-1 65001:123:2
      Last update: Fri Apr 16 12:51:27 2021
exit1-debian-9#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agopimd: adjust rp_keep_alive_time when register_suppress_time is changed
Don Slice [Fri, 23 Apr 2021 13:44:02 +0000 (06:44 -0700)]
pimd: adjust rp_keep_alive_time when register_suppress_time is changed

The router->register_suppress_time is used to derive the
rp_keep_alive_time, but when the suppress time was changed, pim was
not recalculating the rp_keep_alive_time and left it at the old value.
This fix applies the changes when a new suppress_time is entered
(or removed.)

Signed-off-by: Don Slice <dslice@nvidia.com>
3 years agopimd: stop displaying global parameters in each vrf
Don Slice [Mon, 3 May 2021 18:59:01 +0000 (14:59 -0400)]
pimd: stop displaying global parameters in each vrf

Problem reported that when certain pim commands were entered, they
showed up duplicated in the configuration both under default instance
and every vrf (whether pim was used there or not.) This was because
these particular parameters are global only and the function doing
the display would repeat for each vrf. This fix only displays those
in the default case (and removes them from the help for entering
under a vrf.)

Signed-off-by: Don Slice <dslice@nvidia.com>
3 years agoMerge pull request #8619 from donaldsharp/sharp_redistribute
Mark Stapp [Wed, 5 May 2021 12:01:40 +0000 (08:01 -0400)]
Merge pull request #8619 from donaldsharp/sharp_redistribute

sharpd: add v4 redistribute watching

3 years agoMerge pull request #8237 from pguibert6WIND/nhrp_use_zebra_2
Mark Stapp [Wed, 5 May 2021 11:57:04 +0000 (07:57 -0400)]
Merge pull request #8237 from pguibert6WIND/nhrp_use_zebra_2

Nhrp use zebra 2

3 years agobgpd: Another call path with uninited data
Donald Sharp [Wed, 5 May 2021 11:48:55 +0000 (07:48 -0400)]
bgpd: Another call path with uninited data

Prevent another call path that uses uninited data in
bgp_pbr.c

This was found through more clang sa runs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8564 from rameshabhinay/bgp_tcp_mss
Donatas Abraitis [Wed, 5 May 2021 10:45:39 +0000 (13:45 +0300)]
Merge pull request #8564 from rameshabhinay/bgp_tcp_mss

bgpd: Support tcp-mss for bgp neighbors

3 years agopceplib: Clean scan-build static analyzer messages.
Javier Garcia [Wed, 5 May 2021 09:56:08 +0000 (11:56 +0200)]
pceplib: Clean scan-build static analyzer messages.

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agotests: fix isis-topo1 topologies
Igor Ryzhov [Wed, 5 May 2021 09:26:07 +0000 (12:26 +0300)]
tests: fix isis-topo1 topologies

parse_topology function doesn't correctly process vertex types with
spaces. Therefore the reference topology files are completely messed up,
we have values in incorrect fields - types in metrics, metrics in
parents, etc.

This commit fixes the parsing function and the reference files.

The same fix was done for isis-topo1-vrf in #8365.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8459 from taspelund/no_rmac_on_mac_only
Patrick Ruddy [Wed, 5 May 2021 08:48:11 +0000 (09:48 +0100)]
Merge pull request #8459 from taspelund/no_rmac_on_mac_only

bgpd: Fix IP-VRF ext-comm check for MACIP routes

3 years agoMerge pull request #8625 from c-po/graceful-restart
Igor Ryzhov [Wed, 5 May 2021 06:44:25 +0000 (09:44 +0300)]
Merge pull request #8625 from c-po/graceful-restart

3 years agoMerge pull request #8040 from donaldsharp/fix_distribute
Igor Ryzhov [Wed, 5 May 2021 00:40:39 +0000 (03:40 +0300)]
Merge pull request #8040 from donaldsharp/fix_distribute

3 years agoMerge pull request #8551 from donaldsharp/peer_damp_doppleganger
Igor Ryzhov [Wed, 5 May 2021 00:39:40 +0000 (03:39 +0300)]
Merge pull request #8551 from donaldsharp/peer_damp_doppleganger

3 years agoMerge pull request #8618 from Prerana-GB/lcom
Igor Ryzhov [Tue, 4 May 2021 21:46:30 +0000 (00:46 +0300)]
Merge pull request #8618 from Prerana-GB/lcom

bgpd: BGP large community-list configuration with regex is failing.

3 years agobgpd: changing graceful-restart parameters should not be considered as error
Christian Poessinger [Tue, 4 May 2021 21:19:29 +0000 (23:19 +0200)]
bgpd: changing graceful-restart parameters should not be considered as error

vtysh will return an informational message to the user that changing any
graceful-shutdown related parameter will require a peer reset. This is should
not be treated as an error message (resulting in a return code of 1) but
rather as a simple information to the user.

This fixes GitHub issue https://github.com/FRRouting/frr/issues/8403

$ vtysh -c configure -c 'router bgp 100' -c 'bgp graceful-restart'
Graceful restart configuration changed, reset all peers to take effect
$ echo $?
0

Signed-off-by: Christian Poessinger <christian@poessinger.com>
3 years agobgpd: Consolidate dampening show run output with the rest of that code
Donald Sharp [Fri, 23 Apr 2021 18:31:41 +0000 (14:31 -0400)]
bgpd: Consolidate dampening show run output with the rest of that code

For whatever reason the dampening show run code was outside the normal
loop of code that handles the afi/safi portion.  consolidate it into
the rest of the normal code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: No need to check if we are a dynamic peer or not
Donald Sharp [Fri, 23 Apr 2021 18:15:54 +0000 (14:15 -0400)]
bgpd: No need to check if we are a dynamic peer or not

bgp_config_write_peer_af already checks to see if we are
a dynamic peer.  No need to do so right before we call it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Do not output peer doppleganger dampened output
Donald Sharp [Fri, 23 Apr 2021 17:45:44 +0000 (13:45 -0400)]
bgpd: Do not output peer doppleganger dampened output

When we are cycling through all peers and looking for
dampening data to dump, do not consider non-configed
peers( dopplegangers ).

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agodoc: Fix the rip and ripng `distribute-list ...` commands
Donald Sharp [Mon, 8 Feb 2021 20:23:33 +0000 (15:23 -0500)]
doc: Fix the rip and ripng `distribute-list ...` commands

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Remove dead code
Donald Sharp [Mon, 8 Feb 2021 16:48:40 +0000 (11:48 -0500)]
lib: Remove dead code

The distribute_list_init command is not used and is setup
code that will never be used because it makes assumptions about
how distribute-lists work that are fundamentally incorrect.

Remove the code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobabeld: Allow babeld to actually register to use distribute-list
Donald Sharp [Mon, 8 Feb 2021 16:44:41 +0000 (11:44 -0500)]
babeld: Allow babeld to actually register to use distribute-list

The `distribute-list` commands were registered but never setup
properly to work.  Put the commands in place.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoeigrpd: fix `distribute-list...` command for EIGRP
Donald Sharp [Mon, 8 Feb 2021 16:39:30 +0000 (11:39 -0500)]
eigrpd: fix `distribute-list...` command for EIGRP

The distribute-list command was being registered but never
setup properly in EIGRP.  Put it into place.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib, ripd, ripngd, vtysh: Move distribute list to `correct` spot
Donald Sharp [Mon, 8 Feb 2021 16:36:05 +0000 (11:36 -0500)]
lib, ripd, ripngd, vtysh: Move distribute list to `correct` spot

Allow the `distribute-list...` command in ripd and ripngd to
work correctly.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Abstract parsing of distribute lists
Donald Sharp [Mon, 8 Feb 2021 14:54:31 +0000 (09:54 -0500)]
lib: Abstract parsing of distribute lists

Abstract the parsing of distribute lists so that we
don't have as much cut-n-paste code.

This is a setup commit for future work.  In effect
current distribute-list handling is all kinds of messed up

a) eigrp and babel both attempt to use distribute-lists, they just plain
don't work.
b) `distribute-list` is only sent to rip.  `ipv6 distribute-list`
is sent to ripngd.  If you use `distribute-list` under `router ripng`
it sends the command to rip but ripd is in the wrong mode and it
never works.
c) Should ripngd care about v4 and v6 specific distribute-lists?
This dichotomy was added for babel but babel has been broke
about this since day 1( see a ).

All in all we need to unwind this whole mess.  Make distribute-list
commands specific to the daemons( so that we can be in the right
sub-mode ).  But the parsing is going to be the same across all
daemons.  So let's provide that functionality in `lib/distribute.c`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: add unit test for nexthop comparisons
Mark Stapp [Wed, 7 Apr 2021 14:10:13 +0000 (10:10 -0400)]
tests: add unit test for nexthop comparisons

Add a nexthop unit test module, just exercising the 'basic'
comparison api for now.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agolib: add basic nexthop comparison api
Mark Stapp [Mon, 29 Mar 2021 20:09:40 +0000 (16:09 -0400)]
lib: add basic nexthop comparison api

Add a simpler, more limited nexthop comparison function. This
compares a few key attributes, such as vrf, gateway, labels.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoospf6d: Fix when an "export-list" or "filter-list out" is applied.
lynne [Thu, 25 Mar 2021 15:58:45 +0000 (11:58 -0400)]
ospf6d: Fix when an "export-list" or "filter-list out" is applied.

When an "export-filter" or "filter-list out" was configured on an area the
filter was not applied to existing database.    The user would either have
to restart the neighboring router in the other area or issue a "clear ipv6
ospf6 interface" to cause the neighbor router to resend it's LSAs.   The
new filter would then be applied to these LSAs and permit or deny summary
LSAs from being added/removed from the database.  The code now applies the
filters to the existing database without user needing to take any action
to clear ospfv3 adjacencies.

The second part of the problem was if a rule changed the updated filter was
not applied.  The code has been modifed to now process the rule update and
reapply the filter.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
3 years agoMerge pull request #8499 from donaldsharp/ospf_what
Rafael Zalamena [Tue, 4 May 2021 17:41:42 +0000 (14:41 -0300)]
Merge pull request #8499 from donaldsharp/ospf_what

Ospf what

3 years agoMerge pull request #8587 from volta-networks/fix_ospf6_message_logs
Russ White [Tue, 4 May 2021 15:53:17 +0000 (11:53 -0400)]
Merge pull request #8587 from volta-networks/fix_ospf6_message_logs

ospf6d: Make debug logs configurable to only display message headers