]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
15 months agopceplib: add <time.h> include for time_t
Sam James [Sat, 4 Feb 2023 23:29:59 +0000 (23:29 +0000)]
pceplib: add <time.h> include for time_t

Fixes build on musl. Used for time_t in the header.

Bug: https://bugs.gentoo.org/862558
Signed-off-by: Sam James <sam@gentoo.org>
15 months agoMerge pull request #12668 from anlancs/fix/zebra-evpn-missing-advertise
Donatas Abraitis [Sat, 4 Feb 2023 10:52:22 +0000 (12:52 +0200)]
Merge pull request #12668 from anlancs/fix/zebra-evpn-missing-advertise

zebra: fix wrong conversion for evpn advertising

15 months agoMerge pull request #12732 from donaldsharp/fix_bgp_open_issues
Mark Stapp [Fri, 3 Feb 2023 12:17:00 +0000 (07:17 -0500)]
Merge pull request #12732 from donaldsharp/fix_bgp_open_issues

bgpd: Don't try to recursively hold peer io mutex

15 months agobgpd: Don't try to recursively hold peer io mutex
Donald Sharp [Thu, 2 Feb 2023 19:13:12 +0000 (14:13 -0500)]
bgpd: Don't try to recursively hold peer io mutex

BGP was modified in a0b937de428e14e869b8541f0b7810113d619c2e
to grab the peer->io_mtx before validating the header to ensure
that the input Queue was not being modified by anyone else at that
moment in time.  Unfortunately validate_header can detect a problem
and attempt to relock the mutex, which deadlocks.  This deadlock in
the bgp_io pthread is the lone deadlock at first, eventually though
bgp attempts to write another packet to the peer( say when the
it's time to send the next packet ) and the main pthread of bgpd
becomes deadlocked and then the whole bgpd process is stuck at that
point in time leaving us dead in the water.

The point of locking the mutex earlier was to ensure that the input
Queue wasn't being modified by anyone else, (Say reading off it )
as that we wanted to ensure that we don't hold more packets then necessary.

Let's grab the mutex long enough to look at the input Q size, this
ensure that we have room and then we can validate_header and do the right
thing from there.  We'll need to lock the mutex when we actually move it
into the input Q as well.

Fixes: #12725
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agoMerge pull request #12731 from donaldsharp/remove_pretty_print
Russ White [Thu, 2 Feb 2023 20:44:45 +0000 (15:44 -0500)]
Merge pull request #12731 from donaldsharp/remove_pretty_print

lib, bgpd: Add ability to specify that some json output should not be…

15 months agobgpd: Convert evpn output to not pretty print json
Donald Sharp [Thu, 2 Feb 2023 15:40:07 +0000 (10:40 -0500)]
bgpd: Convert evpn output to not pretty print json

Commit: 3cdb03fba7b40240fb38469a12b7b05a11043e09
changed the vty_json output to not be pretty printing.
The previous commit in the tree added vty_json_no_pretty
let's use that instead

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agolib, bgpd: Add ability to specify that some json output should not be pretty
Donald Sharp [Thu, 2 Feb 2023 15:28:19 +0000 (10:28 -0500)]
lib, bgpd: Add ability to specify that some json output should not be pretty

Initial commit: 23b2a7ef524c9fe083b217c7f6ebaec0effc8f52
changed the json output of `show bgp <afi> <safi> json` to
not have pretty print because when under a situation where
there are a bunch of routes with a large scale ecmp show
output was taking forever and this commit cut 2 minutes out
of vtysh run time.

Subusequent commit: f4ec52f7cc99f709756d9030623a20c98a086125
changed this back.

When upgrading to latest version the long run time was noticed
due to testing.  Let's add back this functionality such that
FRR can have reduced run times with vtysh when it's really
needed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agoMerge pull request #12729 from opensourcerouting/fix/treat-as-withdraw_nlri_update
Donald Sharp [Thu, 2 Feb 2023 13:29:59 +0000 (08:29 -0500)]
Merge pull request #12729 from opensourcerouting/fix/treat-as-withdraw_nlri_update

bgpd: Set attr to NULL when passing NLRI_UPDATE with treat-as-withdraw

15 months agobgpd: Set attr to NULL when passing NLRI_UPDATE with treat-as-withdraw
Donatas Abraitis [Tue, 24 Jan 2023 08:32:13 +0000 (10:32 +0200)]
bgpd: Set attr to NULL when passing NLRI_UPDATE with treat-as-withdraw

Before this patch, we always passed `struct attr` for NLRI_UPDATE, but if we
have a situation with treat-as-withdraw (for example: malformed attribute, or
using a command like `neighbor path-attribute treat-as-withdraw`) the route
MUST be withdrawn form the BGP table.

Hence, we MUST pass attr as NULL, in this case we already have this check
under NLRI_ATTR_ARG() macro, just reuse it properly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agoMerge pull request #12672 from donaldsharp/remove_insecure
Donatas Abraitis [Wed, 1 Feb 2023 20:45:20 +0000 (22:45 +0200)]
Merge pull request #12672 from donaldsharp/remove_insecure

vtysh: Remove shell access code

15 months agoMerge pull request #12713 from opensourcerouting/fix/json_naming_deprecation
Donald Sharp [Wed, 1 Feb 2023 20:39:18 +0000 (15:39 -0500)]
Merge pull request #12713 from opensourcerouting/fix/json_naming_deprecation

*: Drop deprecated incorrect JSON fields with wrong naming

15 months agoMerge pull request #12721 from opensourcerouting/format-warnings-redux
Christian Hopps [Wed, 1 Feb 2023 16:13:46 +0000 (11:13 -0500)]
Merge pull request #12721 from opensourcerouting/format-warnings-redux

*: more format string fixing

15 months agovtysh: Schedule shell access for deprecation
Donald Sharp [Wed, 1 Feb 2023 15:26:41 +0000 (10:26 -0500)]
vtysh: Schedule shell access for deprecation

Schedule shell access for deprecation and removal in
a years time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agotests: add missing printf attribute
David Lamparter [Tue, 31 Jan 2023 21:17:10 +0000 (22:17 +0100)]
tests: add missing printf attribute

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agotests: yank asprintfrr duplicate
David Lamparter [Tue, 31 Jan 2023 21:12:41 +0000 (22:12 +0100)]
tests: yank asprintfrr duplicate

I think this one predates the existence of asprintfrr.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agolib: fix one more b0rked format string
David Lamparter [Tue, 31 Jan 2023 21:05:17 +0000 (22:05 +0100)]
lib: fix one more b0rked format string

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agobgpd/rfapi: add missing printf attribute
David Lamparter [Tue, 31 Jan 2023 21:04:39 +0000 (22:04 +0100)]
bgpd/rfapi: add missing printf attribute

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agolib: apply more `printf` attributes
David Lamparter [Tue, 31 Jan 2023 20:58:41 +0000 (21:58 +0100)]
lib: apply more `printf` attributes

... missed some functions in the earlier commits :(

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agoMerge pull request #12667 from donaldsharp/zebra_rib_fixup
Donatas Abraitis [Tue, 31 Jan 2023 19:41:30 +0000 (21:41 +0200)]
Merge pull request #12667 from donaldsharp/zebra_rib_fixup

tests: zebra_rib remove a sleep

16 months agoMerge pull request #12704 from donaldsharp/pim6_route_map
Donatas Abraitis [Tue, 31 Jan 2023 18:51:45 +0000 (20:51 +0200)]
Merge pull request #12704 from donaldsharp/pim6_route_map

pimd: v6 intentionally turned off route-maps.  Turn it on.

16 months agotests: Use JSON camelCase naming for tests
Donatas Abraitis [Tue, 31 Jan 2023 10:47:43 +0000 (12:47 +0200)]
tests: Use JSON camelCase naming for tests

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #12686 from opensourcerouting/debian-sync-20230124
Donald Sharp [Tue, 31 Jan 2023 17:37:39 +0000 (12:37 -0500)]
Merge pull request #12686 from opensourcerouting/debian-sync-20230124

debian: synchronize/fold back debian changes

16 months agoMerge pull request #12717 from opensourcerouting/topotest_stop_topo_fix
Donald Sharp [Tue, 31 Jan 2023 17:30:35 +0000 (12:30 -0500)]
Merge pull request #12717 from opensourcerouting/topotest_stop_topo_fix

tests: Fix wrong tgen.stop_topology() calls which got skipped

16 months agoMerge pull request #12687 from opensourcerouting/build-mkdir-p
Mark Stapp [Tue, 31 Jan 2023 16:28:32 +0000 (11:28 -0500)]
Merge pull request #12687 from opensourcerouting/build-mkdir-p

build: consistently mkdir -p output for redirect

16 months agoMerge pull request #12708 from donaldsharp/no_notification
Mark Stapp [Tue, 31 Jan 2023 15:55:01 +0000 (10:55 -0500)]
Merge pull request #12708 from donaldsharp/no_notification

zebra: Send nht resolved entry up to concerned protocols in all cases

16 months agotests: Fix wrong tgen.stop_topology() calls which got skipped
Martin Winter [Tue, 31 Jan 2023 15:10:04 +0000 (16:10 +0100)]
tests: Fix wrong tgen.stop_topology() calls which got skipped

Calls were missing the () and caused the stop_topology() to be skipped

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
16 months agotests: zebra_rib remove a sleep
Donald Sharp [Thu, 19 Jan 2023 20:46:31 +0000 (15:46 -0500)]
tests: zebra_rib remove a sleep

The test was sometimes failing around the sleep(4) for
waiting for the routes to be installed.  Instead of blindly
sleeping let's check to see that the routes are actually
there in zebra and then continue on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agoMerge pull request #12695 from opensourcerouting/format-warnings
Donald Sharp [Tue, 31 Jan 2023 14:01:32 +0000 (09:01 -0500)]
Merge pull request #12695 from opensourcerouting/format-warnings

build: `-Wformat-nonliteral -Wformat-security`

16 months agoMerge pull request #12710 from opensourcerouting/fix/reset_fqdn_capability_on_before_...
Donald Sharp [Tue, 31 Jan 2023 13:46:03 +0000 (08:46 -0500)]
Merge pull request #12710 from opensourcerouting/fix/reset_fqdn_capability_on_before_handling_open

bgpd: Vanish FQDN capability hostname/domainname before handling new BGP OPEN

16 months agoMerge pull request #12711 from opensourcerouting/topotest-pid-fix
Donald Sharp [Tue, 31 Jan 2023 13:45:04 +0000 (08:45 -0500)]
Merge pull request #12711 from opensourcerouting/topotest-pid-fix

tests: Topotests fix for deleting wrong pidfile

16 months agozebra: Send nht resolved entry up to concerned protocols in all cases
Donald Sharp [Mon, 30 Jan 2023 18:53:44 +0000 (13:53 -0500)]
zebra: Send nht resolved entry up to concerned protocols in all cases

There existed the idea, from Volta, that a nexthop group would not have
the same nexthops installed -vs- what FRR actually sent down.  The
dplane would notify you.

With the addition of 06525c4f99d4dcafdf448565f7e11bd70993697d
the code was put behind a bit of a wall controlled the usage
of it.

The flag ROUTE_ENTRY_USE_FIB_NHG flag was being used
to control which set was being sent up to concerned parties
in nexthop tracking.  Put this flag behind the wall and
do not necessarily set it when we receive a data plane
notification about a route being installed or not.

Fixes: #12706
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months ago*: Drop deprecated incorrect JSON fields with wrong naming
Donatas Abraitis [Tue, 31 Jan 2023 08:18:28 +0000 (10:18 +0200)]
*: Drop deprecated incorrect JSON fields with wrong naming

Deprecation cycle already passed.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #12709 from donaldsharp/update_withdraw_always_work
Donatas Abraitis [Tue, 31 Jan 2023 06:50:06 +0000 (08:50 +0200)]
Merge pull request #12709 from donaldsharp/update_withdraw_always_work

bgpd: bgp_update and bgp_withdraw never return failures

16 months agotests: Topotests fix for deleting wrong pidfile
Martin Winter [Mon, 30 Jan 2023 22:26:48 +0000 (23:26 +0100)]
tests: Topotests fix for deleting wrong pidfile

Fixes killRouterDaemons() function which occasionally deleted the wrong
pidfile.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
16 months agobgpd: Vanish FQDN capability hostname/domainname before handling new BGP OPEN
Donatas Abraitis [Mon, 30 Jan 2023 21:23:38 +0000 (23:23 +0200)]
bgpd: Vanish FQDN capability hostname/domainname before handling new BGP OPEN

Before this, if the peer disables sending FQDN capability, the old hostname
still (STALE) exists and is misleading in the outputs of `show bgp ...`.

Especially when using with `bgp default show-hostname`, etc.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agobgpd: Free peer's hostname (aka FQDN capability stuff)
Donatas Abraitis [Mon, 30 Jan 2023 21:22:58 +0000 (23:22 +0200)]
bgpd: Free peer's hostname (aka FQDN capability stuff)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agotests: Check if we vanish hostname/domainname if disabled from another side
Donatas Abraitis [Mon, 30 Jan 2023 21:22:23 +0000 (23:22 +0200)]
tests: Check if we vanish hostname/domainname if disabled from another side

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agobgpd: bgp_update and bgp_withdraw never return failures
Donald Sharp [Mon, 30 Jan 2023 21:02:23 +0000 (16:02 -0500)]
bgpd: bgp_update and bgp_withdraw never return failures

These two functions always return 0.  As such any and all
tests against this make no sense.  Remove the return 0
to a void and follow the chain, logically, to remove all
the dead code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agopimd: v6 intentionally turned off route-maps. Turn it on.
Donald Sharp [Sun, 29 Jan 2023 03:16:08 +0000 (22:16 -0500)]
pimd: v6 intentionally turned off route-maps.  Turn it on.

Why?

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agoMerge pull request #12700 from taspelund/martian_tip_improvement
Donatas Abraitis [Mon, 30 Jan 2023 08:52:44 +0000 (10:52 +0200)]
Merge pull request #12700 from taspelund/martian_tip_improvement

BGP Martian Tunnel-IP Improvements

16 months agoMerge pull request #12703 from donaldsharp/basic_babel
Donatas Abraitis [Mon, 30 Jan 2023 08:45:49 +0000 (10:45 +0200)]
Merge pull request #12703 from donaldsharp/basic_babel

Basic babel

16 months agotests: Super simple babel test
Donald Sharp [Sat, 28 Jan 2023 16:17:08 +0000 (11:17 -0500)]
tests: Super simple babel test

Just get babel started and ensure that the v4 routes
are actually installed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agobabeld: During intf startup, ignore address already in use
Donald Sharp [Sat, 28 Jan 2023 14:32:34 +0000 (09:32 -0500)]
babeld: During intf startup, ignore address already in use

When listening on a multicast group.  No need to actually
fail the operation when it's already being used.

Let's not treat the Address already in use error message
as one that is stopping everything from working.  Especially
since multiple interface events cause this to happen.

Without this, if config is read in before full connection
to zebra, babel will never establish neighbors.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agobabeld: The function is already a pointer
Donald Sharp [Sat, 28 Jan 2023 14:31:52 +0000 (09:31 -0500)]
babeld: The function is already a pointer

Don't send the address of in.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agobgpd: move tunnel-ip comparison into handler
Trey Aspelund [Wed, 25 Jan 2023 18:25:20 +0000 (13:25 -0500)]
bgpd: move tunnel-ip comparison into handler

Moves the old/new IP comparison into handle_tunnel_ip_change instead of
expecting the caller to do the check on their own.
Also changes handle_tunnel_ip_change to return void since it only ever
returned 0 in all cases.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
16 months agobgpd: only unimport routes if tunnel-ip changes
Trey Aspelund [Wed, 25 Jan 2023 18:07:43 +0000 (13:07 -0500)]
bgpd: only unimport routes if tunnel-ip changes

When processing a new local VNI, we were always walking the global EVPN
table to look for routes that needed to be removed due to a martian
nexthop change (specifically a tunnel-ip change).
Since the martian TIP table is global (all VNIs) + the walk is also in
the global table (all VNIs), we can trust that any new TIP from any VNI
would result in routes getting removed from the global table and
unimported from all live (L2)VNIs.
i.e.
The only time this update is actionable is if we are adding/removing an
IP from the martian TIP table, and we do not need to walk the table for
normal refcount adjustments.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
16 months agoMerge pull request #12690 from opensourcerouting/feature/deny_merging_prs_with_freeze...
Donald Sharp [Fri, 27 Jan 2023 12:43:02 +0000 (07:43 -0500)]
Merge pull request #12690 from opensourcerouting/feature/deny_merging_prs_with_freeze_label

github: Prevent merging (fail CI) if 'freeze' label exists for PR

16 months agoMerge pull request #12691 from mjstapp/fix_dplane_prov_lock
Donald Sharp [Fri, 27 Jan 2023 12:35:50 +0000 (07:35 -0500)]
Merge pull request #12691 from mjstapp/fix_dplane_prov_lock

zebra: fix SA warning, don't lock plugin list

16 months agobuild: enable format string warnings
David Lamparter [Thu, 26 Jan 2023 13:18:51 +0000 (14:18 +0100)]
build: enable format string warnings

I thought these were included in `-Wall -Wextra`, but apparently not.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agobfdd: fix size_t format string
David Lamparter [Fri, 27 Jan 2023 10:14:35 +0000 (11:14 +0100)]
bfdd: fix size_t format string

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agobgpd: fix silly format string SNAFU
David Lamparter [Thu, 26 Jan 2023 13:55:16 +0000 (14:55 +0100)]
bgpd: fix silly format string SNAFU

Someone thought vty_out accepts a list of strings.  It does not.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agobgpd: fix format string mess in AS-path printing
David Lamparter [Thu, 26 Jan 2023 13:45:11 +0000 (14:45 +0100)]
bgpd: fix format string mess in AS-path printing

This was done *very* weirdly.  Make it slightly less so.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agolib: literal constant format string for termtable
David Lamparter [Thu, 26 Jan 2023 13:23:50 +0000 (14:23 +0100)]
lib: literal constant format string for termtable

While this wasn't a problematic use of a format string, make it a
literal constant so the compiler is happy.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months ago*: fix non-const northbound XPath format strings
David Lamparter [Thu, 26 Jan 2023 13:56:04 +0000 (14:56 +0100)]
*: fix non-const northbound XPath format strings

Passing a pre-formatted buffer in these places needs a `"%s"` in front
so it doesn't get formatted twice.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months ago*: no-warn pragmas for non-const format strings
David Lamparter [Thu, 26 Jan 2023 13:53:47 +0000 (14:53 +0100)]
*: no-warn pragmas for non-const format strings

We do use non-constant/literal format strings in a few places for more
or less valid reasons;  put `ignored "-Wformat-nonliteral"` around those
so we can have the warning enabled for everywhere else.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months ago*: apply proper format string attributes
David Lamparter [Thu, 26 Jan 2023 13:21:02 +0000 (14:21 +0100)]
*: apply proper format string attributes

So that we get warnings about broken format strings.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agoMerge pull request #12696 from donaldsharp/shadowed
Donatas Abraitis [Fri, 27 Jan 2023 09:50:27 +0000 (11:50 +0200)]
Merge pull request #12696 from donaldsharp/shadowed

Shadowed

16 months agolib: Remove global variable exposure `struct host host`
Donald Sharp [Thu, 26 Jan 2023 15:53:47 +0000 (10:53 -0500)]
lib: Remove global variable exposure `struct host host`

This was only used in one place and we have accessor functions
now.  So let's use them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agowatchfrr: dmn variable shadows previous declaration
Donald Sharp [Thu, 26 Jan 2023 15:44:52 +0000 (10:44 -0500)]
watchfrr: dmn variable shadows previous declaration

There is no need to declar the same temp variable 2 times.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: i declaration shadows other i declared
Donald Sharp [Thu, 26 Jan 2023 15:41:55 +0000 (10:41 -0500)]
zebra: i declaration shadows other i declared

Clear up some confustion

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agolib: Forward declaration of a struct does not need to have data type
Donald Sharp [Thu, 26 Jan 2023 15:37:39 +0000 (10:37 -0500)]
lib: Forward declaration of a struct does not need to have data type

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agoMerge pull request #12694 from donaldsharp/zebra_rib_dead_code
Rafael Zalamena [Thu, 26 Jan 2023 16:30:55 +0000 (13:30 -0300)]
Merge pull request #12694 from donaldsharp/zebra_rib_dead_code

remove dead code

16 months agolib: Remove dead code
Donald Sharp [Wed, 25 Jan 2023 20:45:39 +0000 (15:45 -0500)]
lib: Remove dead code

wheel_stop and wheel_start have never been used.  Let's just remove
them.  After close to 7 years, if needed someone else can add back in.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Remove impossible to use function
Donald Sharp [Wed, 25 Jan 2023 20:27:41 +0000 (15:27 -0500)]
zebra: Remove impossible to use function

The rib_update_handle_vrf function is no longer being used.
Cleanup it's usage from zebra.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: fix SA warning, don't lock plugin list
Mark Stapp [Wed, 25 Jan 2023 13:38:47 +0000 (08:38 -0500)]
zebra: fix SA warning, don't lock plugin list

Locking around the list of providers/plugins is not
helpful - these only change at init time. Clear some SA
warnings by removing the locking.

Signed-off-by: Mark Stapp <mjs@labn.net>
16 months agoMerge pull request #12685 from louis-6wind/fix-vpnv4-noretain
Donatas Abraitis [Wed, 25 Jan 2023 09:23:08 +0000 (11:23 +0200)]
Merge pull request #12685 from louis-6wind/fix-vpnv4-noretain

topotests: fix bgp_vpnv4_noretain

16 months agogithub: Prevent merging (fail CI) if 'freeze' label exists for PR
Donatas Abraitis [Wed, 25 Jan 2023 08:43:55 +0000 (10:43 +0200)]
github: Prevent merging (fail CI) if 'freeze' label exists for PR

Mostly useful duging the freeze period to warn the maintainers from merging
unwanted PRs.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #12660 from Pdoijode/ip-nht-json-changes
Donatas Abraitis [Wed, 25 Jan 2023 08:32:18 +0000 (10:32 +0200)]
Merge pull request #12660 from Pdoijode/ip-nht-json-changes

zebra: fix JSON fields for "show ip/ipv6 nht"

16 months agoMerge pull request #12684 from chiragshah6/fdev2
Donatas Abraitis [Wed, 25 Jan 2023 08:30:10 +0000 (10:30 +0200)]
Merge pull request #12684 from chiragshah6/fdev2

bgpd: evpn route detail json display non prett

16 months agozebra: fix JSON fields for "show ip/ipv6 nht"
Pooja Jagadeesh Doijode [Wed, 25 Jan 2023 02:15:36 +0000 (18:15 -0800)]
zebra: fix JSON fields for "show ip/ipv6 nht"

1. Renamed "gates" to "nexthops"
2. Displaying afi of the nexthops being dispalyed in place of
   "nexthops" JSON object in the old JSON output
3. Calling show_route_nexthop_helper() and show_nexthop_json_helper()
   instead of print_nh() inorder to keeps the fields in "nexthops"
   JSON object in sync with "nexthops" JSON object of
   "show nexthop-group rib json".

Updated vtysh:
    r1# show ip nht
    192.168.0.2
     resolved via connected
     is directly connected, r1-eth0 (vrf default)
     Client list: static(fd 28)
    192.168.0.4
     resolved via connected
     is directly connected, r1-eth0 (vrf default)
     Client list: static(fd 28)

Updated JSON:
    r1# show ip nht json
    {
      "default":{
        "ipv4":{
          "192.168.0.2":{
            "nhtConnected":false,
            "clientList":[
              {
                "protocol":"static",
                "socket":28,
                "protocolFiltered":"none"
              }
            ],
            "nexthops":[
              {
                "flags":3,
                "fib":true,
                "directlyConnected":true,
                "interfaceIndex":2,
                "interfaceName":"r1-eth0",
                "vrf":"default",
                "active":true
              }
            ],
            "resolvedProtocol":"connected"
          }
        }
      }
    }

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
16 months agoMerge pull request #12680 from mjstapp/fix_dplane_lists
Rafael Zalamena [Tue, 24 Jan 2023 21:46:52 +0000 (18:46 -0300)]
Merge pull request #12680 from mjstapp/fix_dplane_lists

zebra: use typesafe lib lists in zebra dplane

16 months agoMerge pull request #12670 from louis-6wind/fix-bfd-zclient
Rafael Zalamena [Tue, 24 Jan 2023 19:52:54 +0000 (16:52 -0300)]
Merge pull request #12670 from louis-6wind/fix-bfd-zclient

lib: do not reopen a zclient socket for bfd

16 months agodebian: merge changelogs
David Lamparter [Tue, 24 Jan 2023 14:56:57 +0000 (15:56 +0100)]
debian: merge changelogs

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agodebian: point watch file at git tarball
David Lamparter [Tue, 24 Jan 2023 14:25:54 +0000 (15:25 +0100)]
debian: point watch file at git tarball

The tar.xz dist tarball doesn't exist for new releases.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 5a1130213c9a0c721017cf7922ffc969e96ac94b)

16 months agodebian: frickel a working debian/watch file
David Lamparter [Mon, 2 Jan 2023 11:08:41 +0000 (12:08 +0100)]
debian: frickel a working debian/watch file

Github changed the HTML for their releases tab, making download links a
javascript thing.  Which does not jive with uscan... at all...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 3c185cf70c90ba03349b6e7fb14a9986f4c21d4d)

16 months agodebian: fiddle with lintian spellcheck overrides
David Lamparter [Mon, 2 Jan 2023 12:56:11 +0000 (13:56 +0100)]
debian: fiddle with lintian spellcheck overrides

Apparently now the binary filename is after the item...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit f032ce0a66818e572a45c8f34316ded95d4f9701)

