]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #4402 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Wed, 29 May 2019 19:44:41 +0000 (12:44 -0700)]
Merge pull request #4402 from chiragshah6/evpn_dev1

bgpd: fix debug to have proper nhop display

5 years agoMerge pull request #4415 from mjstapp/dplane_dist_setters
Donald Sharp [Wed, 29 May 2019 19:39:27 +0000 (15:39 -0400)]
Merge pull request #4415 from mjstapp/dplane_dist_setters

zebra: add setters for distance, instance

5 years agoMerge pull request #4351 from patrasar/pim_show_ip_mroute_summary
Donald Sharp [Wed, 29 May 2019 19:38:47 +0000 (15:38 -0400)]
Merge pull request #4351 from patrasar/pim_show_ip_mroute_summary

pimd: new cli command show ip mroute summary

5 years agozebra: add setters for distance, instance
Mark Stapp [Fri, 17 May 2019 18:41:01 +0000 (14:41 -0400)]
zebra: add setters for distance, instance

Add a few more 'setters' for dplane context objects.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agopimd: new cli command show ip mroute summary
Sarita Patra [Thu, 16 May 2019 16:58:28 +0000 (09:58 -0700)]
pimd: new cli command show ip mroute summary

Introduced a new command "show ip mroute summary"
to display total number of (*, G) and (S, G) mroutes
created and number of mroutes installed in the kernel.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agoMerge pull request #4414 from opensourcerouting/feature/fix-isis-warnings
Mark Stapp [Wed, 29 May 2019 15:38:42 +0000 (11:38 -0400)]
Merge pull request #4414 from opensourcerouting/feature/fix-isis-warnings

isisd: Fix some minor warnings

5 years agoMerge pull request #4326 from sworleys/Move-NH-Active-Functions
Mark Stapp [Wed, 29 May 2019 15:35:27 +0000 (11:35 -0400)]
Merge pull request #4326 from sworleys/Move-NH-Active-Functions

zebra: Move nexthop_active_XXX functions to zebra_nhg.c

5 years agoMerge pull request #4404 from qlyoung/const-linklist
Mark Stapp [Wed, 29 May 2019 15:28:08 +0000 (11:28 -0400)]
Merge pull request #4404 from qlyoung/const-linklist

lib: const a couple linklist apis

5 years agoMerge pull request #4228 from mjstapp/dplane_notif
Donald Sharp [Wed, 29 May 2019 14:10:05 +0000 (10:10 -0400)]
Merge pull request #4228 from mjstapp/dplane_notif

zebra: async notifications from the dataplane

5 years agoisisd: Remove unnecessary use of strcpy
Christian Franke [Wed, 29 May 2019 12:44:07 +0000 (14:44 +0200)]
isisd: Remove unnecessary use of strcpy

`strcpy` is a dangerous function and should not be used. In this
particular place, there is no need for copying strings at all, so let's
just stick to referencing static strings.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: Remove warning about shadowing a variable
Christian Franke [Wed, 29 May 2019 12:43:24 +0000 (14:43 +0200)]
isisd: Remove warning about shadowing a variable

There is no need to redefine `struct isis_lsp *lsp` inside of the
if condition. Let's just remove it.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoMerge pull request #4401 from manuhalo/fix_isisd_remove_conf
Donald Sharp [Wed, 29 May 2019 11:46:38 +0000 (07:46 -0400)]
Merge pull request #4401 from manuhalo/fix_isisd_remove_conf

isisd: del routes when area is unconfigured

5 years agoisisd: del routes when area is unconfigured
Emanuele Di Pascale [Tue, 28 May 2019 14:46:06 +0000 (16:46 +0200)]
isisd: del routes when area is unconfigured

attempt to fix #4399

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge pull request #4407 from opensourcerouting/snap-fix-master
Donald Sharp [Wed, 29 May 2019 01:06:20 +0000 (21:06 -0400)]
Merge pull request #4407 from opensourcerouting/snap-fix-master

Snap fix master

