]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
6 years agozebra: only perform shutdown signal processing once
Mark Stapp [Mon, 15 Oct 2018 15:14:07 +0000 (11:14 -0400)]
zebra: only perform shutdown signal processing once

Avoid running the shutdown/sigint handler code more than once. With
the async dataplane, once shutdown has been initiated, the completion
of all async updates triggers final shutdown of the zebra main
pthread. During that time, avoid taking and processing a second
signal, such as SIGINT or SIGTERM.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: rebase dataplane, align with master
Mark Stapp [Wed, 26 Sep 2018 13:34:43 +0000 (09:34 -0400)]
zebra: rebase dataplane, align with master

Rebase and pick up dataplane changes on master, including
renamed structs and enums.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: improve safety of netns_notify_close()
Mark Stapp [Fri, 21 Sep 2018 20:21:15 +0000 (16:21 -0400)]
zebra: improve safety of netns_notify_close()

Additional check to ensure the notify event is still valid
before calling the thread lib api.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: limit queued route updates
Mark Stapp [Fri, 21 Sep 2018 18:54:02 +0000 (14:54 -0400)]
zebra: limit queued route updates

Impose a configurable limit on the number of route updates
that can be queued towards the dataplane subsystem.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: revise struct names to resolve review comments
Mark Stapp [Wed, 19 Sep 2018 17:25:12 +0000 (13:25 -0400)]
zebra: revise struct names to resolve review comments

Use standard type naming and remove use of typedef to resolve
some review comments.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: remove old apis after new dplane work
Mark Stapp [Wed, 29 Aug 2018 20:15:18 +0000 (16:15 -0400)]
zebra: remove old apis after new dplane work

Replaced or out-grew a few zebra internal apis during async
dataplane work; removing them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: support zebra shutdown and cleanup
Mark Stapp [Mon, 27 Aug 2018 20:03:37 +0000 (16:03 -0400)]
zebra: support zebra shutdown and cleanup

Dplane support for zebra's route cleanup during shutdown (clean
shutdown via SIGINT, anyway.) The dplane has the opportunity to
process incoming updates, and then triggers final cleanup
in zebra's main thread.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: add handy res2str utility
Mark Stapp [Fri, 17 Aug 2018 20:53:24 +0000 (16:53 -0400)]
zebra: add handy res2str utility

Add a 2str utility for dplane result codes; use it in
a debug or two.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: add dplane show commands
Mark Stapp [Fri, 17 Aug 2018 19:50:09 +0000 (15:50 -0400)]
zebra: add dplane show commands

Add first pass at show commands for the zebra dplane. Add some stats
counters to show. Start prep for correct shutdown processing, and for
multiple providers.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: update routing socket path
Mark Stapp [Fri, 17 Aug 2018 19:25:24 +0000 (15:25 -0400)]
zebra: update routing socket path

Update route-socket path for route updates using the async
dplane module.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: add shutdown callback for dplane providers
Mark Stapp [Tue, 7 Aug 2018 20:00:33 +0000 (16:00 -0400)]
zebra: add shutdown callback for dplane providers

Support fini or shutdown callback for dplane modules, to give
them an opportunity to cleanup.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: netlink fuzzing path correction
Mark Stapp [Mon, 6 Aug 2018 20:19:45 +0000 (16:19 -0400)]
zebra: netlink fuzzing path correction

Correct use of netlink_parse_info() in the netlink fuzzing path.
Also clarify a couple of comments about pthreads.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: Fix style issues
Mark Stapp [Fri, 20 Jul 2018 18:43:32 +0000 (14:43 -0400)]
zebra: Fix style issues

Clean up a couple of checkstyle reports in the dataplane
commit.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: ensure redist of system routes
Mark Stapp [Thu, 19 Jul 2018 18:55:02 +0000 (14:55 -0400)]
zebra: ensure redist of system routes

We need a bit of special handling for system routes, which need
to be offered for redistribution even though they won't be
passing through the dplane system.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: resolve style issues in dplane commit
Mark Stapp [Wed, 11 Jul 2018 15:08:47 +0000 (11:08 -0400)]
zebra: resolve style issues in dplane commit

Resolve (most) style issues in the initial zebra dataplane
commit branch.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: start sketching dataplane provider api
Mark Stapp [Mon, 9 Jul 2018 20:00:09 +0000 (16:00 -0400)]
zebra: start sketching dataplane provider api