16 months agodebian: fix python3 shebang in new files
David Lamparter [Mon, 2 Jan 2023 12:48:27 +0000 (13:48 +0100)]
debian: fix python3 shebang in new files

Already done for existing python scripts in the install, just need to
add new .py files.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 03cef3900334e72b06cb9505e23338f2cfb9b9e5)

16 months agodebian: remove bogus "iproute" dependency
David Lamparter [Mon, 2 Jan 2023 13:43:29 +0000 (14:43 +0100)]
debian: remove bogus "iproute" dependency

This is cargo cult from decades ago.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 75a7532a11cdf9cbb923c2a1ace5f0252fe4a70d)

16 months agodebian: remove unused debian/watchfrr.rc file
Ondřej Surý [Fri, 3 Jul 2020 10:46:48 +0000 (12:46 +0200)]
debian: 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>
(cherry picked from commit 5632ff61df74ced015db3a56ef0063e93292244f)

16 months agodebian: fix texinfo figure installation directory
David Lamparter [Mon, 2 Jan 2023 12:31:30 +0000 (13:31 +0100)]
debian: fix texinfo figure installation directory

As pointed out by lintian.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit b62f9af6b6716174c1510cc5160b11a40f37d6c0)

16 months agodebian: fix sphinx docs
David Lamparter [Mon, 2 Jan 2023 12:39:35 +0000 (13:39 +0100)]
debian: fix sphinx docs