5 years agosnapcraft: Add libdb5.3 dependency
Martin Winter [Tue, 28 May 2019 22:56:24 +0000 (00:56 +0200)]
snapcraft: Add libdb5.3 dependency

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agosnapcraft: Disable libyang CACHE for snap package (Temp workaround)
Martin Winter [Mon, 18 Feb 2019 15:57:24 +0000 (07:57 -0800)]
snapcraft: Disable libyang CACHE for snap package (Temp workaround)

There seems to be a bug in latest libyang running when running in
a snap container which causes a failure of the cache logic. Disable
CACHE for now as it's not yet needed. Will be re-enabled in a later
release

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agosnapcraft: Add FabricD to Snap package
Martin Winter [Thu, 7 Feb 2019 23:12:14 +0000 (15:12 -0800)]
snapcraft: Add FabricD to Snap package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agosnapcraft: Update bgpd to use newer rpki lib
Martin Winter [Thu, 7 Feb 2019 22:44:47 +0000 (14:44 -0800)]
snapcraft: Update bgpd to use newer rpki lib

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agosnapcraft: Add libyang to snap package
Martin Winter [Thu, 17 Jan 2019 19:02:04 +0000 (11:02 -0800)]
snapcraft: Add libyang to snap package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agosnapcraft: Add missing staticd.conf.default
Martin Winter [Thu, 7 Feb 2019 15:07:25 +0000 (07:07 -0800)]
snapcraft: Add missing staticd.conf.default

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agosnapcraft: Don't stage libc6
Martin Winter [Thu, 17 Jan 2019 19:01:05 +0000 (11:01 -0800)]
snapcraft: Don't stage libc6

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agosnapcraft: Update RTRLIB to 0.6.3
Martin Winter [Thu, 17 Jan 2019 16:32:47 +0000 (08:32 -0800)]
snapcraft: Update RTRLIB to 0.6.3

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agozebra: Move nexthop_active_XXX functions to zebra_nhg.c
Stephen Worley [Mon, 13 May 2019 19:46:05 +0000 (12:46 -0700)]
zebra: Move nexthop_active_XXX functions to zebra_nhg.c

Since these functions are not really rib processing problems
let's move them to zebra_nhg.c which is meant for processing of
nexthop groups.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: fix debug to have proper nhop display
Chirag Shah [Sat, 25 May 2019 00:50:46 +0000 (17:50 -0700)]
bgpd: fix debug to have proper nhop display

Display nexthop based on route type.

Ticket:CM-25129
Testing Done:

evpn route:
*  [2]:[0]:[0]:[48]:[aa:aa:aa:aa:01:1a]:[32]:[45.0.2.111]
    36.0.0.25              0 64000 5560 i

old:
BGP: Tx route add VRF 46 45.0.2.111/32 metric 0 tag 0 flags 0x1409 nhnum 1
BGP:   nhop [1]: 2400:1d:: if 50 VRF 46

New:
BGP: import evpn prefix [2]:[aa:aa:aa:aa:01:1a]:[45.0.2.111]/224 as
ip prefix 45.0.2.111/32 in vrf vrf1

BGP: bgp_zebra_announce: p=45.0.2.111/32, bgp_is_valid_label: 2
BGP: Tx route add VRF 46 45.0.2.111/32 metric 0 tag 0 flags 0x1409 nhnum 1
BGP:   nhop [1]: 36.0.0.25 if 50 VRF 46

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agolib: const a couple linklist apis
Quentin Young [Wed, 22 May 2019 16:27:16 +0000 (16:27 +0000)]
lib: const a couple linklist apis

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4391 from ton31337/feature/delete_prefix_list_by_sequence_number
Donald Sharp [Tue, 28 May 2019 20:14:52 +0000 (16:14 -0400)]
Merge pull request #4391 from ton31337/feature/delete_prefix_list_by_sequence_number

plist: Delete prefix-list by sequence number

5 years agozebra: generate updates from notifications
Mark Stapp [Sun, 14 Apr 2019 21:16:11 +0000 (17:16 -0400)]
zebra: generate updates from notifications