Initial WIP api to add providers into the zebra dataplane system,
with some simple ordering/prioritization.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: set SELECTED flag in rib_process
Mark Stapp [Wed, 27 Jun 2018 21:13:26 +0000 (17:13 -0400)]
zebra: set SELECTED flag in rib_process

Set SELECTED re immediately in rib_process, without expecting
that fib install has completed. Remove premature redistribute
call also.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: capture old data for route delete
Mark Stapp [Wed, 27 Jun 2018 20:51:32 +0000 (16:51 -0400)]
zebra: capture old data for route delete

Need to capture 'old' values in conversion from re to dplane
context.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: use async dplane route updates
Mark Stapp [Wed, 27 Jun 2018 20:10:30 +0000 (16:10 -0400)]
zebra: use async dplane route updates

Enqueue updates to the dplane system; add a couple of stats.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: update dplane route api return type
Mark Stapp [Tue, 26 Jun 2018 19:10:13 +0000 (15:10 -0400)]
zebra: update dplane route api return type

Use the dp_req_result enum type for the route update apis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: wip: early version of dplane result handler
Mark Stapp [Tue, 26 Jun 2018 18:28:58 +0000 (14:28 -0400)]
zebra: wip: early version of dplane result handler

Early try at a result handler for async dplane route updates

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: start dataplane layer work
Mark Stapp [Wed, 23 May 2018 16:20:43 +0000 (12:20 -0400)]
zebra: start dataplane layer work

Reduce or eliminate use of global zebra_ns structs in
a couple of netlink/kernel code paths, so that those paths
can potentially be made asynch eventually.

Slide netlink_talk_info into place to remove dependency on core
zebra structs; add accessors for dplane context block

Start init of route context from zebra core re and rn structs;
start queueing and event handling for incoming route updates.

Expose netlink apis that don't rely on zebra core structs;
add parallel route-update code path using the dplane ctx;
simplest possible event loop to process queued route'
updates.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agoMerge pull request #3121 from pguibert6WIND/flowspec_json_issue
Donald Sharp [Wed, 24 Oct 2018 23:41:15 +0000 (19:41 -0400)]
Merge pull request #3121 from pguibert6WIND/flowspec_json_issue

bgpd: fill in prefix for flowspec entry when json format is requested

6 years agoMerge pull request #3234 from donaldsharp/bsd_install_failure
Renato Westphal [Wed, 24 Oct 2018 19:14:15 +0000 (16:14 -0300)]
Merge pull request #3234 from donaldsharp/bsd_install_failure

zebra: Notice when a route fails to install on *bsd

6 years agoMerge pull request #3229 from opensourcerouting/bugfix/fabricd-distribution
Donald Sharp [Wed, 24 Oct 2018 16:22:13 +0000 (12:22 -0400)]
Merge pull request #3229 from opensourcerouting/bugfix/fabricd-distribution

Add fabricd to distribution scripts

6 years agozebra: Notice when a route fails to install on *bsd
Donald Sharp [Wed, 24 Oct 2018 15:34:50 +0000 (11:34 -0400)]
zebra: Notice when a route fails to install on *bsd

When we fail to install a route into bsd, note the case
where we have no viable nexthops installed for it, so
that we can know in zebra if the route is good or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodebianpkg, tools: Add fabricd to distribution scripts
Christian Franke [Wed, 24 Oct 2018 02:31:09 +0000 (04:31 +0200)]
debianpkg, tools: Add fabricd to distribution scripts

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoMerge pull request #3225 from donaldsharp/revert_default_originate_changes
David Lamparter [Wed, 24 Oct 2018 13:02:12 +0000 (15:02 +0200)]
Merge pull request #3225 from donaldsharp/revert_default_originate_changes

bgp: Revert default originate changes to allow set

6 years agoMerge pull request #3230 from opensourcerouting/feature/isis-improve-lsp-scheduling
Donald Sharp [Wed, 24 Oct 2018 11:49:50 +0000 (07:49 -0400)]
Merge pull request #3230 from opensourcerouting/feature/isis-improve-lsp-scheduling

Feature: IS-IS improve lsp scheduling

6 years agoisisd: delay lsp regeneration while events are still coming in
Christian Franke [Wed, 24 Oct 2018 05:19:22 +0000 (07:19 +0200)]
isisd: delay lsp regeneration while events are still coming in

When there is a stream of events coming in, where IS-IS learns
about a lot of updates, IS-IS would regenerate its LSPs before
the updates have been processed completely.