- use dh_sphinxdoc to get rid of embedded JS

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit e1e2ea84eed7f1880e1ed3fa2cfa09eaa9d2cdc1)

16 months agodebian: fix cross-build marks (libelf/libpython3)
David Lamparter [Thu, 5 Jan 2023 17:04:43 +0000 (18:04 +0100)]
debian: fix cross-build marks (libelf/libpython3)

These two build-deps are for compile-time tools and thus need to be
marked :native.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit e9f0af06c90df7a8364534e2b2e5225ece00076f)

16 months agodebian: make cross-compile work
David Lamparter [Mon, 6 Apr 2020 17:28:56 +0000 (19:28 +0200)]
debian: make cross-compile work

This allows e.g. "sbuild --host=arm64" to build packages for other
architectures on, say, fat amd64 servers.  As a side effect, the Debian
build uses a separate builddir, which helps noting issues on that front.

Signed-off-by: David Lamparter <equinox@diac24.net>
(cherry-picked from commit d1312e009b62331d39d0b9e77997b2f42be66f46)

16 months agoyang: fix race condition in embedmodel.py mkdir
David Lamparter [Tue, 24 Jan 2023 17:17:05 +0000 (18:17 +0100)]
yang: fix race condition in embedmodel.py mkdir

Parallel build may be executing another copy of embedmodel.py at the
same time, with both getting "False" on the isdir check, and then both
trying to mkdir - one of which will error out.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agobuild: consistently mkdir -p output for redirect
David Lamparter [Tue, 24 Jan 2023 16:45:13 +0000 (17:45 +0100)]
build: consistently mkdir -p output for redirect