If an async notification changes a route that's current,
generate an update to keep the kernel in sync.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4384 from dslicenc/bgp-no-delete-default
Lou Berger [Tue, 28 May 2019 15:45:34 +0000 (11:45 -0400)]
Merge pull request #4384 from dslicenc/bgp-no-delete-default

bgpd: disable deleting default instance if vrf instances exist

5 years agoMerge pull request #4371 from manuhalo/fix_isisd_large_mtu
Olivier Dugeon [Tue, 28 May 2019 15:40:39 +0000 (17:40 +0200)]
Merge pull request #4371 from manuhalo/fix_isisd_large_mtu

isisd: support circuits with mtu > 8192

5 years agoMerge pull request #4239 from sarav511/rp
Jafar Al-Gharaibeh [Tue, 28 May 2019 15:26:28 +0000 (10:26 -0500)]
Merge pull request #4239 from sarav511/rp

pimd: PIM Bootstrap Message Processing

5 years agoMerge pull request #4322 from sworleys/Nexthop-Cmp
Renato Westphal [Tue, 28 May 2019 14:32:44 +0000 (11:32 -0300)]
Merge pull request #4322 from sworleys/Nexthop-Cmp

lib: Add nexthop_cmp

5 years agozebra: mpls lsp async notifications
Mark Stapp [Fri, 12 Apr 2019 19:34:12 +0000 (15:34 -0400)]
zebra: mpls lsp async notifications

Add LSP notification event type; add a handler for LSP notifs;
dispatch to that handler.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: add dplane context lsp setters
Mark Stapp [Fri, 3 May 2019 15:02:16 +0000 (11:02 -0400)]
zebra: add dplane context lsp setters

Add some setters for dataplane context LSP data to support
LSP async notifications.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: support route changes via dplane notifications
Mark Stapp [Wed, 10 Apr 2019 16:04:00 +0000 (12:04 -0400)]
zebra: support route changes via dplane notifications

Allow route notifications to trigger route state changes,
such as installed -> not installed.

Clean up the fib-specific nexthop-group in a couple of
un-install paths.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: share rib processing of updates and notifications
Mark Stapp [Fri, 5 Apr 2019 14:38:35 +0000 (10:38 -0400)]
zebra: share rib processing of updates and notifications

Use some common handling for both route update results
processing and dataplane notification processing. Use the
fib-specific nexthop-group if the update to a route results
in different nexthop status than the default rib-provided
nexthop-group.

Use the fib-specific nexthop-group, if present, to provide
the output of 'show ip fib'.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: add 'set' api for dplane context provider
Mark Stapp [Wed, 3 Apr 2019 08:46:14 +0000 (04:46 -0400)]
zebra: add 'set' api for dplane context provider

Add a setter for the 'source provider' attribute in dplane
contexts.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: add source plugin info to dplane context
Mark Stapp [Tue, 2 Apr 2019 16:25:33 +0000 (12:25 -0400)]
zebra: add source plugin info to dplane context

Some updates may be the result of a plugin's actions - such
as an async notification. Add accessor so that we can
identify that an update was generated by a plugin.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: add a fib-specific nexthop-group
Mark Stapp [Mon, 25 Mar 2019 21:25:46 +0000 (17:25 -0400)]
zebra: add a fib-specific nexthop-group

Add a fib-specific nhg, distinct from the nhg developed from
the route-owner / RIB information.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: add dplane context accessors
Mark Stapp [Sun, 17 Mar 2019 18:41:11 +0000 (14:41 -0400)]
zebra: add dplane context accessors

Add several accessors for data items needed to produce a
notification context.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: begin dataplane notifications
Mark Stapp [Wed, 20 Mar 2019 20:40:27 +0000 (16:40 -0400)]
zebra: begin dataplane notifications

Add dataplane route notification type; add handler for zebra
routes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: set nexthop install state more accurately
Mark Stapp [Wed, 20 Mar 2019 18:44:29 +0000 (14:44 -0400)]
zebra: set nexthop install state more accurately

