]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
6 years agobgpd: move non-best local path checks outside the function 3202/head
Anuradha Karuppiah [Fri, 19 Oct 2018 15:46:46 +0000 (08:46 -0700)]
bgpd: move non-best local path checks outside the function

This change is a fixup to -
7b5e18 -  bgpd: use IP address as tie breaker if the MM seq number is the
same

And is being done in response to review comments. This commit brings no
functional change; simply moves around code for easier maintanence.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agobgpd, lib, vtysh, zebra: Convert to using CMD_VNI_RANGE
Donald Sharp [Fri, 19 Oct 2018 00:44:52 +0000 (20:44 -0400)]
bgpd, lib, vtysh, zebra: Convert to using CMD_VNI_RANGE

For the vni range use a macro to keep track of it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: set remoteseq to 0 when remote mac is deleted by bgpd
Anuradha Karuppiah [Tue, 16 Oct 2018 19:59:24 +0000 (12:59 -0700)]
zebra: set remoteseq to 0 when remote mac is deleted by bgpd

When the remote mac is deleted by bgpd we can end up with an auto mac
entry in zebra if there are neighs referring to the mac. The remote sequence
number in the auto mac entry needs to be reset to 0 as the mac entry may
have been removed on all VTEPs (including the originating one).

Now if the MAC comes back on a remote VTEP it may be added with MM=0 which
 will NOT be accepted if the remote seq was not reset in the previous step.

Ticket: CM-22707

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agozebra: make neigh active when it is modified from local to remote
Anuradha Karuppiah [Tue, 16 Oct 2018 15:23:22 +0000 (08:23 -0700)]
zebra: make neigh active when it is modified from local to remote

This is a fixup to commit -
f32ea5c07 - zebra: act on kernel notifications for remote neighbors

The original commit handled a race condition between kernel and zebra
that would result in an inconsistent state i.e.
kernel has an offload/remote neigh
zebra has a local neigh

The original commit missed setting the neigh to active when zebra
tried to resolve the inconsistency by modifying the local neigh to
remote neigh on hearing back its own kernel update. Fixed here.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-22700

6 years agobgpd: use IP address as tie breaker if the MM seq number is the same
Anuradha Karuppiah [Mon, 15 Oct 2018 15:16:51 +0000 (08:16 -0700)]
bgpd: use IP address as tie breaker if the MM seq number is the same

Same sequence number handling is specified by RFC 7432 -
[
If two (or more) PEs advertise the same MAC address with the same
sequence number but different Ethernet segment identifiers, a PE that
receives these routes selects the route advertised by the PE with the
lowest IP address as the best route.

If the PE is the originator of the MAC route and it receives the same
MAC address with the same sequence number that it generated, it will
compare its own IP address with the IP address of the remote PE and
will select the lowest IP.  If its own route is not the best one, it
will withdraw the route.
]

To implement that specification this commit uses nexthop IP as a tie
breaker between two paths of equal seq number with lower IP winning.

Now if a local path already exists with the same sequence number but higher
(local-VTEP) IP it is evicted (deleted and withdrawn from the peers) and
the winning new remote path is installed in zebra. This is existing code
and handled implicitly via evpn_route_select_install.

If a local path is rxed from zebra with the same sequence as the
current remote winner it is rejected (not installed in the bgp
routing tables) and zebra is asked to re-install the older/remote winner.
This is a race condition that can only happen if bgp's add and zebra's add
cross paths. Additional handling has been added in this commit via
evpn_cleanup_local_non_best_route to take care of the race condition.

Ticket: CM-22674
Reviewed By: CCR-7937

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agobgpd: perform route selection again when the local path is deleted
Anuradha Karuppiah [Fri, 12 Oct 2018 15:43:19 +0000 (08:43 -0700)]
bgpd: perform route selection again when the local path is deleted

This is needed to install the remote dst when a more preferred local
path is removed.

Ticket: CM-22685
Reviewed By: CCR-7936

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agozebra: send a local-mac del to bgpd on mac mod to remote
Anuradha Karuppiah [Thu, 11 Oct 2018 15:48:42 +0000 (08:48 -0700)]
zebra: send a local-mac del to bgpd on mac mod to remote

