]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agozebra: add flag track released state of proto NHGS
Stephen Worley [Wed, 22 Jul 2020 17:45:47 +0000 (13:45 -0400)]
zebra: add flag track released state of proto NHGS

Add a flag to track the released state of a proto-based NHG.

This flag is used to know whether the upper level proto has called
the *_del API. Typically, the NHG would just get removed and uninstalled
at this point but there is a chance we are being sent it while routes
are still being owned or we were sent it multiple times. This flag
and associated code handles that.

Ticket: CM-30369

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agosharpd: implement NHG notification handling
Stephen Worley [Thu, 11 Jun 2020 17:49:25 +0000 (13:49 -0400)]
sharpd: implement NHG notification handling

Implement handling of NHG notifications in sharpd so that
the routes don't attempt to use an NHG ID that did not
successfully get created. If it does not get installed, we
fall back to traditional zapi messaging.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: reply fail on NHG add if not ifindex/onlink
Stephen Worley [Thu, 11 Jun 2020 17:46:48 +0000 (13:46 -0400)]
zebra: reply fail on NHG add if not ifindex/onlink

We currently don't support ADD/DEL/REPLACE with proto-based
NHGs that are not already fully resolved and ifindex/onlink
based. If we are handed one that doesn't have ifindex set
i.e. recursive, gracefully fail and with a notification.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib,zebra: fixup NHG notify zapi messaging
Stephen Worley [Thu, 11 Jun 2020 17:45:03 +0000 (13:45 -0400)]
lib,zebra: fixup NHG notify zapi messaging

Make the message parameters align better with other zapi
notifications and change the ID to correctly be a uint32.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Properly set NEXTHOP_FLAG_FIB when skipping install
Donald Sharp [Thu, 11 Jun 2020 11:34:18 +0000 (07:34 -0400)]
zebra: Properly set NEXTHOP_FLAG_FIB when skipping install

When the dataplane detects that we have no need to
reinstall the same route, setup the NEXTHOP_FLAG_FIB
appropriately.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Only install a minimal amount of times
Donald Sharp [Thu, 11 Jun 2020 11:34:18 +0000 (07:34 -0400)]
zebra: Only install a minimal amount of times

The code was installing the nexthop group again using
the NLM_F_REPLACE function causing extremely large
route installation times.  This reduces the time from
installing 1 million routes from sharpd with a nhg
from > 200 seconds ( where I gave up ) to ~15
seconds on my machine for 32 x ecmp.  As a side note 1 million
routes using master sharpd takes ~50 seconds to do
the same thing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoRevert "lib,sharpd,pbrd: `set installable` nhg command"
Stephen Worley [Fri, 24 Jul 2020 21:50:20 +0000 (17:50 -0400)]
Revert "lib,sharpd,pbrd: `set installable` nhg command"

This reverts commit 1844f45e30913b27cfd875036f865a0edadcf244.

4 years agozebra: add logging for NHG ignoring in netlink
Stephen Worley [Thu, 28 May 2020 17:22:18 +0000 (13:22 -0400)]
zebra: add logging for NHG ignoring in netlink

Add some logging for when we choose to ignore a NHG install
for one reason or another. Also, cleanup some of the code
using the same accessor functions for the context object.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: add logging for ZEBRA_NHG_ADD[DEL]
Stephen Worley [Thu, 28 May 2020 16:08:29 +0000 (12:08 -0400)]
lib: add logging for ZEBRA_NHG_ADD[DEL]

Add logging info for the new zapi ZEBRA_NHG_ADD[DEL]
message types. With this patch, they are logged properly
when debugs are turned on.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib,sharpd,pbrd: `set installable` nhg command
Stephen Worley [Wed, 27 May 2020 21:39:41 +0000 (17:39 -0400)]
lib,sharpd,pbrd: `set installable` nhg command

Add a command `set installable` that allows configured nexthop
groups to be treated as separate/installable objects in the RIB.

A callback needs to be implemented per daemon to handle installing
the NHG into the rib via zapi when this command is set. This
patch includes the implementation for sharpd.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: return the proto nhe on del even with refs
Stephen Worley [Sun, 24 May 2020 20:08:36 +0000 (16:08 -0400)]
zebra: return the proto nhe on del even with refs

Return the proto nhe on del even if their are still possible
route references.

We may get a del before the routes are removed. So we still need
to return this to the caller so they can decrement the ref.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: fix releasing proto-owned singletons
Stephen Worley [Sun, 24 May 2020 20:03:01 +0000 (16:03 -0400)]
zebra: fix releasing proto-owned singletons

Fix the releasing of proto-owned singletons from the attribute
hashed table. Proto-owned singleton nexthops are hashed so they
can still be shared therefore they are present in this table
and need to be released when the time comes.