When setting route nexthops' installation state based on a
dataplane context struct, unset the installed state if a
nexthop was not present in the dataplane context.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: add api to locate route-node from dplane ctx
Mark Stapp [Wed, 20 Mar 2019 15:27:20 +0000 (11:27 -0400)]
zebra: add api to locate route-node from dplane ctx

Create a helper api that locates a zebra route-node from info
in a dplane context struct. Moved code from the results handler
to make a more-general api that could be used in other paths.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: add api to update route from dplane ctx
Mark Stapp [Tue, 19 Mar 2019 20:18:42 +0000 (16:18 -0400)]
zebra: add api to update route from dplane ctx

Add an api to update the status of a route based on info
from a dplane context object. Use the api when processing
route update results from the dataplane.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: add a start callback for dplane plugins
Mark Stapp [Fri, 12 Apr 2019 15:27:13 +0000 (11:27 -0400)]
zebra: add a start callback for dplane plugins

Add a callback called at start time, once the dplane pthread
and thread_master are available. The callback is optional.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4377 from ton31337/feature/show_fqdn_in_show_ip_bgp
Russ White [Tue, 28 May 2019 11:53:20 +0000 (07:53 -0400)]
Merge pull request #4377 from ton31337/feature/show_fqdn_in_show_ip_bgp

bgpd: Show FQDN in `show [ip] bgp` output

5 years agoMerge pull request #4346 from pguibert6WIND/regression_bgp_down_bfd
Russ White [Tue, 28 May 2019 11:51:25 +0000 (07:51 -0400)]
Merge pull request #4346 from pguibert6WIND/regression_bgp_down_bfd

bgpd: do not unregister bfd session when bgp session goes down

5 years agoMerge pull request #4396 from donaldsharp/rpki_stuff
Renato Westphal [Mon, 27 May 2019 23:57:19 +0000 (20:57 -0300)]
Merge pull request #4396 from donaldsharp/rpki_stuff

bgpd: convert a couple of debug strings in rpki to prefix2str

5 years agoMerge pull request #4394 from donaldsharp/list_doc_update
Renato Westphal [Mon, 27 May 2019 23:56:06 +0000 (20:56 -0300)]
Merge pull request #4394 from donaldsharp/list_doc_update

doc: Update docs to represent changes on the ground

5 years agoMerge pull request #4390 from qlyoung/frrstr-beginswith-endswith
Renato Westphal [Mon, 27 May 2019 23:55:14 +0000 (20:55 -0300)]
Merge pull request #4390 from qlyoung/frrstr-beginswith-endswith

lib: rename begins_with, add frrstr_endswith

5 years agobgpd: convert a couple of debug strings in rpki to prefix2str
Donald Sharp [Mon, 27 May 2019 01:51:59 +0000 (21:51 -0400)]
bgpd: convert a couple of debug strings in rpki to prefix2str

Was getting a couple of compile errors with newer compilers
when compiling rpki around the prefix length.  Convert
them over to prefix2str as that is all it is doing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: Update docs to represent changes on the ground
Donald Sharp [Sun, 26 May 2019 00:28:35 +0000 (20:28 -0400)]
doc: Update docs to represent changes on the ground