When events cross paths between bgp and zebra bgpd could end up with a
dangling local MAC entry. Consider the following sequence of events on
rack-1 -
1. MAC1 has MM sequence number 1 and points to rack-3
2. Now a packet is rxed locally on rack-1 and rack-2 (simultaneously) with
source-mac=MAC1.
3. This would cause rack-1 and rack-2 to set the MM seq to 2 and
simultaneously report the MAC as local.
4. Now let's say on rack-1 zebra's MACIP_ADD is in bgpd's queue. bgpd
accepts rack-3's update and sends a remote MACIP add to zebra with MM=2.
5. zebra updates the MAC entry from local=>remote.
6. bgpd now processes zebra's "stale local" making it the best path.
However zebra no longer has a local MAC entry.

At this point bgpd and zebra are effectively out of sync i.e. bgpd has a
local-MAC which is not present in the kernel or in zebra.

To handle this window zebra should send a local MAC delete to bgpd on
modifying its cache to remote.

Ticket: CM-22687
Reviewed By: CCR-7935

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agobgpd: hidden commands to add/del a local mac
Anuradha Karuppiah [Wed, 10 Oct 2018 21:28:32 +0000 (14:28 -0700)]
bgpd: hidden commands to add/del a local mac

local mac add/del comes from zebra. the hidden commands help verify
various race conditions between bgp and zebra.

Ticket: CM-22687
Reviewed By: CCR-7939

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agoMerge pull request #3261 from mjstapp/fix_rib_close
Donald Sharp [Tue, 30 Oct 2018 16:12:10 +0000 (12:12 -0400)]
Merge pull request #3261 from mjstapp/fix_rib_close

zebra: only uninstall once, when closing rib table

6 years agoMerge pull request #3257 from kooky/patch-1
David Lamparter [Tue, 30 Oct 2018 14:54:32 +0000 (15:54 +0100)]
Merge pull request #3257 from kooky/patch-1

Link-detect documentation

6 years agozebra: only uninstall once, when closing rib table 3261/head
Mark Stapp [Tue, 30 Oct 2018 13:41:55 +0000 (09:41 -0400)]
zebra: only uninstall once, when closing rib table

When the rib code is informed that a table is closing/
going away, only try once to uninstall associated routes from
the fib/dataplane. The close path can be called multiple times
in some cases - zebra shutdown, e.g.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agoLink-detect documentation 3257/head
Tim Bray [Mon, 29 Oct 2018 21:12:14 +0000 (21:12 +0000)]
Link-detect documentation

As a quagga user, I didn't realise link-detect is on by default.

6 years agoMerge pull request #2946 from mjstapp/dplane_2
Donald Sharp [Sun, 28 Oct 2018 20:10:45 +0000 (16:10 -0400)]
Merge pull request #2946 from mjstapp/dplane_2

Zebra: async dataplane, phase 1

6 years agoMerge pull request #3252 from opensourcerouting/buildfoo-20181028
Donald Sharp [Sun, 28 Oct 2018 20:07:50 +0000 (16:07 -0400)]
Merge pull request #3252 from opensourcerouting/buildfoo-20181028

build: SNMP license, rfptest & ospfclient as noinst, redhat spec w/o CONFDATE

6 years agoredhat: remove @CONFDATE@ from spec 3252/head
David Lamparter [Sun, 28 Oct 2018 18:49:32 +0000 (19:49 +0100)]
redhat: remove @CONFDATE@ from spec

CONFDATE should not be used like this.  Also, the extraversion is now
burned into tarballs anyway so this is no longer neccessary.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agobuild: make rfptest and ospfclient "noinst"
David Lamparter [Sun, 28 Oct 2018 15:05:38 +0000 (16:05 +0100)]
build: make rfptest and ospfclient "noinst"

Both of these are testing/demo-style tools that don't make sense as part
of a normal installation.  So don't install them.

NB: this is only the executables, libospfclient and the RFP code are not
affected.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agobuild: crop excessive net-snmp library list
David Lamparter [Sat, 27 Oct 2018 17:06:22 +0000 (19:06 +0200)]
build: crop excessive net-snmp library list

This fixes the longstanding GPL vs. OpenSSL licensing issue in our SNMP
code (and cuts down on its other dependencies a wee bit.)