This causes suboptimal convergence because the intermediate state
will be flooded. Only after the configured `lsp_gen_interval`, a
new update with the correct and final state will be generated.

Resolve this by holding off LSP generation while there are still
events coming in.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: Combine lsp_l1/l2_refresh
Christian Franke [Wed, 24 Oct 2018 04:27:17 +0000 (06:27 +0200)]
isisd: Combine lsp_l1/l2_refresh

lsp_l1_refresh and lsp_l2_refresh are identical apart from the
hardcoded IS-IS level they are referring to. So merge them and
pass the level as part of the argument.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: Log LSP-update trigger source
Christian Franke [Wed, 24 Oct 2018 03:38:53 +0000 (05:38 +0200)]
isisd: Log LSP-update trigger source

For debugging the timing of LSP generation, it is useful to know
which event caused a regeneration to be scheduled. Therefore, add
this information to the debug log.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: Log SPF trigger source when debugging
Christian Franke [Wed, 24 Oct 2018 03:28:12 +0000 (05:28 +0200)]
isisd: Log SPF trigger source when debugging

For debugging the scheduling of SPF, it is useful to see from
where an SPF run is scheduled. So add this information to the
log.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoRevert "bgpd: Set attributes according route-maps if applied for default-originate"
Donald Sharp [Tue, 23 Oct 2018 20:25:08 +0000 (16:25 -0400)]
Revert "bgpd: Set attributes according route-maps if applied for default-originate"

This reverts commit 74401e62721b8f83ff0e34127d6235fda112c7c8.

6 years agoRevert "bgpd: Make sure default-originate works without route-map as well"
Donald Sharp [Tue, 23 Oct 2018 20:21:02 +0000 (16:21 -0400)]
Revert "bgpd: Make sure default-originate works without route-map as well"

This reverts commit c2e10422033771da9f12a4a283b0bc767240a3d8.

6 years agobgpd: When displaying default originate debugs don't print gibberish
Donald Sharp [Tue, 23 Oct 2018 20:13:46 +0000 (16:13 -0400)]
bgpd: When displaying default originate debugs don't print gibberish

The tx_id_buf was not being set to anything in some cases,
make sure it's a null string before using.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3222 from srimohans/community
David Lamparter [Tue, 23 Oct 2018 19:34:04 +0000 (21:34 +0200)]
Merge pull request #3222 from srimohans/community

bgpd:Fixing the signature of community_free function

6 years agoMerge branch 'master' of https://github.com/FRRouting/frr into community
Sri Mohana Singamsetty [Tue, 23 Oct 2018 16:53:39 +0000 (09:53 -0700)]
Merge branch 'master' of https://github.com/FRRouting/frr into community

6 years agobgpd:Fixing the signature of community_free function
Sri Mohana Singamsetty [Mon, 22 Oct 2018 19:58:39 +0000 (12:58 -0700)]
bgpd:Fixing the signature of community_free function

community_free, lcommunity_free and ecommunity_free are similar type of functions. Most of the places, these three are called together. The signature of community_free is different from other two functions. Modified the community_free API signature to align with other two functions to avoid any confusion. There is no functionality impact with this and this is just to avoid any confusion.

Testing: manual testing and show commands
Signed-off-by: Sri Mohana Singamsetty msingamsetty@vmware.com
6 years agoMerge pull request #3204 from ton31337/fix/make_vrf_import_default_selectable
David Lamparter [Tue, 23 Oct 2018 16:34:15 +0000 (18:34 +0200)]
Merge pull request #3204 from ton31337/fix/make_vrf_import_default_selectable

bgpd: Select default routing table when importing VRF routes into global

6 years agobgpd: Select default routing table when importing VRF routes into global
Donatas Abraitis [Fri, 19 Oct 2018 12:56:09 +0000 (15:56 +0300)]
bgpd: Select default routing table when importing VRF routes into global

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agobgpd: fill in prefix for flowspec entry when json format is requested
Philippe Guibert [Mon, 1 Oct 2018 15:06:26 +0000 (17:06 +0200)]
bgpd: fill in prefix for flowspec entry when json format is requested

as prefix is opaque for flowspec, and json needs to have a non empty
full of meaning value in prefix, the proposal is to encode the
displayable form of flowspec entry.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #3175 from donaldsharp/show_run_static
David Lamparter [Tue, 23 Oct 2018 10:46:09 +0000 (12:46 +0200)]
Merge pull request #3175 from donaldsharp/show_run_static