The lists documentation had not been updated to represent
the for_eachXXX to frr_eachXXX changes.  Make it so.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoplist: Delete prefix-list by sequence number
Donatas Abraitis [Fri, 24 May 2019 06:22:09 +0000 (09:22 +0300)]
plist: Delete prefix-list by sequence number

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agozebra: Add kernel level graceful restart (#4301)
David Lamparter [Sat, 25 May 2019 09:43:10 +0000 (11:43 +0200)]
zebra: Add kernel level graceful restart (#4301)

zebra: Add kernel level graceful restart

5 years agoMerge branch 'pr4392'
David Lamparter [Sat, 25 May 2019 09:37:53 +0000 (11:37 +0200)]
Merge branch 'pr4392'

... with an extra space character added.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodoc: fix space character nit
David Lamparter [Sat, 25 May 2019 09:37:06 +0000 (11:37 +0200)]
doc: fix space character nit

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd, lib: Remove SO_MARK
Donald Sharp [Fri, 24 May 2019 12:30:53 +0000 (08:30 -0400)]
bgpd, lib: Remove SO_MARK

The SO_MARK socket option was being used pre vrf to allow for the
separation of the front panel -vs- the management port.  This
was facilitated by a ip rule.  Since this is undocumented anywhere
in our system( other than old commits see
ed40466af80c9d0b88436c637a1d54b28a669b1c ).  We should remove this
because this will cause interference with people using rules
and are not aware of this offshoot of functionality.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Display FD used for peer
Donald Sharp [Fri, 24 May 2019 12:27:19 +0000 (08:27 -0400)]
bgpd: Display FD used for peer

When issuing a `show bgp neighbor...` command display to the
end user the FD used for communication.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: Add 'show thread cpu' and 'show thread poll' documentation
Donald Sharp [Fri, 24 May 2019 12:15:40 +0000 (08:15 -0400)]
doc: Add 'show thread cpu' and 'show thread poll' documentation

Add some very basic 'show thread cpu' and 'show thread poll'
documentation to our system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc, tools: Update to code to show example MAX_FDS
Donald Sharp [Fri, 24 May 2019 12:04:33 +0000 (08:04 -0400)]
doc, tools: Update to code to show example MAX_FDS

Place in the code the ability for end operators to know how
to modify MAX_FDS so that they can run large scale operations.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Display to end user the MAX_FDS allowed
Donald Sharp [Fri, 24 May 2019 11:53:32 +0000 (07:53 -0400)]
lib: Display to end user the MAX_FDS allowed

Upon startup FRR reads in the MAX_FDS variable from
it's control files via the getrlimit call.  We then
setup code to limit the poll data structure size to
that value.  The OS also limits our FD's to that value
because that is what is set.  Provide a methodology
that a interested end user can figure this data out.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: 'show thread cpu' help strings referenced a weird option
Donald Sharp [Fri, 24 May 2019 12:22:07 +0000 (08:22 -0400)]
lib: 'show thread cpu' help strings referenced a weird option

The 'show thread cpu' command referenced a 'b' option.  Which
is not parsed at all in the parse_filter function.  As such
I do not know what this was referencing as that it has been
removed.  Update the help strings to reflect this reality.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc, zebra: Remove `keep_kernel_mode` from zebra
Donald Sharp [Sat, 11 May 2019 07:50:11 +0000 (03:50 -0400)]
doc, zebra: Remove `keep_kernel_mode` from zebra

This code doees this:

a) Imagine ospf installs a route into zebra.  Zebra crashes and
we restart FRR.  If we are using the -k option on zebra than
all routes are re-read in, including this OSPF route.
b) Now imagine at the same time that zebra is starting backup
ospf on a different router looses a link to the this route.
c) Since zebra was run with -k this OSPF route is read back
in but never replaced and we now have a route pointing out
an interface to other routers that cannot handle it.

We should never allow users to implement bad options from zebra's
perspective that allow them to put themselves into a clear problem
state and additionally we have *absolutely* no mechanism to ever
fix that broken route without special human interaction.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Add kernel level graceful restart
Donald Sharp [Fri, 10 May 2019 00:06:13 +0000 (20:06 -0400)]
zebra: Add kernel level graceful restart

<Initial Code from Praveen Chaudhary>

Add the a `--graceful_restart X` flag to zebra start that
now creates a timer that pops in X seconds and will go
through and remove all routes that are older than startup.

If graceful_restart is not specified then we will just pop
a timer that cleans everything up immediately.

Signed-off-by: Praveen Chaudhary <pchaudhary@linkedin.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: replace begins_with, add frrstr_endswith
Quentin Young [Sat, 18 May 2019 01:35:38 +0000 (01:35 +0000)]
lib: replace begins_with, add frrstr_endswith