This check was only matching on zebra proto before. Changed
to match IDs in zebra allocated range.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: increment the nhg proto score iterator
Stephen Worley [Wed, 20 May 2020 22:04:53 +0000 (18:04 -0400)]
zebra: increment the nhg proto score iterator

Increment the nhg proto score iterator we used to count
leftover NHGs after client disconnect and log.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: fix refcnt/rib issues in NHG replace/delete
Stephen Worley [Wed, 20 May 2020 19:47:12 +0000 (15:47 -0400)]
zebra: fix refcnt/rib issues in NHG replace/delete

Fix some reference counting issues seen when replacing
a NHG and deleting one.

For replacement, we should end with the same refcnt on the new
one.

For delete, its the caller's job to decrement its ref after
its done with it.

Further, update routes in the rib with the new pointer after replace.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: warn if zapi NHG add has no nexthops
Stephen Worley [Wed, 20 May 2020 19:43:23 +0000 (15:43 -0400)]
zebra: warn if zapi NHG add has no nexthops

Log a warning and return if we receive a NHG add via zapi
that has no nexthops.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: handle proto NHG uninstall client disconnect
Stephen Worley [Wed, 20 May 2020 19:41:18 +0000 (15:41 -0400)]
zebra: handle proto NHG uninstall client disconnect

Add code to handle proto-based NHG uninstalling after
the owning client disconnects.

This is handled the same way as rib_score_proto() but for now
we are ignoring instance.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: inc/dec refcount on add/del NHG proto
Stephen Worley [Wed, 20 May 2020 15:26:44 +0000 (11:26 -0400)]
zebra: inc/dec refcount on add/del NHG proto

When we add a proto NHG, increment the refcount, when
we del a proto NHG, decrement the refcount rather than
deleting it explicitly. If the upper level proto is handling
it properly, it should get decremented to zero when we
receive a NHG del.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: remove unneeded nhg repalce boilerplate
Stephen Worley [Wed, 20 May 2020 15:23:36 +0000 (11:23 -0400)]
zebra: remove unneeded nhg repalce boilerplate

Remove some leftover boilerplate from the old replace
code path. That code ended up in the add API so its no
longer needed.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Prevent duplicate re-install
Donald Sharp [Sun, 17 May 2020 00:12:30 +0000 (20:12 -0400)]
zebra: Prevent duplicate re-install

If we have received a route that the already existing
route is exactly the same, just note that it happened
and move on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib,doc: add `onlink` flag to nexthop group config
Stephen Worley [Mon, 18 May 2020 18:38:19 +0000 (14:38 -0400)]
lib,doc: add `onlink` flag to nexthop group config

Add an `onlink` flag to nexthop group configuration.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: add onlink flag to zapi_nh conversion helper
Stephen Worley [Mon, 18 May 2020 18:22:06 +0000 (14:22 -0400)]
lib: add onlink flag to zapi_nh conversion helper

Add setting the onlink flag to the zapi_nh conversion
helper function so that we can set the onlink flag with
it when passing down NHGs from upper level protos.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: fix route validity check with NHG ID
Stephen Worley [Thu, 14 May 2020 21:24:46 +0000 (17:24 -0400)]
zebra: fix route validity check with NHG ID

Fix check in zread where we determine validity of a route
based on reading in nexthops/checking ID is present.

We had a bad conditional that was determining a route
is bad if its not NHG ID based.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: use the passed proto from zapi
Stephen Worley [Wed, 13 May 2020 21:55:14 +0000 (17:55 -0400)]
zebra: use the passed proto from zapi

We were hard coding proto bgp for use with the NHG creation.

Use the actual passed one from zapi now that it exists.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: make NHG ID allocation smarter
Stephen Worley [Wed, 13 May 2020 21:42:55 +0000 (17:42 -0400)]
zebra: make NHG ID allocation smarter

Make NHG ID allocation smarter so it wraps once it hits
the lower bound for protos and performs a lookup to make
sure we don't already have that ID in use.

Its pretty unlikely we would wrap since the ID space is somewhere
around 24million for Zebra at this point in time.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agosharpd: print the correct ID the NHG is using
Stephen Worley [Wed, 13 May 2020 18:35:25 +0000 (14:35 -0400)]
sharpd: print the correct ID the NHG is using

We were incrementing in the output the ID value when we
shouldnt be. The value the NHG is assigned is before its
incremented.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: NHG ID bounds macros
Stephen Worley [Wed, 13 May 2020 18:32:13 +0000 (14:32 -0400)]
zebra: NHG ID bounds macros

Determine the NHG ID spacing and lower bound with ZEBRA_ROUTE_MAX
in macros.

Directly set the upperbound to be the lower 28bits of the uint32_t ID
space (the top 4 are reserved for l2-NHGs). Round that number down
a bit to make it more even.

Convert all former lower_bound calls to just use the macro.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: dont update counter if outside of zebra ID range
Stephen Worley [Sun, 10 May 2020 21:34:35 +0000 (17:34 -0400)]
zebra: dont update counter if outside of zebra ID range