When running the build in a separate build directory, redirecting output
into a file can error out if the directory does not exist yet.  Some
places already had `mkdir -p` calls, but not all.

Make all occurences of this consistently use `@$(MKDIR_P)`.

(Extension of PR #12575 to catch more places.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
16 months agoMerge pull request #12575 from anlancs/fix/build-vtysh-missing-dir
David Lamparter [Tue, 24 Jan 2023 16:40:55 +0000 (17:40 +0100)]
Merge pull request #12575 from anlancs/fix/build-vtysh-missing-dir

16 months agoMerge pull request #12682 from opensourcerouting/time-cs
Russ White [Tue, 24 Jan 2023 15:51:44 +0000 (10:51 -0500)]
Merge pull request #12682 from opensourcerouting/time-cs

*: fix time truncation in many places

16 months agoMerge pull request #12678 from opensourcerouting/fix/missing_no_form_for_path_attribu...
Russ White [Tue, 24 Jan 2023 15:45:03 +0000 (10:45 -0500)]
Merge pull request #12678 from opensourcerouting/fix/missing_no_form_for_path_attribute_discard

bgpd: Add missing `no` form for `neighbor path-attribute discard` cmd

16 months agoMerge pull request #12634 from anlancs/fix/lib-seq-adjust-return-value
Russ White [Tue, 24 Jan 2023 15:36:17 +0000 (10:36 -0500)]
Merge pull request #12634 from anlancs/fix/lib-seq-adjust-return-value

lib: fix wrong returned value for filter

16 months agoMerge pull request #12640 from vfreex/babel-no-commands
Russ White [Tue, 24 Jan 2023 15:33:24 +0000 (10:33 -0500)]
Merge pull request #12640 from vfreex/babel-no-commands

babeld: Add missing `no` commands

16 months agoMerge pull request #10405 from kanaya516/feature/adj-sid-yang
Russ White [Tue, 24 Jan 2023 15:26:07 +0000 (10:26 -0500)]
Merge pull request #10405 from kanaya516/feature/adj-sid-yang

isisd: yang for adjacency-sid and lan-adjacency-sid

16 months agoMerge pull request #12647 from anlancs/fix/bgpd-type-2
Russ White [Tue, 24 Jan 2023 15:13:22 +0000 (10:13 -0500)]
Merge pull request #12647 from anlancs/fix/bgpd-type-2

bgpd: cosmetic changes for debug

16 months agolib: remove concurrent nexthop zapi (un)registration
Louis Scalbert [Mon, 23 Jan 2023 12:33:22 +0000 (13:33 +0100)]
lib: remove concurrent nexthop zapi (un)registration

Daemons like staticd already implement nexthop zapi (un)registration.
b7ca809d1c ("lib: BFD automatic source selection") has implemented a
concurrent nexthop (un)registration. Some nexthop could be unregistred
by the bfd whereas they were still needed by the daemon.

Let the deamons deal with nexthop zapi (un)registration.

Fixes: b7ca809d1c ("lib: BFD automatic source selection")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agolib: do not reopen a zclient socket for bfd
Louis Scalbert [Mon, 23 Jan 2023 10:57:57 +0000 (11:57 +0100)]
lib: do not reopen a zclient socket for bfd

b7ca809d1c ("lib: BFD automatic source selection") has added a dedicated
zclient socket for nht tracking. Since the bfd lib is used by daemons
that already has a zclient socket, those daemons has now a second
zclient socket. However, zebra does not distinguish the two zclient
sessions. For example, the interfaces are asked a second via
zebra_message_send(zclient, ZEBRA_INTERFACE_ADD, VRF_DEFAULT) in
zclient_start(). As a result, callbacks functions like bgp_ifp_create()
are called a second time, which causes some processing overhead and
might cause bugs.

Re-use the existing zclient socket for nht tracking.

Note that BFD automatic source selection is only currently implemented
in staticd. Other daemons will require to add the following in their
ZEBRA_NEXTHOP_UPDATE callback function:

>  if (zclient->bfd_integration)
> bfd_nht_update(&matched, &nhr);

Fixes: b7ca809d1c ("lib: BFD automatic source selection")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agoMerge pull request #12681 from pguibert6WIND/vpnv6_encode_plus
Donatas Abraitis [Tue, 24 Jan 2023 12:47:58 +0000 (14:47 +0200)]
Merge pull request #12681 from pguibert6WIND/vpnv6_encode_plus

Vpnv6 encode plus

16 months agotopotests: fix bgp_vpnv4_noretain
Louis Scalbert [Mon, 23 Jan 2023 17:03:58 +0000 (18:03 +0100)]
topotests: fix bgp_vpnv4_noretain

Fix the following issues:
- two tests are done in one function. Dispatch the tests in two
functions to help the test debug.
- the first test passes even if a third prefix is not filtered. Match
the exact to avoid false positive.
- the expected values contains variable like version. Do no check
variable values.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agoMerge pull request #12679 from spk-hebbar/master
Donatas Abraitis [Tue, 24 Jan 2023 08:01:55 +0000 (10:01 +0200)]
Merge pull request #12679 from spk-hebbar/master

zebra_fpm: Add support for other protocols in fpm:netlink

16 months agobgpd: fix when route-map changes the link local nexthop for vpnv6
Philippe Guibert [Mon, 23 Jan 2023 15:31:12 +0000 (16:31 +0100)]
bgpd: fix when route-map changes the link local nexthop for vpnv6

This fix updates the nexthop length of a bgp update to be
transmitted to a remote peer. Before the previous commit,
the ipv6 nexthop length was internally set to 32 bytes which
was not correct, as it should be 48 bytes which is conform
to the vpnv6 encoding format.

However, without the previous match, even if internally, the
nexthop length was set to 32, the real nexthop length was set
to 48 bytes, and everything was operating ok.

Now, if we use the following route-map, and attach it to
outgoing for vpnv6 address family, then we have a malformed
packet detected, and the peering breaks.

 > route-map rmap permit 1
 > set ipv6 next-hop global 5:5::3:6
 > set ipv6 next-hop local fe80:55::333:222

Maintain the mp_nexthop_len to 48 bytes if it was already set
to 48 previously.

Fixes: 35ac9b53f2e2 ("bgpd: fix vpnv6 nexthop encoding")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
16 months agobgpd: evpn route detail json display non prett
Chirag Shah [Tue, 24 Jan 2023 06:18:24 +0000 (22:18 -0800)]
bgpd: evpn route detail json display non prett

For BGP evpn route table detail json to use
non pretty form of display.

Problem:
In scaled evpn route table detail json dump
occupies high resources (CPU + memory) of the system.
In high scale evpn route dump using pretty form
hogs CPU for a while which can trigger watchfrr
to kill bgpd.

Solution:
Avoid pretty JSON print for detail version dump

Signed-off-by: Chirag Shah <chirag@nvidia.com>
16 months agoMerge pull request #12677 from opensourcerouting/fix/ospf_potential_memory_leak
mobash-rasool [Tue, 24 Jan 2023 04:24:44 +0000 (09:54 +0530)]
Merge pull request #12677 from opensourcerouting/fix/ospf_potential_memory_leak

ospfd: Free memory for JSON allocated object before return