* Change 'begins_with' to 'frrstr_startswith' for consistency
* Add suffix checker, frrstr_endswith()
* Update vtysh to use the new function

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib,zebra,bgpd,pbrd: Compare nexthops without labels
Stephen Worley [Wed, 22 May 2019 19:34:07 +0000 (15:34 -0400)]
lib,zebra,bgpd,pbrd: Compare nexthops without labels

Allow label ignoring when comparing nexthops. Specifically,
add another functon nexthop_same_no_labels() that shares
a path with nexthop_same() but doesn't check labels.

rib_delete() needs to ignore labels in this case.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agolib: Explicitly cmp gateway and source based on AF
Stephen Worley [Wed, 22 May 2019 19:17:21 +0000 (15:17 -0400)]
lib: Explicitly cmp gateway and source based on AF

Refactor the gatway and source nexthop comparision into a
common code path that compares them explicitly based on
their address family.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agolib,zebra,bgpd: Remove nexthop_same_no_recurse()
Stephen Worley [Tue, 14 May 2019 17:48:26 +0000 (10:48 -0700)]
lib,zebra,bgpd: Remove nexthop_same_no_recurse()

The functions nexthop_same() does not check the resolved
nexthops so I don't think this function is even needed
anymore.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agolib: Update nexthop_same to use nexthop_cmp
Stephen Worley [Tue, 14 May 2019 17:41:40 +0000 (10:41 -0700)]
lib: Update nexthop_same to use nexthop_cmp

Simplify the code a bit by making nexthop_same()
just use nexthop_cmp() internally.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agolib: Add labels_cmp to nexthop_cmp
Stephen Worley [Tue, 14 May 2019 17:39:49 +0000 (10:39 -0700)]
lib: Add labels_cmp to nexthop_cmp

Add labels comparison to nexthop_cmp() as well.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agolib: nexthop-cmp return if gateways don't match
Stephen Worley [Tue, 14 May 2019 17:37:45 +0000 (10:37 -0700)]
lib: nexthop-cmp return if gateways don't match

Fix the cmp check the so that it returns the result
if the gateways don't match.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agolib: Make labels_match function use labels_cmp
Stephen Worley [Tue, 14 May 2019 17:26:22 +0000 (10:26 -0700)]
lib: Make labels_match function use labels_cmp

Update the nexthop_labels_match() function to use
nexthop_labels_cmp().

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agolib: Add nexthop labels cmp functions
Stephen Worley [Tue, 14 May 2019 17:21:19 +0000 (10:21 -0700)]
lib: Add nexthop labels cmp functions

Add a function to compare nexthop labels.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agolib: Add nexthop_cmp
Donald Sharp [Fri, 1 Jun 2018 23:26:53 +0000 (19:26 -0400)]
lib: Add nexthop_cmp

Add function to allow us to have a sorted order
of nexthops.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoisisd: support circuits with mtu > 8192
Emanuele Di Pascale [Mon, 20 May 2019 16:03:52 +0000 (18:03 +0200)]
isisd: support circuits with mtu > 8192

the buffer to read from the socket when processing an incoming
packet was hardcoded to be of size 8192. If the mtu of the
interface is greater than that and hello padding is enabled
on that circuit, the hello message will be truncated, and this
will cause the adjacency establishment to fail. fix this by
using a large enough stack buffer instead

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agobgpd: disable deleting default instance if vrf instances exist
Don Slice [Mon, 22 Apr 2019 19:12:38 +0000 (15:12 -0400)]
bgpd: disable deleting default instance if vrf instances exist

Problem reported with deleting the default BGP instance where there
are vrf instances that depend on it (like l2vpn evpn vrfs).  Since
importing for vrf route-leaking also requires the existence of the
default instance, disallowing deleting the BGP default instance if
anyt vrf instance is also defined.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #4385 from manuhalo/fix_deprecate_retain
Quentin Young [Wed, 22 May 2019 19:02:27 +0000 (12:02 -0700)]
Merge pull request #4385 from manuhalo/fix_deprecate_retain