vtysh: Add some missing daemons to some commands in vtysh

6 years agoMerge branch 'pull/3165'
David Lamparter [Tue, 23 Oct 2018 10:42:42 +0000 (12:42 +0200)]
Merge branch 'pull/3165'

...with an additional comment.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agozebra: add comment about Linux ifdown handling
David Lamparter [Tue, 23 Oct 2018 10:42:06 +0000 (12:42 +0200)]
zebra: add comment about Linux ifdown handling

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge branch 'pull/3197'
David Lamparter [Tue, 23 Oct 2018 10:31:25 +0000 (12:31 +0200)]
Merge branch 'pull/3197'

...with a nit fix

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoripd: fix list compare order
David Lamparter [Tue, 23 Oct 2018 10:30:00 +0000 (12:30 +0200)]
ripd: fix list compare order

As noted in review comment by @rwestphal

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge pull request #3209 from opensourcerouting/cli-fuzzer-fixes
Quentin Young [Mon, 22 Oct 2018 19:48:46 +0000 (15:48 -0400)]
Merge pull request #3209 from opensourcerouting/cli-fuzzer-fixes

CLI fuzzer fixes

6 years agoMerge pull request #3214 from donaldsharp/ospf_crash
Lou Berger [Sat, 20 Oct 2018 18:28:00 +0000 (14:28 -0400)]
Merge pull request #3214 from donaldsharp/ospf_crash

ospfd: Do not allow thread drop

6 years agoospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" command
Renato Westphal [Fri, 19 Oct 2018 18:55:47 +0000 (15:55 -0300)]
ospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" command

Add a missing check to bail out earlier when SR is not configured. The
same command without the "no" prefix has the same check as it prevents
unexpected things (i.e. crashes) from happening.

Fixes the following segfaults:
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32"
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32 index 65535 no-php-flag"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoospf6d: fix two "show" commands
Renato Westphal [Fri, 19 Oct 2018 18:55:41 +0000 (15:55 -0300)]
ospf6d: fix two "show" commands

The "show ipv6 ospf6 interface [IFNAME] prefix" command shouldn't accept
the "match" keyword when a prefix is not given, otherwise ospf6d will
crash.

Fixes the following crashes:
ospf6d aborted: vtysh  -c "show ipv6 ospf6 interface eth99 prefix match"
ospf6d aborted: vtysh  -c "show ipv6 ospf6 interface prefix match"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib: fix the "no match ipv6 next-hop type" command
Renato Westphal [Fri, 19 Oct 2018 18:55:31 +0000 (15:55 -0300)]
lib: fix the "no match ipv6 next-hop type" command

Trivial NULL pointer dereference bug.

Fixes the following crash:
bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "no match ipv6 next-hop type"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: use the vrf_bitmap_*() helper functions when necessary
Renato Westphal [Fri, 19 Oct 2018 18:55:22 +0000 (15:55 -0300)]
bgpd: use the vrf_bitmap_*() helper functions when necessary

zclient->redist[afi][type] is a hash table and not an integer since a
while ago when VRF support was introduced. As such, zclient->redist[][]
should never be manipulated directly, the vrf_bitmap_*() helper functions
should be used instead. This fixes a few crashes found by the CLI fuzzer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: fix bug while iterating over VPN table
Renato Westphal [Fri, 19 Oct 2018 18:55:12 +0000 (15:55 -0300)]
bgpd: fix bug while iterating over VPN table

The routing table data structure can create intermediate route nodes
during its normal operation, so we always need to check if the 'info'
pointer of a route node is NULL or not before dereferencing it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: remove wrong assert
Renato Westphal [Fri, 19 Oct 2018 18:55:08 +0000 (15:55 -0300)]
bgpd: remove wrong assert

The vnc_direct_del_rn_group_rd() function can be called with the 'afi'
parameter set to AFI_L2VPN on some specific cases. Remove the assert to
fix the crash.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: fix NULL pointer dereference bug
Renato Westphal [Fri, 19 Oct 2018 18:55:03 +0000 (15:55 -0300)]
bgpd: fix NULL pointer dereference bug

Other parts of the rfapi code check if the 'rfg->rfapi_import_table'
pointer is NULL or not before using it. Do the same here to fix a crash
detected by the CLI fuzzer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: add a NULL check to prevent a crash in the rfapi code
Renato Westphal [Fri, 19 Oct 2018 18:54:57 +0000 (15:54 -0300)]
bgpd: add a NULL check to prevent a crash in the rfapi code