When we receive a NHG from the kernel, we set the ID counter
to that to avoid using IDs owned from the kernel.

If we get one outside of zebra's range, lets not update it
since its probably one we created and never deleted anyway.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: special handling for proto-NHG-based routes
Stephen Worley [Sun, 10 May 2020 21:34:27 +0000 (17:34 -0400)]
zebra: special handling for proto-NHG-based routes

For now let's assume proto-NHG-based routes are good to go
(we assume they are onlink/interface based anyway) and bypass
route resolution altogether.

Once we determine how to handle recursive nexthop-resolution for
proto-NHGs we will revisit this.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: handle zapi routes with NHG ID set
Stephen Worley [Sun, 10 May 2020 21:32:24 +0000 (17:32 -0400)]
zebra: handle zapi routes with NHG ID set

Add code to properly handle routes sent with NHG ID rather
than a nexthop_group.

For now, we separate this from backup nexthop handling since that
should probably be added to the nhg_proto_add calls.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: implement NHG proto replace
Stephen Worley [Sun, 10 May 2020 20:36:49 +0000 (16:36 -0400)]
zebra: implement NHG proto replace

Implement the ability to replace an NHG sent down
from an upper level proto. With proto-owned NHGs, we make the
assumption they are ecmp and always treat them as a group
to make the replace from 1 -> 2 and 2 -> 1 quite a bit
easier.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: hash proto-created but zebra ID spaced NHGS
Stephen Worley [Sun, 10 May 2020 20:34:36 +0000 (16:34 -0400)]
zebra: hash proto-created but zebra ID spaced NHGS

To prevent duplication of singleton NHGs, lets hash
any zebra-ID spaced NHGs sent from an upper level proto.

These would be singleton NHGs anyway and should prevent duplication
of dataplane installs.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra,lib: command to only install proto-based nexthops
Stephen Worley [Wed, 13 May 2020 19:50:14 +0000 (12:50 -0700)]
zebra,lib: command to only install proto-based nexthops

Add a command/functionality to only install proto-based nexthops.
That is nexthops owned/created by upper level protocols, not ones
implicitly created by zebra.

There are some scenarios where you would not want zebra to be
arbitrarily installing nexthop groups and but you still want
to use ones you have control over via lib/nexthop_group config
and an upper level protocol.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: implement protocol NHG Add/Del
Stephen Worley [Tue, 5 May 2020 19:57:35 +0000 (15:57 -0400)]
zebra: implement protocol NHG Add/Del

Implement the underlying zebra functionality to Add/Del an
internal zebra and kernel NHG.

These NHGs are managed by the upperlevel protocols that send them
down via zapi messaging.

They are not put into the overall zebra NHG hash table and only
put into to the ID table. Therefore, different protos cannot
and will not share NHGs.

The proto is also set appropriately when sent to the kernel.

Expand the separation of Zebra hashed/shared/created NHGs and
proto created and mangaged NHGs.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: remove NHG unhashable flag and its code
Stephen Worley [Thu, 30 Apr 2020 22:35:13 +0000 (18:35 -0400)]
zebra: remove NHG unhashable flag and its code

Remove the code for setting a NHG as unhashable. Originally
this was to prevent us from attempting to put duplicates from
the kernel in our hashtable.

Now I think its better to not use them in the hashtable at all
and only track them in the ID table. Routes will still be able
to use them if they specify the ID explicitly when sending Zebra
the route, but 'normal' routes we hash the nexthop group on
will not.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agosharpd: add abilty to send a nhg to zebra
Donald Sharp [Wed, 29 Apr 2020 16:32:53 +0000 (12:32 -0400)]
sharpd: add abilty to send a nhg to zebra

Modify the sharpd program to have the ability to pass down
a NHG and then operate on it for route installation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib, zebra: Add ability to send down a nhgid over route install
Donald Sharp [Fri, 1 May 2020 21:56:23 +0000 (17:56 -0400)]
lib, zebra: Add ability to send down a nhgid over route install

Modify the send down of a route to use the nexthop group id
if we have one associated with the route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib, zebra: Add ZAPI_NHG_ADD|DELETE
Donald Sharp [Wed, 29 Apr 2020 14:49:21 +0000 (10:49 -0400)]
lib, zebra: Add ZAPI_NHG_ADD|DELETE