In a way, net-snmp is really buggy here in what it says that we should
link against, but I don't know their application scenarios well enough
to say it should be changed at their end.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge pull request #3235 from opensourcerouting/buildfoo-20181024
Lou Berger [Sat, 27 Oct 2018 18:14:35 +0000 (14:14 -0400)]
Merge pull request #3235 from opensourcerouting/buildfoo-20181024

build: potpourri

6 years agoMerge pull request #3206 from qlyoung/mac-token-change
David Lamparter [Sat, 27 Oct 2018 11:57:35 +0000 (13:57 +0200)]
Merge pull request #3206 from qlyoung/mac-token-change

lib: change M:A:C to X:X:X:X:X:X

6 years agoMerge pull request #3199 from donaldsharp/eigrp_key
David Lamparter [Fri, 26 Oct 2018 20:25:36 +0000 (22:25 +0200)]
Merge pull request #3199 from donaldsharp/eigrp_key

Eigrp cli stuff

6 years agoMerge pull request #2926 from donaldsharp/router
David Lamparter [Fri, 26 Oct 2018 20:24:15 +0000 (22:24 +0200)]
Merge pull request #2926 from donaldsharp/router

zebra_ns split up

6 years agoMerge pull request #3237 from donaldsharp/actual_error
David Lamparter [Fri, 26 Oct 2018 20:21:44 +0000 (22:21 +0200)]
Merge pull request #3237 from donaldsharp/actual_error

lib: If command was successful don't store the command as an error

6 years agoMerge pull request #3227 from qlyoung/fix-exit-vrf-placement-upstream
David Lamparter [Fri, 26 Oct 2018 20:21:27 +0000 (22:21 +0200)]
Merge pull request #3227 from qlyoung/fix-exit-vrf-placement-upstream

vtysh: fix exit-vrf printing

6 years agoMerge pull request #3236 from qlyoung/finish-onlink
David Lamparter [Fri, 26 Oct 2018 20:19:33 +0000 (22:19 +0200)]
Merge pull request #3236 from qlyoung/finish-onlink

Finish onlink stuff

6 years agoMerge pull request #3247 from opensourcerouting/spelchek
Quentin Young [Thu, 25 Oct 2018 19:46:51 +0000 (15:46 -0400)]
Merge pull request #3247 from opensourcerouting/spelchek

*: spelchek

6 years ago*: spelchek 3247/head
David Lamparter [Thu, 25 Oct 2018 18:06:59 +0000 (20:06 +0200)]
*: spelchek

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agozebra: only perform shutdown signal processing once 2946/head
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 agolib: If command was successful don't store the command as an error 3237/head
Donald Sharp [Thu, 25 Oct 2018 01:03:18 +0000 (21:03 -0400)]
lib: If command was successful don't store the command as an error

The CMD_SUCCESS_DAEMON case should be excluded from storing the command line
that we think failed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Fix bandwidth command to actually read input properly 3199/head
Donald Sharp [Wed, 24 Oct 2018 23:58:14 +0000 (19:58 -0400)]
eigrpd: Fix bandwidth command to actually read input properly

The bandwidth command was not properly reading cli input
and would do weird stuff with the input.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Convert keychain authentication to DEFPY
Donald Sharp [Thu, 18 Oct 2018 12:13:38 +0000 (08:13 -0400)]
eigrpd: Convert keychain authentication to DEFPY

The keychain authentication code under eigrp was
using the wrong argv numbers for keychain lookup.  Convert
to DEFPY.

I do not actually know if this allows eigrp authentication to
work.  But this connects up a bit more of the pieces if it does.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agovtysh: Allow eigrp and rip access to keychain.c config
Donald Sharp [Thu, 18 Oct 2018 12:12:39 +0000 (08:12 -0400)]
vtysh: Allow eigrp and rip access to keychain.c config

The key-chain code was specific to rip and as such was not
being delivered to eigrp.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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 agolib: change M:A:C to X:X:X:X:X:X 3206/head
Quentin Young [Fri, 19 Oct 2018 18:36:06 +0000 (18:36 +0000)]
lib: change M:A:C to X:X:X:X:X:X

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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 agobuild: add "redistclean" target 3235/head
David Lamparter [Wed, 24 Oct 2018 15:31:31 +0000 (17:31 +0200)]
build: add "redistclean" target

This puts a source tree back in the state it was in after unpacking a
dist tarball.  Different from distclean in that it doesn't remove files
that are included in the tarball.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agobuild: make clean and dist consistent
David Lamparter [Wed, 24 Oct 2018 15:44:04 +0000 (17:44 +0200)]
build: make clean and dist consistent