The rfapiDeleteRemotePrefixesIt() function checks on several places if
'p' is NULL or not. Introduce an additional NULL check to prevent a
crash from happening.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: fix crashes caused by missing input validation
Renato Westphal [Fri, 19 Oct 2018 18:54:47 +0000 (15:54 -0300)]
bgpd: fix crashes caused by missing input validation

The rfapi code wasn't checking if strtoul() succeeded or not when parsing
the list of labels. Fix the affected commands by not allowing the user
to enter a non-numeric input.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: fix some NULL pointer dereference bugs
Renato Westphal [Fri, 19 Oct 2018 18:54:26 +0000 (15:54 -0300)]
bgpd: fix some NULL pointer dereference bugs

Other parts of the rfapi code also check if these pointers are NULL or
not before using them.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: fix the "no neighbor A.B.C.D maximum-prefix" command
Renato Westphal [Fri, 19 Oct 2018 18:54:05 +0000 (15:54 -0300)]
bgpd: fix the "no neighbor A.B.C.D maximum-prefix" command

The peer->group pointer is set only if the PEER_STATUS_GROUP flag is
set in the peer. Add a protection to prevent a NULL pointer dereference.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: handle NULL pointers in lcommunity_cmp()
Renato Westphal [Fri, 19 Oct 2018 18:53:55 +0000 (15:53 -0300)]
bgpd: handle NULL pointers in lcommunity_cmp()

Like community_cmp() and ecommunity_cmp(), the lcommunity_cmp() function
also needs to handle NULL pointers for correct operation.

Without this fix, bgpd can crash when entering the following commands:
vtysh -c "configure terminal" -c "ip large-community-list standard WORD deny"
vtysh -c "configure terminal" -c "no ip large-community-list expanded WORD"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: fix cleanup of dampening configuration
Renato Westphal [Fri, 19 Oct 2018 18:53:46 +0000 (15:53 -0300)]
bgpd: fix cleanup of dampening configuration

The bgp_damp_config_clean() function was deallocating some arrays without
resetting the variables that represent their sizes. This was leading to
some crashes because other parts of the code iterate over these arrays
by looking at their corresponding sizes, which could be invalid.

Fixes the following segfaults (which only happen under certain
circumstances):
vtysh -c "configure terminal" -c "router bgp 1" -c "bgp dampening"
vtysh -c "configure terminal" -c "router bgp 1" -c "no bgp dampening"
vtysh -c "configure terminal" -c "router bgp 1" -c "no bgp dampening 45"
vtysh -c "" -c "clear ip bgp dampening"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobfdd: do not allow multihop peers without a local-address
Renato Westphal [Fri, 19 Oct 2018 18:53:33 +0000 (15:53 -0300)]
bfdd: do not allow multihop peers without a local-address

The BFD code assumes that multihop peers have a local address
configured. When that doesn't happen, the BFD client daemons fail to
decode some BFD ZAPI messages and abort. To fix this, do not accept the
configuration of multhop peers unless a local-address is configured.

Fixes the following segfaults:
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop"
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME"
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #3212 from donaldsharp/rmap_crash
Renato Westphal [Sat, 20 Oct 2018 14:56:44 +0000 (11:56 -0300)]
Merge pull request #3212 from donaldsharp/rmap_crash

Rmap crash

6 years agoospfd: Do not allow thread drop
Donald Sharp [Sat, 20 Oct 2018 12:59:30 +0000 (08:59 -0400)]
ospfd: Do not allow thread drop

When the ospf->oi_write_q is not empty that means that ospf could
already have a thread scheduled for running.  Just dropping
the pointer before resheduling does not stop the one currently
scheduled for running from running.  The calling of thread_add_write
checks to see if we are already running and does the right thing here
so it is sufficient to just call thread_add_write.