bgpd, ripd, ripngd: remove deprecated -r option

5 years agobgpd, ripd, ripngd: remove deprecated -r option
Emanuele Di Pascale [Wed, 22 May 2019 15:42:40 +0000 (17:42 +0200)]
bgpd, ripd, ripngd: remove deprecated -r option

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge pull request #4359 from adharkar/frr-master-rtm_vxlan
Donald Sharp [Tue, 21 May 2019 20:53:27 +0000 (16:53 -0400)]
Merge pull request #4359 from adharkar/frr-master-rtm_vxlan

Zebra: Handle VxLAN encap in netlink rtmsg for FPM

5 years agoMerge pull request #4374 from opensourcerouting/typesafe-minor-fixes
Donald Sharp [Tue, 21 May 2019 20:43:38 +0000 (16:43 -0400)]
Merge pull request #4374 from opensourcerouting/typesafe-minor-fixes

Minor fixes in the typesafe API for better C++ compatibility

5 years agoclang-format: update the ForEachMacros setting
Renato Westphal [Mon, 20 May 2019 21:52:16 +0000 (18:52 -0300)]
clang-format: update the ForEachMacros setting

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agotests: update list of headers in the cxx compat test
Renato Westphal [Mon, 20 May 2019 21:52:16 +0000 (18:52 -0300)]
tests: update list of headers in the cxx compat test

Now, whenever a new header is added to libfrr, this test needs to
be updated manually (unless we automate this somehow in the future).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years ago*: rename new ForEach macros from the typesafe API
Renato Westphal [Mon, 20 May 2019 21:52:16 +0000 (18:52 -0300)]
*: rename new ForEach macros from the typesafe API

This is necessary to avoid a name collision with std::for_each
from C++.

Fixes the compilation of the gRPC northbound module.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: add missing extern "C" {} blocks to new headers
Renato Westphal [Mon, 20 May 2019 21:52:16 +0000 (18:52 -0300)]
lib: add missing extern "C" {} blocks to new headers

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #4364 from FRRouting/doc-libsnmp-dev-debian9
Renato Westphal [Tue, 21 May 2019 18:54:49 +0000 (15:54 -0300)]
Merge pull request #4364 from FRRouting/doc-libsnmp-dev-debian9

doc: add libsnmp-dev to debian 9 build deps

5 years agobgpd: upon peer unconfiguration, remove bfd context if any
Philippe Guibert [Mon, 20 May 2019 12:52:44 +0000 (14:52 +0200)]
bgpd: upon peer unconfiguration, remove bfd context if any

upon peer unconfiguration, remove bfd context if necessary.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: add libsnmp-dev to debian 8 & 9 build deps
Quentin Young [Fri, 17 May 2019 17:12:12 +0000 (10:12 -0700)]
doc: add libsnmp-dev to debian 8 & 9 build deps

Needed for `--enable-snmp`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4373 from opensourcerouting/ds-dlist
Donald Sharp [Tue, 21 May 2019 13:53:08 +0000 (09:53 -0400)]
Merge pull request #4373 from opensourcerouting/ds-dlist

lib: DECLARE_DLIST + DECLARE_HEAP + other datastructure improvements

5 years agoMerge pull request #4376 from opensourcerouting/remove-deprecated-cmd
Donald Sharp [Tue, 21 May 2019 13:02:32 +0000 (09:02 -0400)]
Merge pull request #4376 from opensourcerouting/remove-deprecated-cmd

bgpd: remove deprecated "bgp enforce-first-as" command

5 years agobgpd: Show FQDN in `show [ip] bgp` output
Donatas Abraitis [Mon, 20 May 2019 13:43:01 +0000 (16:43 +0300)]
bgpd: Show FQDN in `show [ip] bgp` output

We already show this information in `show [ip] bgp <prefix`, thus why don't
show it in global output. It's very handy when using at scale and to see
the whole picture instead of resolving neighbor manually.