We weren't cleaning up some files (a whole lot of python foobar) and had
some files in the dist tarball that don't quite belong there.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agobuild: work around automake wtf
David Lamparter [Mon, 15 Oct 2018 04:51:30 +0000 (06:51 +0200)]
build: work around automake wtf

For some reason, automake was "randomizing" the order of these few lines
in the generated output Makefile.in.

I have absolutely no clue what's going on, but it's the only thing
preventing me from building reproducible source tarballs (i.e.
bit-exactly identical), so... just slightly "rephrase" this.

Should behave exactly the same as before.

Signed-off-by: David Lamparter <equinox@diac24.net>
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 3234/head
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 3229/head
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 agobuild: carry --with-pkg-extra-version into tarballs 3233/head
David Lamparter [Tue, 23 Oct 2018 12:06:25 +0000 (14:06 +0200)]
build: carry --with-pkg-extra-version into tarballs

If we use "./configure --with-pkg-extra-version=... && make dist", we
probably want the dist tarball to remember the extra version it was
configured with.

Use --without-pkg-extra-version to kill the tag.

Signed-off-by: David Lamparter <equinox@diac24.net>
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 agozebra: Move rtadv to zebra_router 2926/head
Donald Sharp [Mon, 27 Aug 2018 19:34:36 +0000 (15:34 -0400)]
zebra: Move rtadv to zebra_router

The rtadv setting was not per namespace it is per router.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Remove _wrap_script from hook names
Donald Sharp [Mon, 27 Aug 2018 19:28:52 +0000 (15:28 -0400)]
zebra: Remove _wrap_script from hook names

The _wrap_script inclusion implies a certain end functionality
of which we don't care.  We just care that the hooks are called.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Move ipset_hash, ipset_entry_hash and iptable_hash into zrouter
Donald Sharp [Mon, 27 Aug 2018 19:24:02 +0000 (15:24 -0400)]
zebra: Move ipset_hash, ipset_entry_hash and iptable_hash into zrouter

These three data structures belong in the `zebra_router` structure
as that they do not belong in `struct zebra_ns`.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Move rules_hash to zrouter
Donald Sharp [Mon, 27 Aug 2018 18:36:46 +0000 (14:36 -0400)]
zebra: Move rules_hash to zrouter

Move the rules_hash to the zrouter data structure and provide
the additional bit of work needed to lookup the rule based upon
the namespace id as well.  Make the callers of functions not
care about what namespace id we are in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Start breakup of zns into zrouter and zns
Donald Sharp [Mon, 27 Aug 2018 14:43:37 +0000 (10:43 -0400)]
zebra: Start breakup of zns into zrouter and zns

The `struct zebra_ns` data structure is being used
for both router information as well as support for
the vrf backend( as appropriate ).  This is a confusing
state.  Start the movement of `struct zebra_ns` into
2 things `struct zebra_router` and `struct zebra_ns`.

In this new regime `struct zebra_router` is purely
for handling data about the router.  It has no knowledge
of the underlying representation of the Data Plane.

`struct zebra_ns` becomes a linux specific bit of code
that allows us to handle the vrf backend and is allowed
to have knowledge about underlying data plane constructs.

When someone implements a *bsd backend the zebra_vrf data
structure will need to be abstracted to take advantage of this
instead of relying on zebra_ns.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agostaticd: finish missing onlink pieces 3236/head
Quentin Young [Wed, 24 Oct 2018 06:54:15 +0000 (06:54 +0000)]
staticd: finish missing onlink pieces

Missed a cherry-pick somewhere, `onlink` was never actually displayed in
the config although it could be configured.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoisisd: delay lsp regeneration while events are still coming in 3230/head
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 agovtysh: fix exit-vrf printing 3227/head
Quentin Young [Tue, 23 Oct 2018 21:20:01 +0000 (21:20 +0000)]
vtysh: fix exit-vrf printing

Resolves issue with exit-vrf being placed at the end of zebra's portion
of a vrf block, but before other daemons' portions of the same config
block.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoRevert "bgpd: Set attributes according route-maps if applied for default-originate" 3225/head
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 3222/head
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 3204/head
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 3121/head
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 3209/head
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>