This issue was tracked down from this stack trace:

Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [EC 134217739] interface eth2.1032:172.16.4.110: ospf_check_md5 bad sequence 5333618 (expect 5333649)
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: message repeated 3 times: [ [EC 134217739] interface eth2.1032:172.16.4.110: ospf_check_md5 bad sequence 5333618 (expect 5333649)]
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: Assertion `node’ failed in file ospfd/ospf_packet.c, line 666, function ospf_write
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: Backtrace for 8 stack frames:
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 0] /usr/lib/libfrr.so.0(zlog_backtrace+0x3a) [0x7fef3efe9f8a]
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 1] /usr/lib/libfrr.so.0(_zlog_assert_failed+0x61) [0x7fef3efea501]
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 2] /usr/lib/frr/ospfd(+0x2f15e) [0x562e0c91815e]
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 3] /usr/lib/libfrr.so.0(thread_call+0x60) [0x7fef3f00d430]
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 4] /usr/lib/libfrr.so.0(frr_run+0xd8) [0x7fef3efe7938]
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 5] /usr/lib/frr/ospfd(main+0x153) [0x562e0c901753]
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fef3d83db45]
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 7] /usr/lib/frr/ospfd(+0x190be) [0x562e0c9020be]
Oct 19 18:04:00 VYOS-R1 ospfd[1811]: Current thread function ospf_write, scheduled from file ospfd/ospf_packet.c, line 881
Oct 19 18:04:00 VYOS-R1 zebra[1771]: [EC 4043309116] Client ‘ospf’ encountered an error and is shutting down.
Oct 19 18:04:00 VYOS-R1 zebra[1771]: client 41 disconnected. 0 ospf routes removed from the rib

We had an assert(node) in ospf_write, which means that the list was empty.  So I just
searched until I saw a code path that allowed multiple writes to the ospf_write function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Dissallow v6 routes from setting a v4 nexthop
Donald Sharp [Sat, 20 Oct 2018 00:43:47 +0000 (20:43 -0400)]
bgpd: Dissallow v6 routes from setting a v4 nexthop

Do not allow a v6 route to set a v4 nexthop via a routemap.
As that this will crash bgp.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Prep commit to cleanup indentation
Donald Sharp [Sat, 20 Oct 2018 00:38:03 +0000 (20:38 -0400)]
bgpd: Prep commit to cleanup indentation

Signed-off-by: Donald Sharp <sahrpd@cumulusnetworks.com>
6 years ago*: Replace hash_cmp function return value to a bool
Donald Sharp [Wed, 17 Oct 2018 19:27:12 +0000 (15:27 -0400)]
*: Replace hash_cmp function return value to a bool

The ->hash_cmp and linked list ->cmp functions were sometimes
being used interchangeably and this really is not a good
thing.  So let's modify the hash_cmp function pointer to return
a boolean and convert everything to use the new syntax.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years ago*: Fixup to use proper list_cmp functions
Donald Sharp [Wed, 17 Oct 2018 19:31:09 +0000 (15:31 -0400)]
*: Fixup to use proper list_cmp functions

We had a variety of issues with sorted list compare functions.
This commit identifies and fixes these issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3203 from opensourcerouting/buildfoo-20181015
Donald Sharp [Fri, 19 Oct 2018 13:11:31 +0000 (09:11 -0400)]
Merge pull request #3203 from opensourcerouting/buildfoo-20181015

Debian packaging & generic build stuff

6 years agobuild: rewrite readline/curses check
David Lamparter [Sat, 6 Oct 2018 21:28:19 +0000 (23:28 +0200)]
build: rewrite readline/curses check

We don't need termcap/tinfo/curses, those are just for libreadline.  On
most modern systems, libreadline will pull in the appropriate libs it
needs on its own, so unconditionally adding them adds an extra unneeded
dependency for us.

Still need to try with curses/... for some systems, but only after bare
readline fails.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agodebianpkg: remove bad USE_* options, add WERROR
David Lamparter [Mon, 15 Oct 2018 05:03:20 +0000 (07:03 +0200)]
debianpkg: remove bad USE_* options, add WERROR

This strips the USE_PIM, USE_BFD and USE_LDP options, all of which are
just straight up counterproductive knobs.

Instead, --enable-werror really needs to default to off, so add an
option for that.

Lastly, use --disable-dependency-tracking to speed up the build.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agodebianpkg: clean up dependencies
David Lamparter [Mon, 15 Oct 2018 05:02:47 +0000 (07:02 +0200)]
debianpkg: clean up dependencies

- accept either python2 or python3 packages for everything
- drop texlive-latex-base, texlive-generic-recommended (only needed for
  PDF docs)
- python-ipaddr is not a build time requirement, only runtime

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agodebianpkg: strip ancient/unused cruft
David Lamparter [Mon, 15 Oct 2018 05:00:42 +0000 (07:00 +0200)]
debianpkg: strip ancient/unused cruft

The SNMP MIB directory is unneeded, --enable-poll has been long gone,
the "build" target is straight up wrong (causing FRR to be built in the
install step) and we haven't needed /proc for configure in ages either.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agobuild: try to use -D option for ar and ranlib
David Lamparter [Sun, 7 Oct 2018 00:49:20 +0000 (02:49 +0200)]
build: try to use -D option for ar and ranlib

The -D option zeroes out timestamps in .a files and has become the
default on recent distributions to enable reproducible builds.

This also shuts up the "u ignored because D is default" warning that is
showing up on some distributions.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agobuild: fix some escapes in configure.ac
David Lamparter [Sun, 7 Oct 2018 22:49:24 +0000 (00:49 +0200)]
build: fix some escapes in configure.ac

Some test statements were missing "" around variables causing syntax
errors during configure runs.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge pull request #3201 from donaldsharp/breadcrumbs_for_donald
David Lamparter [Fri, 19 Oct 2018 11:07:15 +0000 (13:07 +0200)]
Merge pull request #3201 from donaldsharp/breadcrumbs_for_donald

zebra: Add some missing breadcrumbs

6 years agoMerge pull request #3186 from donaldsharp/aggregate_ecomm
David Lamparter [Fri, 19 Oct 2018 10:34:08 +0000 (12:34 +0200)]
Merge pull request #3186 from donaldsharp/aggregate_ecomm

Aggregate ecommunity and lcommunity addition

6 years agoMerge pull request #3163 from donaldsharp/more_vty_errors
David Lamparter [Fri, 19 Oct 2018 10:11:21 +0000 (12:11 +0200)]
Merge pull request #3163 from donaldsharp/more_vty_errors

lib, vtysh: Allow notification across multiple lines of failure

6 years agoMerge pull request #3191 from donaldsharp/more_vty
Renato Westphal [Thu, 18 Oct 2018 14:54:58 +0000 (11:54 -0300)]
Merge pull request #3191 from donaldsharp/more_vty

bgpd: Add a better breadcrumb for interface based peers

6 years agoMerge pull request #3189 from opensourcerouting/libunwind
Donald Sharp [Thu, 18 Oct 2018 14:45:32 +0000 (10:45 -0400)]
Merge pull request #3189 from opensourcerouting/libunwind

lib: add libunwind support for backtraces

6 years agozebra: Add some missing breadcrumbs
Donald Sharp [Thu, 18 Oct 2018 13:13:18 +0000 (09:13 -0400)]
zebra: Add some missing breadcrumbs

During a debugging session last night I discovered that I was
still having some `fun` figuring out why zebra was not making
a route's nexthop active.  After some debugging I figured out
that I was missing some states that we could end up in that
didn't have debug information about what happened in nexthop_active.

Add the missing breadcrumbs for nexthop resolution.  In addition
add a bit of code to notice the ebgp state without recursion turned
on and to let the user know about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3195 from donaldsharp/nht_crash
David Lamparter [Thu, 18 Oct 2018 03:10:37 +0000 (05:10 +0200)]
Merge pull request #3195 from donaldsharp/nht_crash

Nht crash

6 years agoMerge pull request #3190 from qlyoung/allow-static-onlink
Renato Westphal [Thu, 18 Oct 2018 02:26:04 +0000 (23:26 -0300)]
Merge pull request #3190 from qlyoung/allow-static-onlink

staticd: add ability to create onlink static route

6 years agoMerge pull request #3196 from dslicenc/l2vpn-evpn-upd-grps
Renato Westphal [Thu, 18 Oct 2018 01:49:44 +0000 (22:49 -0300)]
Merge pull request #3196 from dslicenc/l2vpn-evpn-upd-grps

bgpd: add command to display update groups for l2vpn evpn

6 years agolib: add libunwind support for backtraces
David Lamparter [Thu, 24 Aug 2017 14:09:48 +0000 (16:09 +0200)]
lib: add libunwind support for backtraces

libunwind provides an alternate to backtrace() for printing out the call
stack of a particular location.  It doesn't use the frame pointer, it
goes by the DWARF debug info.  In most cases the traces have exactly the
same information, but there are some situations where libunwind traces
are better.

(On some platforms, the libc backtrace() also uses the DWARF debug info
[e.g.: ARM backtraces are impossible without it] but this is not the
case everywhere, especially not on BSD libexecinfo.)

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agozebra: remove kernel routes that are suppressed
Philippe Guibert [Thu, 11 Oct 2018 17:04:05 +0000 (19:04 +0200)]
zebra: remove kernel routes that are suppressed

on some cases, kernel routes are not selected, because the kernel
suppressed it without informing the netlink layer that the route has
been suppressed ( for instance, when an interface goes down, the route
never goes back when interface goes up again). This commit intends to
suppress that entry from zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: add command to display update groups for l2vpn evpn
Don Slice [Wed, 17 Oct 2018 13:35:10 +0000 (13:35 +0000)]
bgpd: add command to display update groups for l2vpn evpn

For troubleshooting purposes, it's useful to display the update-groups
for l2vpn evpn

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agoMerge pull request #3192 from lkrishnamoor/evpn_route_server
Donald Sharp [Wed, 17 Oct 2018 18:38:31 +0000 (14:38 -0400)]
Merge pull request #3192 from lkrishnamoor/evpn_route_server

bgpd: Route Server support for evpn address-family

6 years agoMerge pull request #3194 from opensourcerouting/bugfix/isis-misc
Donald Sharp [Wed, 17 Oct 2018 18:38:16 +0000 (14:38 -0400)]
Merge pull request #3194 from opensourcerouting/bugfix/isis-misc

Bugfix: IS-IS fragmentation issues

6 years agobgpd: Cleanup bnch_nexthop_cache_reset to fit cleaner
Donald Sharp [Wed, 17 Oct 2018 15:31:34 +0000 (11:31 -0400)]
bgpd: Cleanup bnch_nexthop_cache_reset to fit cleaner

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Fix crash when using v4 route w/ v6 nexthop
Donald Sharp [Wed, 17 Oct 2018 15:27:30 +0000 (11:27 -0400)]
bgpd: Fix crash when using v4 route w/ v6 nexthop

Recent changes to the nht code in bgp caused us to actually
keep a true count of v6 nexthop paths when using v4 over v6.
This change introduced a race condition on shutdown on who
got to the bnc cache first( the v4 table or not ).  Effectively
we were allowing the continued existence of the path->nexthop
pointing to the freed bnc.  This was especially true when
we had route leaking.   So when we free the bnc make sure
we clean up the path->nexthop variables pointing at it too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Route Server support for evpn address-family
Lakshman Krishnamoorthy [Wed, 17 Oct 2018 00:44:57 +0000 (17:44 -0700)]
bgpd: Route Server support for evpn address-family
Signed-off-by: Lakshman Krishnamoorthy lkrishnamoor@vmware.com
6 years agobgpd: Add a better breadcrumb for interface based peers
Donald Sharp [Tue, 16 Oct 2018 21:26:21 +0000 (17:26 -0400)]
bgpd: Add a better breadcrumb for interface based peers

If you are using bgp unnumbered( or interface based peers )
when we detect an error give the user a bit more of a clue
what they may have done wrong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agostaticd: add ability to create onlink static route
Quentin Young [Tue, 16 Oct 2018 20:49:32 +0000 (20:49 +0000)]
staticd: add ability to create onlink static route

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoisisd: adjust lsp size to area->lsp_size before packing
Christian Franke [Tue, 16 Oct 2018 17:17:10 +0000 (19:17 +0200)]
isisd: adjust lsp size to area->lsp_size before packing

IS-IS would ignore any area lsp-mtu setting configured after initial
creation of the LSP since move to the new tlv serialized/deserializer.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: Unlink LSP fragments from LSP0 on lsp_destroy
Christian Franke [Tue, 16 Oct 2018 15:36:45 +0000 (17:36 +0200)]
isisd: Unlink LSP fragments from LSP0 on lsp_destroy

isisd would crash when lsp fragments aged out, since they got freed
correctly, but were not removed from LSP0's linked list of fragments.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoMerge pull request #3188 from opensourcerouting/bgp-snmp-fix-rename
Quentin Young [Tue, 16 Oct 2018 17:18:34 +0000 (13:18 -0400)]
Merge pull request #3188 from opensourcerouting/bgp-snmp-fix-rename

bgpd: fix missed info->path rename in snmp

6 years agobgpd: fix missed info->path rename in snmp
David Lamparter [Tue, 16 Oct 2018 16:14:17 +0000 (18:14 +0200)]
bgpd: fix missed info->path rename in snmp

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge pull request #3157 from pguibert6WIND/doc_expanded
Donald Sharp [Tue, 16 Oct 2018 15:52:22 +0000 (11:52 -0400)]
Merge pull request #3157 from pguibert6WIND/doc_expanded

doc: inform user that expanded communities can not be used in set mode