It will show FQDN only if `bgp default show-hostname` is toggled.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoRevert "lib: Make _find functions treat the head as const"
David Lamparter [Tue, 21 May 2019 02:53:30 +0000 (04:53 +0200)]
Revert "lib: Make _find functions treat the head as const"

This reverts commit 98d28ef55dd11a6efaa2bf3101ac57cf78e803bb.

No longer needed with previous commit.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib/table: remove nonsensical const, add pure
David Lamparter [Tue, 21 May 2019 02:48:30 +0000 (04:48 +0200)]
lib/table: remove nonsensical const, add pure

Passing the struct route_table *ptr as const doesn't really help; if
anything it semantically would imply that the returned route_node is
const too since constness should propagate (but it doesn't in C.)

The right thing to do here - which actually helps the compiler optimize
the code too - is to tag functions with __attribute__((pure)).  The
compiler does this automatically if it has the function body (and the
body of all called functions) available.  That should cover most "static
inline" functions in headers, as well as functions in the same file.

However, this doesn't work (at least without LTO) for extern functions.
Hence, add "ext_pure" for this case.  (Built-in "extern" to make lines
shorter.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib/table: remove odd casts
David Lamparter [Tue, 21 May 2019 03:00:09 +0000 (05:00 +0200)]
lib/table: remove odd casts

Working with a proper struct route_node gets us around a bunch of weird
casts here and makes the code slightly more robust.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotests: more datastructure tests
David Lamparter [Tue, 21 May 2019 01:53:51 +0000 (03:53 +0200)]
tests: more datastructure tests

A little something for everybody in here.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: add missing atomlist_init/fini
David Lamparter [Tue, 21 May 2019 03:16:08 +0000 (05:16 +0200)]
lib: add missing atomlist_init/fini

Only noticed this when trying to add atomlists to the typesafe
datastructure tests...  the atomic-specific test_atomlist doesn't use
init/fini :/

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: add DECLARE_HEAP datastructure
David Lamparter [Tue, 21 May 2019 01:53:29 +0000 (03:53 +0200)]
lib: add DECLARE_HEAP datastructure

This is an 8-ary heap (cacheline optimized.)  It works as a semi-sorted
kind of middle ground between unsorted and sorted datastructures;  pop()
always returns the lowest item but ordering is only loosely enforced.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: use DLIST for adv_fifo
David Lamparter [Mon, 20 May 2019 21:41:16 +0000 (23:41 +0200)]
bgpd: use DLIST for adv_fifo

I mistakenly assumed that something called "FIFO" would primarily be
used by removing items from the front.  This isn't the case for the
adv_fifo... so use a DLIST there to make sure deletions from the middle
of the queue are fast.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotests: extend DECLARE_* tests
David Lamparter [Mon, 20 May 2019 21:20:11 +0000 (23:20 +0200)]
tests: extend DECLARE_* tests

The unsorted datastructures (LIST, DLIST) had no test before this.  Also
add a hash check (mostly to make testing the unsorted lists easier.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotests: test DECLARE_HASH with good and bad hashfn
David Lamparter [Mon, 20 May 2019 19:04:14 +0000 (21:04 +0200)]
tests: test DECLARE_HASH with good and bad hashfn

The hash table test was previously (intentionally) using a bad hash
function to test the code in the face of hash collisions.  Add a test
with a good hash function to see some performance numbers.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: add DECLARE_DLIST (double-linked list)
David Lamparter [Sun, 12 May 2019 10:05:44 +0000 (12:05 +0200)]
lib: add DECLARE_DLIST (double-linked list)

Turns out we need one of these.  Same API as DECLARE_LIST, but deleting
random items is much faster.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: add dedicated pop() to DECLARE_SKIPLIST
David Lamparter [Sun, 12 May 2019 10:05:14 +0000 (12:05 +0200)]
lib: add dedicated pop() to DECLARE_SKIPLIST

The skiplist code was previously falling back to the del() code path for
a pop() on a skiplist.  This is unneeded complexity, a pop() can be done
more efficiently.

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