Add the ability to send a NHG from an upper level protocol down to
zebra.  ZAPI_NHG_ADD encompasses both the addition and replace
semantics ( If the id passed down does not exist yet, it's Add,
else it's a replace ).

Effectively zebra will take this nhg passed down save the nhg
in the id hash for nhg's and then create the appropriate nhg's
and finally install them into the linux kernel.  Notification
will be the ZAPI_NHG_NOTIFY_OWNER zapi message for normal
success/failure messaging to the installing protocol.

This work is being done to allow us to work with EVPN MH
which needs the ability to modify NHG's that BGP will own
and operate on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Refactor nexthop reading from zapi messages
Donald Sharp [Wed, 29 Apr 2020 14:11:34 +0000 (10:11 -0400)]
zebra: Refactor nexthop reading from zapi messages

Take the zebra code that reads nexthops and combine it
into one function so that when we add zapi messages
to send/receive nexthops we can take advantage of this function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Add the ability to grab a nhg starting id
Donald Sharp [Wed, 22 Apr 2020 13:41:01 +0000 (09:41 -0400)]
lib: Add the ability to grab a nhg starting id

Add new function zclient_get_nhg_start that will allow an
upper level protocol to get a starting point for it's own
nhg space.  Give each protocol a space of 50 million.
zebra will own the space from 0 - 199999999 because
of SYSTEM, KERNEL and CONNECT route types.

This is the start of some work that will allow upper
level protocols to install and maintain their own NHG's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Convert zserv_nexthop_num_warn to return bool
Donald Sharp [Thu, 9 Jan 2020 14:01:10 +0000 (09:01 -0500)]
zebra: Convert zserv_nexthop_num_warn to return bool

Allow us to key of the warning if we have one.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #7178 from taspelund/bgp_timers
Donatas Abraitis [Mon, 28 Sep 2020 06:44:21 +0000 (09:44 +0300)]
Merge pull request #7178 from taspelund/bgp_timers

bgpd: Use bgp instance's default keepalive interval if < (holdtime/3)

4 years agoMerge pull request #7187 from idryzhov/fix-configure
Rafael Zalamena [Mon, 28 Sep 2020 01:07:42 +0000 (22:07 -0300)]
Merge pull request #7187 from idryzhov/fix-configure

build: remove redundant commas

4 years agobuild: remove redundant commas
Igor Ryzhov [Sun, 27 Sep 2020 16:22:02 +0000 (19:22 +0300)]
build: remove redundant commas

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7063 from idryzhov/yang-leafref
Renato Westphal [Sat, 26 Sep 2020 18:12:13 +0000 (15:12 -0300)]
Merge pull request #7063 from idryzhov/yang-leafref

yang: use leafref instead of string

4 years agoMerge pull request #7181 from volta-networks/fix_isis_timer_oflow
Renato Westphal [Sat, 26 Sep 2020 18:03:53 +0000 (15:03 -0300)]
Merge pull request #7181 from volta-networks/fix_isis_timer_oflow

isisd: minor fixes and improvements

4 years agoMerge pull request #7182 from donaldsharp/bgp_static_32s
Donatas Abraitis [Sat, 26 Sep 2020 17:07:49 +0000 (20:07 +0300)]
Merge pull request #7182 from donaldsharp/bgp_static_32s

bgpd: Allow bgp static routes to use /32's

4 years agoMerge pull request #7171 from dslicenc/bgp-rid-update
Donatas Abraitis [Sat, 26 Sep 2020 16:58:00 +0000 (19:58 +0300)]
Merge pull request #7171 from dslicenc/bgp-rid-update

bgpd: allow derived router-id update if previously 0x0

4 years agoMerge pull request #7183 from oerdnj/master
Ondřej Surý [Sat, 26 Sep 2020 12:59:10 +0000 (14:59 +0200)]
Merge pull request #7183 from oerdnj/master

Update the Debian packaging (sync with debian/master branch)

4 years agoLower the debhelper depends for Debian Jessie and Ubuntu Xenial
Ondřej Surý [Sat, 26 Sep 2020 09:25:45 +0000 (11:25 +0200)]
Lower the debhelper depends for Debian Jessie and Ubuntu Xenial

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoBump standards version
Ondřej Surý [Sat, 26 Sep 2020 07:29:43 +0000 (09:29 +0200)]
Bump standards version

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoSync frr-doc.doc-base, d/frr.conf and d/frr.install with debian/master branch
Ondřej Surý [Sat, 26 Sep 2020 07:17:04 +0000 (09:17 +0200)]
Sync frr-doc.doc-base, d/frr.conf and d/frr.install with debian/master branch

4 years agoSync debian/watchfrr.rc with debian/master branch
Ondřej Surý [Sat, 26 Sep 2020 07:15:17 +0000 (09:15 +0200)]
Sync debian/watchfrr.rc with debian/master branch

4 years agoDepend on debhelper >= 10 and drop dh-systemd dependency (Closes: #958626)
Ondřej Surý [Mon, 10 Aug 2020 09:48:52 +0000 (11:48 +0200)]
Depend on debhelper >= 10 and drop dh-systemd dependency (Closes: #958626)

dh-systemd was merged into debhelper in version 9.20160709 [1] and since
stretch, dh-systemd is an empty transitional package.

For bullseye there's an intend to drop this empty transitional package.

This commit drops the "| dh-systemd" alternative Build-Depends as it is no
longer required (not even for backports) and is only confusing.

For Debian Jessie, it's easier to add backported debhelper >= 10 to the
repository.

4 years agoWork around the sphinx-build error that doesn't copy images to texinfo
Ondřej Surý [Thu, 6 Aug 2020 08:00:28 +0000 (10:00 +0200)]
Work around the sphinx-build error that doesn't copy images to texinfo

The sphinx-build (since version 2.0.0) doesn't install the images into the
texinfo build directory.  Workaround the issue, by copying the required
images from the source directory.

4 years agoUse wrap-and-sort -a to unify debian/ wrapping and sorting
Ondřej Surý [Thu, 6 Aug 2020 07:28:29 +0000 (09:28 +0200)]
Use wrap-and-sort -a to unify debian/ wrapping and sorting

While it's ok to use individual wrapping/sorting in the debian/ source files,
it's often simpler to just go with the formatting supported by tools.  One such
tool is wrap-and-sort, so this commit re-wraps and re-sorts the debian/ files to
be unified and (-a) always wrapped.

4 years agoBump standards version to 4.5.0.2 (latest) - no change
Ondřej Surý [Thu, 6 Aug 2020 07:26:33 +0000 (09:26 +0200)]
Bump standards version to 4.5.0.2 (latest) - no change

4 years agoConvert the package to dh compat level 10
Ondřej Surý [Thu, 6 Aug 2020 07:16:40 +0000 (09:16 +0200)]
Convert the package to dh compat level 10

There are couple of related changes:

* Bump the debhelper dependency to the version at least in Debian Jessie
* Drop the dh-autoreconf, autotools-dev dependency, this is automatically
  included.
* Drop the --parallel, --with=systemd and --with=autoreconf, this is
  automatically enabled in dh compat level 10, add a --without=systemd
  when requested via build profile.

4 years agoUpdate and simplify d/watch
Ondřej Surý [Thu, 6 Aug 2020 07:01:19 +0000 (09:01 +0200)]
Update and simplify d/watch

4 years agoMake lsb-base a hard dependency
Ondřej Surý [Fri, 3 Jul 2020 10:46:45 +0000 (12:46 +0200)]
Make lsb-base a hard dependency

Directly depend on lsb-base in Debian, so we the shims are only used
on systems without LSB.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoRemove mention of pkg.frr.snmp build profile from debian/README.Debian
Ondřej Surý [Fri, 3 Jul 2020 10:46:51 +0000 (12:46 +0200)]
Remove mention of pkg.frr.snmp build profile from debian/README.Debian

The pkg.frr.snmp build profile is no longer present in the Debian build scripts,
so this just cleans up the old documentation that mentions it.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoAdd missing lsof dependency
Ondřej Surý [Fri, 3 Jul 2020 10:46:49 +0000 (12:46 +0200)]
Add missing lsof dependency

The logrotate script for frr uses lsof, but the package didn't depend on the
it.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoRemove unused debian/watchfrr.rc file
Ondřej Surý [Fri, 3 Jul 2020 10:46:48 +0000 (12:46 +0200)]
Remove unused debian/watchfrr.rc file

The debian/watchfrr.rc file was not install, so we just remove the cruft.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoUse dh_installinit capabilities to install frr.tmpfile
Ondřej Surý [Fri, 3 Jul 2020 10:46:46 +0000 (12:46 +0200)]
Use dh_installinit capabilities to install frr.tmpfile

The debian/frr.conf was manually installed as systemd-tmpfiles configuration,
but the dh_installinit now has capability to install it automatically if named
debian/frr.tmpfile.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoDon't install frr-doc texinfo images, they are gone (Closes: #955067)
Ondřej Surý [Sun, 31 May 2020 16:27:13 +0000 (18:27 +0200)]
Don't install frr-doc texinfo images, they are gone (Closes: #955067)

4 years agoChange the source format from git to quilt to use git-buildpackage
Ondřej Surý [Sun, 31 May 2020 16:02:49 +0000 (18:02 +0200)]
Change the source format from git to quilt to use git-buildpackage

4 years agoAdd d/gbp.conf for master branch
Ondřej Surý [Sun, 31 May 2020 15:46:35 +0000 (17:46 +0200)]
Add d/gbp.conf for master branch

4 years agoAdd myself to Uploaders
Ondřej Surý [Sun, 31 May 2020 15:44:28 +0000 (17:44 +0200)]
Add myself to Uploaders

4 years agoMerge pull request #7175 from idryzhov/fix-nb-bypass
Quentin Young [Fri, 25 Sep 2020 17:05:21 +0000 (13:05 -0400)]
Merge pull request #7175 from idryzhov/fix-nb-bypass

*: move all userdata when changing node xpath

4 years agobgpd: Allow bgp static routes to use /32's
Donald Sharp [Fri, 25 Sep 2020 13:45:24 +0000 (09:45 -0400)]
bgpd: Allow bgp static routes to use /32's

If you are including a network statement of a /32
then the current bgp martian checks will match the /32
together.

Problem:
!
router bgp 3235
 neighbor 192.168.161.2 remote-as external
 neighbor 192.168.161.131 remote-as external
 !
 address-family ipv4 unicast
  network 10.10.3.11/32
  network 192.168.161.0/24
  no neighbor 192.168.161.2 activate
  neighbor 192.168.161.2 route-map BLUE in
 exit-address-family
!
eva# show bgp ipv4 uni
BGP table version is 1, local router ID is 10.10.3.11, vrf id 0
Default local pref 100, local AS 3235
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
   10.10.3.11/32    0.0.0.0(eva)             0         32768 i
*> 192.168.161.0/24 0.0.0.0(eva)             0         32768 i
Displayed  2 routes and 2 total paths
eva# show bgp import-check-table
Current BGP import check cache:
 192.168.161.0 valid [IGP metric 0], #paths 1
  if enp39s0
  Last update: Fri Sep 25 08:00:42 2020
 10.10.3.11 valid [IGP metric 0], #paths 1
  if lo
  Last update: Fri Sep 25 08:00:42 2020
eva# show bgp ipv4 uni summ
BGP router identifier 10.10.3.11, local AS number 3235 vrf-id 0
BGP table version 1
RIB entries 3, using 576 bytes of memory
Peers 1, using 21 KiB of memory
Neighbor                 V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
janelle(192.168.161.131) 4      60000        69        70        0    0    0 00:03:21            0        1
Total number of neighbors 1

When we are deciding that a nexthop is valid there is not much point in checking
that a static route has a martian nexthop or not, since we self derived it already.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Use bgp instance's default keepalive interval if < (holdtime/3)
Trey Aspelund [Wed, 23 Sep 2020 18:16:50 +0000 (14:16 -0400)]
bgpd: Use bgp instance's default keepalive interval if < (holdtime/3)

bgp->default_keepalive was not considered when setting
peer->v_keepalive, causing the effective keepalive interval to
always be (holdtime/3), even when default_keepalive < (holdtime/3).
This ensures that the default_keepalive is used when it's set and
is < (holdtime/3).

Signed-off-by: Trey Aspelund <taspelund@cumulusnetworks.com>
(cherry picked from commit d8bf8c6128f2e493d473148213bd663a500c7f73)

4 years agoisisd: guard against adj timer display overflow
Emanuele Di Pascale [Wed, 23 Sep 2020 14:46:44 +0000 (16:46 +0200)]
isisd: guard against adj timer display overflow

An adjacency should be removed when the holdtimer expires, but if the
system is overloaded we may end up doing it late. In the meanwhile vtysh
will display an incorrect value in the show isis neighbor output, due to
an overflow of the unsigned variable used to display the Holdtime, e.g.:

pe1# show isis neighbor
Area test:
 System Id     Interface   L   state   Holdtime  SNPA
 Spirent-1     2.201       1   Down    26        2020.2020.2020
 Spirent-1     2.203       1   Up      21        2020.2020.2020
 Spirent-1     2.204       1   Up      18446744073709551615  2020.2020.2020
 Spirent-1     2.207       1   Up      18446744073709551615  2020.2020.2020
 Spirent-1     2.208       1   Up      18446744073709551615  2020.2020.2020
 Spirent-1     2.209       1   Up      0         2020.2020.2020
 Spirent-1     2.210       1   Up      18446744073709551615  2020.2020.2020
 pe2           12.200      1   Up      30        2020.2020.2020

Guard against that by printing an "Expiring" message instead.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoisisd: simplify adj_change hook call
Emanuele Di Pascale [Wed, 23 Sep 2020 14:37:21 +0000 (16:37 +0200)]
isisd: simplify adj_change hook call

There is no need to call isis_adj_state_change_hook once per level
in isis_adj_state_change, we can just do it once at the end.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #7169 from donaldsharp/some_code_cleanup
Donatas Abraitis [Fri, 25 Sep 2020 07:19:34 +0000 (10:19 +0300)]
Merge pull request #7169 from donaldsharp/some_code_cleanup

Some code cleanup

4 years ago*: move all userdata when changing node xpath
Igor Ryzhov [Thu, 24 Sep 2020 18:05:32 +0000 (21:05 +0300)]
*: move all userdata when changing node xpath

The same thing was done for interfaces in commit f7c20aa1f.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agobfdd: use * as a placeholder for an empty interface name in northbound
Igor Ryzhov [Thu, 24 Sep 2020 17:43:38 +0000 (20:43 +0300)]
bfdd: use * as a placeholder for an empty interface name in northbound

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agobfdd: interface and vrf are mandatory leafs
Igor Ryzhov [Thu, 24 Sep 2020 17:23:21 +0000 (20:23 +0300)]
bfdd: interface and vrf are mandatory leafs

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7164 from AnuradhaKaruppiah/mh-misc-fixes
Sri Mohana Singamsetty [Thu, 24 Sep 2020 15:37:45 +0000 (08:37 -0700)]
Merge pull request #7164 from AnuradhaKaruppiah/mh-misc-fixes

evpn-mh: miscellaneous cleanup/fixes

4 years agobgpd: allow derived router-id update if previously 0x0
Don Slice [Tue, 22 Sep 2020 13:14:52 +0000 (06:14 -0700)]
bgpd: allow derived router-id update if previously 0x0

Problem found that if a router-id was not defined or derived
initially, the bgp->router_id would be set to 0x0 and used
for determining auto-rd values. When bgp received a subsequent
router-id update from zebra, bgp would not completely process
the update since it was treated as updating an already derived
router-id with a new value, which is not desired.  This also
could leave the auto rd/rt inforamation missing or invalid in
some cases.  This fix allows updating the derived router-id if
the previous value was 0/0.

Ticket: CM-31441
Signed-off-by: Don Slice <dslice@nvidia.com>
4 years agobgpd: Remove dest variable from route_out_vty_flowspec
Donald Sharp [Thu, 24 Sep 2020 12:20:24 +0000 (08:20 -0400)]
bgpd: Remove dest variable from route_out_vty_flowspec

The dest variable was never really used.  Just remove
from the code base.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: pbra is already derefed in all paths to this spot
Donald Sharp [Thu, 24 Sep 2020 12:16:57 +0000 (08:16 -0400)]
bgpd: pbra is already derefed in all paths to this spot

The pbra variable is already derefed in all paths to this spot
and as such we cannot be NULL at this point.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopimd: When bind fails we could leave an open socket
Donald Sharp [Thu, 24 Sep 2020 12:12:49 +0000 (08:12 -0400)]
pimd: When bind fails we could leave an open socket

Clean up the rare situation when bind fails to not
close the fd that was just opened and have the socket
leaked.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopimd: NULL not 0
Donald Sharp [Thu, 24 Sep 2020 12:10:26 +0000 (08:10 -0400)]
pimd: NULL not 0

When handling data pointers explicity use NULL not
0.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Ensure we do integer size promotions
Donald Sharp [Thu, 24 Sep 2020 12:07:12 +0000 (08:07 -0400)]
bgpd: Ensure we do integer size promotions

When doing multiplication of (int) * (uint_8t) we can
have overflow and end up in a weird state.  Intentionally
upgrade the type then do the math.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoisisd: Prevent usage after free
Donald Sharp [Thu, 24 Sep 2020 11:56:13 +0000 (07:56 -0400)]
isisd: Prevent usage after free

Store the vrf_id so that when we free the area we can
do further cleanup work.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: Tell the compiler we don't care about the return code
Donald Sharp [Thu, 24 Sep 2020 11:52:20 +0000 (07:52 -0400)]
lib: Tell the compiler we don't care about the return code

When calling yang_snodes_iterate_subtree we don't care about
the return code.  So explicitly say we don't care so that
SA tools can be on the same page as us.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: Don't ignore setsockopt return
Donald Sharp [Thu, 24 Sep 2020 11:42:51 +0000 (07:42 -0400)]
zebra: Don't ignore setsockopt return

When attempting to limit the amount of data sent from the kernel
to FRR, some kernels we can run against may not have this ability
in which case the setsockopt will fail.  Notice that in the log.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7155 from donaldsharp/TRAP
Mark Stapp [Wed, 23 Sep 2020 20:06:37 +0000 (16:06 -0400)]
Merge pull request #7155 from donaldsharp/TRAP

Offload/Trap

4 years agoMerge pull request #7163 from donaldsharp/zebra_mlag_bugs
Mark Stapp [Wed, 23 Sep 2020 19:32:31 +0000 (15:32 -0400)]
Merge pull request #7163 from donaldsharp/zebra_mlag_bugs

Zebra mlag bugs

4 years agoMerge pull request #7160 from mjstapp/fix_topo_daemons_list
Stephen Worley [Wed, 23 Sep 2020 18:47:13 +0000 (14:47 -0400)]
Merge pull request #7160 from mjstapp/fix_topo_daemons_list

tests: fix bug in handling of daemons to start

4 years agozebra: fix use of freed es during zebra shutdown
Anuradha Karuppiah [Tue, 15 Sep 2020 23:50:14 +0000 (16:50 -0700)]
zebra: fix use of freed es during zebra shutdown

This problem was reported by the sanitizer -
=================================================================
==24764==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d0000115c8 at pc 0x55cb9cfad312 bp 0x7fffa0552140 sp 0x7fffa0552138
READ of size 8 at 0x60d0000115c8 thread T0
    #0 0x55cb9cfad311 in zebra_evpn_remote_es_flush zebra/zebra_evpn_mh.c:2041
    #1 0x55cb9cfad311 in zebra_evpn_es_cleanup zebra/zebra_evpn_mh.c:2234
    #2 0x55cb9cf6ae78 in zebra_vrf_disable zebra/zebra_vrf.c:205
    #3 0x7fc8d478f114 in vrf_delete lib/vrf.c:229
    #4 0x7fc8d478f99a in vrf_terminate lib/vrf.c:541
    #5 0x55cb9ceba0af in sigint zebra/main.c:176
    #6 0x55cb9ceba0af in sigint zebra/main.c:130
    #7 0x7fc8d4765d20 in quagga_sigevent_process lib/sigevent.c:103
    #8 0x7fc8d4787e8c in thread_fetch lib/thread.c:1396
    #9 0x7fc8d4708782 in frr_run lib/libfrr.c:1092
    #10 0x55cb9ce931d8 in main zebra/main.c:488
    #11 0x7fc8d43ee09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #12 0x55cb9ce94c09 in _start (/usr/lib/frr/zebra+0x8ac09)
=================================================================

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: evpn-mh: add error logs on ES processing failures
Anuradha Karuppiah [Wed, 20 May 2020 21:56:36 +0000 (14:56 -0700)]
zebra: evpn-mh: add error logs on ES processing failures

Cleanup some of the XXX added during development of MH.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agoMerge pull request #7112 from AnuradhaKaruppiah/mac-neigh-ht
Donatas Abraitis [Wed, 23 Sep 2020 18:11:56 +0000 (21:11 +0300)]
Merge pull request #7112 from AnuradhaKaruppiah/mac-neigh-ht

evpn-mh: mac-ip sync hold timers

4 years agoMerge pull request #7157 from donaldsharp/nhg_speeds
Patrick Ruddy [Wed, 23 Sep 2020 17:42:00 +0000 (18:42 +0100)]
Merge pull request #7157 from donaldsharp/nhg_speeds

zebra: Move debug information gathering to inside guard

4 years agozebra: Increase the read/write mlag buffer sizes
Donald Sharp [Wed, 23 Sep 2020 17:06:08 +0000 (13:06 -0400)]
zebra: Increase the read/write mlag buffer sizes

The read/write mlag buffer sizes of 2k were sufficient
for ~100 S,G notifications at one go.  Increase to 32k
to give us 16 times the space.

Ticket: CM-31576
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: Ensure that message received from mlag will fit
Donald Sharp [Wed, 23 Sep 2020 17:04:20 +0000 (13:04 -0400)]
zebra: Ensure that message received from mlag will fit

If we receive a message that is greater than our buffer
size we are in a situation where both the read and write
buffers are fubar'ed beyond the end.  Assert when we notice
this fact.

Ticket: CM-31576
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: modify mlag code to only need 1 stream when generating data
Donald Sharp [Wed, 23 Sep 2020 16:26:13 +0000 (12:26 -0400)]
zebra: modify mlag code to only need 1 stream when generating data

The normal pattern of writing the type/length at the beginning
of the packet was not being quite followed.  Modify the mlag
code to respect the proper way of doing things and get rid
of a stream_new and copy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7154 from donaldsharp/frr_topotests
Donatas Abraitis [Wed, 23 Sep 2020 14:33:08 +0000 (17:33 +0300)]
Merge pull request #7154 from donaldsharp/frr_topotests

tests: Our tests are for FRR

4 years agozebra: stop neigh hold timer when the neigh is deleted
Anuradha Karuppiah [Tue, 26 May 2020 13:24:17 +0000 (06:24 -0700)]
zebra: stop neigh hold timer when the neigh is deleted

The neigh hold timer was firing after the neigh was deleted resulting
in the following crash -
[
    at ./zebra/zebra_evpn_neigh.h:155
    at zebra/zebra_evpn_neigh.c:447
    at lib/thread.c:1578
    at zebra/main.c:488
]

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: fix deletion of evpn mh neigh-holdtime
Don Slice [Thu, 4 Jun 2020 15:23:09 +0000 (15:23 +0000)]
zebra: fix deletion of evpn mh neigh-holdtime

Found that the command "evpn mh neigh-holdtime" can be set but
not deleted.  This fix solves the delete process

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agozebra: changes for configuring mac and neigh holdtime
Anuradha Karuppiah [Fri, 8 May 2020 13:00:40 +0000 (06:00 -0700)]
zebra: changes for configuring mac and neigh holdtime

When an ES peer withdraws a MAC-IP route we hold the entry for N seconds
to allow an external daemon (neighmgr) to establish host reachability
independent of the peer. Add config commands to allow the user to set
this holdtime (N).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>