]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #2298 from qlyoung/pipe-actions-vtysh
Russ White [Fri, 8 Jun 2018 11:39:36 +0000 (07:39 -0400)]
Merge pull request #2298 from qlyoung/pipe-actions-vtysh

*: add support for `|` actions

5 years agoMerge pull request #2347 from gromit1811/pim-connected-nexthop-fix
Russ White [Fri, 8 Jun 2018 11:12:26 +0000 (07:12 -0400)]
Merge pull request #2347 from gromit1811/pim-connected-nexthop-fix

pimd: Fix nexthop determination when sending towards RP

5 years agoMerge pull request #2377 from ajones-rvbd/ajones-issue-2375
Russ White [Fri, 8 Jun 2018 11:07:25 +0000 (07:07 -0400)]
Merge pull request #2377 from ajones-rvbd/ajones-issue-2375

tests/isisd: bypass test_fuzz_isis_tlv when inet_ntop is broken

5 years agoMerge pull request #2380 from donaldsharp/pim_stuff
Russ White [Fri, 8 Jun 2018 11:06:19 +0000 (07:06 -0400)]
Merge pull request #2380 from donaldsharp/pim_stuff

pimd: Fix ecmp_enable and ecmp_rebalance_enable

5 years agoMerge pull request #2383 from donaldsharp/bgp_lunicast
Russ White [Fri, 8 Jun 2018 11:04:46 +0000 (07:04 -0400)]
Merge pull request #2383 from donaldsharp/bgp_lunicast

bgpd: Actually display labeled unicast routes received

5 years agoMerge pull request #2385 from donaldsharp/SA_SA_SA
Russ White [Fri, 8 Jun 2018 10:57:30 +0000 (06:57 -0400)]
Merge pull request #2385 from donaldsharp/SA_SA_SA

Some small clang 6.0 cleanups

5 years agoMerge pull request #2292 from donaldsharp/fixup_sb_stuff
Russ White [Fri, 8 Jun 2018 10:52:01 +0000 (06:52 -0400)]
Merge pull request #2292 from donaldsharp/fixup_sb_stuff

Fixup sb stuff

5 years agoMerge pull request #2123 from qlyoung/zserv-mt
Russ White [Fri, 8 Jun 2018 10:47:14 +0000 (06:47 -0400)]
Merge pull request #2123 from qlyoung/zserv-mt

Multithreaded Zserv

5 years agoMerge pull request #2349 from donaldsharp/aggregate_stuff
Russ White [Fri, 8 Jun 2018 10:42:24 +0000 (06:42 -0400)]
Merge pull request #2349 from donaldsharp/aggregate_stuff

Aggregate stuff

5 years agobgpd, lib, ospf6d, vtysh: fix possible snprintf possible truncation
Donald Sharp [Thu, 7 Jun 2018 23:51:13 +0000 (19:51 -0400)]
bgpd, lib, ospf6d, vtysh: fix possible snprintf possible truncation

With a new version of clang 6.0, the compiler is detecting more
issues where we may be possibly be truncating the output string.
Fix by increasing the size of the output string to make the compiler
happy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agovtysh, zebra: Fix function parameters
Donald Sharp [Thu, 7 Jun 2018 23:49:17 +0000 (19:49 -0400)]
vtysh, zebra: Fix function parameters

New version of clang are detecting function parameters that we should
not be casting as such.  Fix these issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Actually display labeled unicast routes received
Donald Sharp [Thu, 7 Jun 2018 21:10:38 +0000 (17:10 -0400)]
bgpd: Actually display labeled unicast routes received

The labeled unicast and unicast tables have been combined
into the unicast table.  Additionally we have a restriction
where if you configure labeled unicast you cannot configure
unicast.  This created a bug with 'show bgp ipv4 labeled-unicast summ'
command where we were displaying NoNeg, because v4 has been intentionally
turned off.

Modify the code so that when we are looking up if we have negotiated
a capapbility we use the correct one, while still using the appropriate
table for prefix count.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2382 from opensourcerouting/remove_preprocessor_check
Donald Sharp [Thu, 7 Jun 2018 19:49:12 +0000 (15:49 -0400)]
Merge pull request #2382 from opensourcerouting/remove_preprocessor_check

zebra: remove unnecessary preprocessor check

5 years agozebra: remove unnecessary preprocessor check
Renato Westphal [Thu, 7 Jun 2018 18:45:33 +0000 (15:45 -0300)]
zebra: remove unnecessary preprocessor check

The IFLA_INFO_SLAVE_KIND constant is always defined now that we imported
our own copies of the Linux kernel headers. Remove the preprocessor
checks since they aren't necessary anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agopimd: Fix ecmp_enable and ecmp_rebalance_enable
Donald Sharp [Thu, 7 Jun 2018 14:23:32 +0000 (10:23 -0400)]
pimd: Fix ecmp_enable and ecmp_rebalance_enable

These commands were being accepted in all vrf's and
affecting all vrf's behavior globally, since they were
global variables.

Modify the code to make these two commands work
on a per-vrf basis.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2335 from donaldsharp/bgp_memory_hooliganism
Lou Berger [Thu, 7 Jun 2018 10:05:38 +0000 (06:05 -0400)]
Merge pull request #2335 from donaldsharp/bgp_memory_hooliganism

Bgp memory leaks and crashes?

5 years agoMerge pull request #2345 from pguibert6WIND/issue_2328
Quentin Young [Wed, 6 Jun 2018 23:21:49 +0000 (19:21 -0400)]
Merge pull request #2345 from pguibert6WIND/issue_2328

lib: make netns command visible under vtysh

5 years agodoc: add docs on | actions, find command
Quentin Young [Wed, 6 Jun 2018 19:51:34 +0000 (19:51 +0000)]
doc: add docs on | actions, find command

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: fix output mangling with | include
Quentin Young [Wed, 6 Jun 2018 19:09:44 +0000 (19:09 +0000)]
lib: fix output mangling with | include

Sometimes output would be mangled when filtering with include as a
result of the following bugs:

* Filters were applied per each call to vty_out() instead of buffering
  until a line break and then applying
* Long output would sometimes be cut due to using the wrong buffer
  pointer

Also remove the trailing \n as it should no longer be necessary to
ensure the vty prompt ends up on a new line.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: Collapse bgp_aggregate_add into bgp_aggregate_route
Donald Sharp [Wed, 6 Jun 2018 17:33:19 +0000 (13:33 -0400)]
bgpd: Collapse bgp_aggregate_add into bgp_aggregate_route

These two functions are functionally the same, except
bgp_aggregate_route is meant to handle the addition and
deletion of routes, while aggregate_add is meant for all of them.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Allow bgp to know when to actually add/delete agg route
Donald Sharp [Wed, 6 Jun 2018 17:13:00 +0000 (13:13 -0400)]
bgpd: Allow bgp to know when to actually add/delete agg route

The aggregated route was being sent in updates to peers every
time a route changed that we were aggregating.  Modify
the code such that we only send aggregated route updates
if we actually have something different to tell the peer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Move bgp_aggregate_delete to a better location
Donald Sharp [Wed, 6 Jun 2018 16:46:14 +0000 (12:46 -0400)]
bgpd: Move bgp_aggregate_delete to a better location

The function bgp_aggregate_delete function was forward
declared and not static.  Move it so we can clean that
up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Seperate out install/removal of aggregate from delete function
Donald Sharp [Wed, 6 Jun 2018 16:31:17 +0000 (12:31 -0400)]
bgpd: Seperate out install/removal of aggregate from delete function

This is a transitional commit, to get us where we want to go.
Seperate out the install/removal of the aggregate route from
the bgp_aggregate_delete and bgp_aggregate_route functions.

In the future we'll write a bit of code to determine if the
aggregate add has actually changed any information we care
about.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: initialize vty->of
Quentin Young [Fri, 1 Jun 2018 20:13:18 +0000 (20:13 +0000)]
lib: initialize vty->of

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add vector_compact(), use after str splits
Quentin Young [Tue, 29 May 2018 21:38:18 +0000 (21:38 +0000)]
lib: add vector_compact(), use after str splits

* Add function to move all data to the start of a vector by shifting
  over contiguous empty slots
* Use this function to remove empty slots leftover after
  frrstr_filter_vec

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: fix static analysis issues, use regfree()
Quentin Young [Tue, 29 May 2018 17:13:51 +0000 (17:13 +0000)]
lib: fix static analysis issues, use regfree()

* Fix potential NULL dereference
* Fix use of uninitialized value
* Fix leaking memory by not freeing regex_t
* Fix extra \n when using empty regex filter
* Clean up still-reachable hook memory
* Handle nonexistent pager

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add vector_remove() to vector.[ch]
Quentin Young [Fri, 25 May 2018 22:49:53 +0000 (22:49 +0000)]
lib: add vector_remove() to vector.[ch]

An optimized version of this has already been implemented within graph.c
that assumes some specialized constraints for that code. It's generally
useful so this change implements a general purpose version of it.

This fixes cmd_make_strvec() that was broken by some code shuffling in
previous commits.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago*: style for | support
Quentin Young [Fri, 25 May 2018 20:31:07 +0000 (20:31 +0000)]
*: style for | support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovtysh: add | support
Quentin Young [Mon, 14 May 2018 22:13:03 +0000 (18:13 -0400)]
vtysh: add | support

* Rewrite pager implementation
* Replace fprintf() with vty_out()
* Modify vty_out() for better vtysh support
* Remove static global outputfile var
* Remove fp argument from many vtysh functions
* Add some docs for stuff along the way

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add cli preprocessor for `|` actions
Quentin Young [Sun, 13 May 2018 00:14:22 +0000 (20:14 -0400)]
lib: add cli preprocessor for `|` actions

This patch adds a CLI preprocessor function that activates when `|` is
found in the command. This is the start of adding support for some text
processing utilities intended for inline use. The first one implemented
here is `| include`, which provides grep-like filtering of command
output.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add hook for preprocessing commands
Quentin Young [Sun, 13 May 2018 00:09:08 +0000 (20:09 -0400)]
lib: add hook for preprocessing commands

This patch adds a hook point intended to allow subscribers to modify the
raw text of a CLI command before it is passed to the rest of the CLI
pipeline. To give access to the raw text of the command, a new function
for executing CLI has been defined whose only difference from
`cmd_execute_command` is that it accepts the command to execute as a
string rather than as a string vector.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add string utilities
Quentin Young [Fri, 11 May 2018 19:32:06 +0000 (15:32 -0400)]
lib: add string utilities

I see lots of the same code being copy-pasted and slightly tweaked for
string processing all over the codebase. Time to start aggregating these
pieces into something consistent and correct.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agotests/isisd: bypass test_fuzz_isis_tlv when inet_ntop is broken
Arthur Jones [Wed, 6 Jun 2018 14:47:17 +0000 (07:47 -0700)]
tests/isisd: bypass test_fuzz_isis_tlv when inet_ntop is broken

On Alpine Linux edge, musl does not seem to be RFC 5952 4.2.2
compliant (how to print a single :0: in the IPv6 address).  Let's
skip that test, as we get false negatives when running against
that version of musl.

Credit for the idea for the fix and how to fix it is due to
chris@opensourcerouting.org.

Testing done:

make check on alpine linux passes now

Issue: https://github.com/FRRouting/frr/issues/2375
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
5 years agoMerge pull request #2376 from mjstapp/doc_link
Quentin Young [Tue, 5 Jun 2018 21:30:07 +0000 (17:30 -0400)]
Merge pull request #2376 from mjstapp/doc_link

doc: fix broken link to 'code formatting' section

5 years agodoc: fix broken link to 'code formatting' section
Mark Stapp [Tue, 5 Jun 2018 19:32:07 +0000 (15:32 -0400)]
doc: fix broken link to 'code formatting' section

Mismatch in rst source was producing a dead link in the html output

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agobgpd: Dissallow useless aggregation commands from the cli
Donald Sharp [Tue, 5 Jun 2018 17:22:11 +0000 (13:22 -0400)]
bgpd: Dissallow useless aggregation commands from the cli

We were allowing useless aggregation commands (/32 and /128).
These were being silently accepted and nvgenned and then
just ignored.

When a user enters a value that should be rejected tell
them and reject.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: first variable is set but never used.
Donald Sharp [Tue, 5 Jun 2018 16:56:46 +0000 (12:56 -0400)]
bgpd: first variable is set but never used.

For the bgp_aggregate_route function it is
set but never used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: rework bgp_aggregate_route
Donald Sharp [Fri, 1 Jun 2018 18:33:28 +0000 (14:33 -0400)]
bgpd: rework bgp_aggregate_route

Make bgp_aggregate_route easier to read.  It was indented so many
levels that it was extremely hard to figure out what it was doing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Remove AGGREGATE_NEXTHOP_CHECK as it's been unused
Donald Sharp [Fri, 1 Jun 2018 18:23:44 +0000 (14:23 -0400)]
bgpd: Remove AGGREGATE_NEXTHOP_CHECK as it's been unused

The #define AGGREGATE_NEXTHOP_CHECK has not been used
for a very very long time.  Since this is effectively
dead code, let's remove it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Trust the bgp_table_top_nolock for aggregates
Donald Sharp [Fri, 1 Jun 2018 18:19:12 +0000 (14:19 -0400)]
bgpd: Trust the bgp_table_top_nolock for aggregates

The safi passed in to short-circuit the aggregate lookup
adds code complexity and little speed improvements for
the case where we actually may have aggregates configured!
Since bgp_table_top_nolock() actually tells us if there
are any aggregates installed and safely returns if there
is nothing to do, trust it.  As that we know for those
safi's were we don't want to have, we dissallow the
creation via the cli anyways.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Cleanup bgp_aggregate_set/unset to not worry about safi so much
Donald Sharp [Fri, 1 Jun 2018 18:13:58 +0000 (14:13 -0400)]
bgpd: Cleanup bgp_aggregate_set/unset to not worry about safi so much

The bgp_aggregate_set/unset functions are only called from the cli
invocations which control what AFI/SAFI we are looking at.  Tests
for safi are unimportant.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2367 from qlyoung/docuser
Lou Berger [Tue, 5 Jun 2018 16:09:41 +0000 (12:09 -0400)]
Merge pull request #2367 from qlyoung/docuser

doc: document 'show cli graph'

5 years agoMerge pull request #2351 from donaldsharp/bgp_deprecation
Lou Berger [Tue, 5 Jun 2018 16:05:39 +0000 (12:05 -0400)]
Merge pull request #2351 from donaldsharp/bgp_deprecation

Bgp deprecation

5 years agoMerge pull request #2344 from pguibert6WIND/bgp_vrf_usecase
Lou Berger [Tue, 5 Jun 2018 16:02:45 +0000 (12:02 -0400)]
Merge pull request #2344 from pguibert6WIND/bgp_vrf_usecase

doc: add BGP VRF use case

5 years agoMerge pull request #2304 from ppmathis/enhancement/bgp-pg-overrides
Quentin Young [Tue, 5 Jun 2018 15:51:57 +0000 (11:51 -0400)]
Merge pull request #2304 from ppmathis/enhancement/bgp-pg-overrides

bgpd: Add proper support for overriding peer-group AF-flags/filters

5 years agoMerge pull request #2343 from donaldsharp/vtysh_fp
Renato Westphal [Tue, 5 Jun 2018 15:48:10 +0000 (12:48 -0300)]
Merge pull request #2343 from donaldsharp/vtysh_fp

Code Cleanup and SA issues

5 years agolib: make netns command visible under vtysh
Philippe Guibert [Fri, 1 Jun 2018 14:35:52 +0000 (16:35 +0200)]
lib: make netns command visible under vtysh

Make netns command visible under vtysh.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #2365 from donaldsharp/vxlan_mem_leak
Renato Westphal [Tue, 5 Jun 2018 14:50:35 +0000 (11:50 -0300)]
Merge pull request #2365 from donaldsharp/vxlan_mem_leak

zebra: Fix memory leak on host prefix removal

5 years agobgpd: Cleanup assumptions in bgp_evpn.c
Donald Sharp [Fri, 1 Jun 2018 01:32:37 +0000 (21:32 -0400)]
bgpd: Cleanup assumptions in bgp_evpn.c

The bgp data structures:
bgp->vnihash
bgp->vrf_export_rtl
bgp->vrf_import_rtl
bgp->l2vnis

Must always be valid data structures.  So remove the tests
that ensure that they are.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospfd: lp may be null, make sure it isn't
Donald Sharp [Fri, 1 Jun 2018 00:55:59 +0000 (20:55 -0400)]
ospfd: lp may be null, make sure it isn't

We lookup the lp value and lookup_linkparams_by_instance
can return NULL if something has gone terribly wrong.
Make sure that lp is not NULL.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospfd: Note that we do not care about self origination in this case
Donald Sharp [Fri, 1 Jun 2018 00:51:43 +0000 (20:51 -0400)]
ospfd: Note that we do not care about self origination in this case

When we first get a packet, we need to know if we are self
originated later to make correct decisions.  Go ahead and
note that we do not plan to make any decision points
about our self origination here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoripd: Intentionally ignore return from rip_send_packet
Donald Sharp [Fri, 1 Jun 2018 00:45:49 +0000 (20:45 -0400)]
ripd: Intentionally ignore return from rip_send_packet

Coverity SA has noticed that we are not ignoring the return
codes from rip_send_packet in one case.  Since we do not care
let the system know we don't.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agovtysh: fp can never be NULL at this point in code
Donald Sharp [Fri, 1 Jun 2018 00:27:01 +0000 (20:27 -0400)]
vtysh: fp can never be NULL at this point in code

The fp pointer has already been dereferenced in all paths
leading to the test for non NULL.  Since we never crash
we know it cannot be NULL.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2368 from qlyoung/fix-show-bgp-l2vpn-evpn-missing-docstring
Renato Westphal [Tue, 5 Jun 2018 14:14:09 +0000 (11:14 -0300)]
Merge pull request #2368 from qlyoung/fix-show-bgp-l2vpn-evpn-missing-docstring

bgpd: fix missing docstring

5 years agoMerge pull request #2352 from qlyoung/fix-yet-another-vtysh-read-bug
Renato Westphal [Tue, 5 Jun 2018 14:05:48 +0000 (11:05 -0300)]
Merge pull request #2352 from qlyoung/fix-yet-another-vtysh-read-bug

vtysh: fix potential stack buffer overflow

5 years agoMerge pull request #2366 from msablic/pim_doc
Donald Sharp [Tue, 5 Jun 2018 11:41:31 +0000 (07:41 -0400)]
Merge pull request #2366 from msablic/pim_doc

doc: expanded PIM doc. w/ missing commands

5 years agoMerge pull request #2371 from gromit1811/pim-rp-lookup-messages-fix
Donald Sharp [Tue, 5 Jun 2018 11:40:53 +0000 (07:40 -0400)]
Merge pull request #2371 from gromit1811/pim-rp-lookup-messages-fix

pimd: Fix debug messages

5 years agoMerge pull request #2372 from gromit1811/pim-comment-fix
Donald Sharp [Tue, 5 Jun 2018 11:37:31 +0000 (07:37 -0400)]
Merge pull request #2372 from gromit1811/pim-comment-fix

pimd: Comment spelling fix

5 years agopimd: Comment spelling fix
Martin Buck [Tue, 5 Jun 2018 08:36:30 +0000 (10:36 +0200)]
pimd: Comment spelling fix

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
5 years agodoc: expanded PIM doc. w/ missing commands
Mladen Sablic [Mon, 4 Jun 2018 18:45:30 +0000 (20:45 +0200)]
doc: expanded PIM doc. w/ missing commands

PIM documantation was missing commands relevant to PIM protocol
that were documented in COMMANDS file of pimd directory.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
5 years agopimd: Fix nexthop determination when sending towards RP
Martin Buck [Mon, 4 Jun 2018 13:52:14 +0000 (15:52 +0200)]
pimd: Fix nexthop determination when sending towards RP

When sending a PIM join upwards on the RP-based tree, it may get dropped on
the last hop before the RP if the RP is reachable via a connected route
(i.e. there's no associated nexthop). pimd needs to put the nexthop IP
address into the PIM join payload and fails to do that if that route has a
nexthop of 0.0.0.0. So whenever we look up a route to determine the nexthop
or we receive a nexthop tracking update from Zebra, use the destination
address as the nexthop address for connected routes.

Fixes #2326.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
5 years agobgpd: fix missing docstring
Quentin Young [Mon, 4 Jun 2018 21:51:07 +0000 (21:51 +0000)]
bgpd: fix missing docstring

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: document 'show cli graph'
Quentin Young [Mon, 4 Jun 2018 20:18:11 +0000 (20:18 +0000)]
doc: document 'show cli graph'

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: Fix memory leak on host prefix removal
Donald Sharp [Mon, 4 Jun 2018 17:31:34 +0000 (13:31 -0400)]
zebra: Fix memory leak on host prefix removal

When we have a host prefix, actually free the alloced memory
associated with it when we free it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #1976 from pguibert6WIND/issue_1968
Donald Sharp [Mon, 4 Jun 2018 13:36:01 +0000 (09:36 -0400)]
Merge pull request #1976 from pguibert6WIND/issue_1968

Issue 1968 / ip route <> table X

5 years agoMerge pull request #2259 from ppmathis/enhancement/peer-enforce-first-as
Donald Sharp [Mon, 4 Jun 2018 13:35:00 +0000 (09:35 -0400)]
Merge pull request #2259 from ppmathis/enhancement/peer-enforce-first-as

bgpd: Move 'enforce-first-as' from global to peer

5 years agoMerge pull request #2355 from opensourcerouting/fix-build-freebsd-snmp
Donald Sharp [Mon, 4 Jun 2018 12:36:02 +0000 (08:36 -0400)]
Merge pull request #2355 from opensourcerouting/fix-build-freebsd-snmp

build: append -std=gnu99 after SNMP_CFLAGS

5 years agoMerge pull request #2356 from opensourcerouting/doc-ldpd-rfcs
Donald Sharp [Mon, 4 Jun 2018 12:35:03 +0000 (08:35 -0400)]
Merge pull request #2356 from opensourcerouting/doc-ldpd-rfcs

doc: list RFCs supported by ldpd in overview.rst

5 years agopimd: Fix debug messages
Martin Buck [Mon, 4 Jun 2018 12:27:48 +0000 (14:27 +0200)]
pimd: Fix debug messages

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
5 years agozebra: Add some vrf information to debug messages
Donald Sharp [Tue, 29 May 2018 14:33:04 +0000 (10:33 -0400)]
zebra: Add some vrf information to debug messages

When debugging code in redistribute.c, it is useful to output
the vrf we think the interface is in.  So display it
when we are debugging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Actually release peer from bgp_peer hash
Donald Sharp [Thu, 31 May 2018 16:56:21 +0000 (12:56 -0400)]
bgpd: Actually release peer from bgp_peer hash

When we are determining the state of a peer, we sometimes
detect that we should update the peer->su.  The bgp->peer_hash
keeps a hash of peers based upon the peer->su.  This requires
us to release the stored value before we re-insert it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: open per vrf listen socket for linux type vrfs
Lou Berger [Sat, 2 Jun 2018 19:01:36 +0000 (15:01 -0400)]
bgpd: open per vrf listen socket for linux type vrfs

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agolib: fix setsockopt arg
Lou Berger [Sun, 6 May 2018 15:25:58 +0000 (11:25 -0400)]
lib: fix setsockopt arg

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agodoc: list RFCs supported by ldpd in overview.rst
Renato Westphal [Sun, 3 Jun 2018 01:36:10 +0000 (22:36 -0300)]
doc: list RFCs supported by ldpd in overview.rst

This is only a minor step in the direction of actually writing
documentation for ldpd...

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobuild: append -std=gnu99 after SNMP_CFLAGS
Renato Westphal [Sun, 3 Jun 2018 01:00:32 +0000 (22:00 -0300)]
build: append -std=gnu99 after SNMP_CFLAGS

Programs that link to libnetsnmp must be compiled using a special set
of flags as specified by the "net-snmp-config --base-cflags" command
(whose output is stored in the SNMP_CFLAGS variable). The problem is
that "net-snmp-config --base-cflags" can output -std=c99 in addition to
other compiler flags in some platforms, and this breaks the build since
FRR souce code makes use of some GNU compiler extensions (e.g. allow
trailing commas in function parameter lists). In order to solve this
problem, append -std=gnu99 after SNMP_CFLAGS in all makefiles where this
variable is used. This way the -std=c99 flag will be overwritten when it's
present. Source files that don't link to libnetsnmp will be compiled using
either -std=gnu99 or -std=gnu11 depending on the compiler availability.

Fixes #1617.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #2245 from donaldsharp/type_4
Russ White [Fri, 1 Jun 2018 20:00:14 +0000 (16:00 -0400)]
Merge pull request #2245 from donaldsharp/type_4

Support EVPN Type 4 Routes

5 years agovtysh: fix potential stack buffer overflow
Quentin Young [Fri, 1 Jun 2018 19:25:03 +0000 (19:25 +0000)]
vtysh: fix potential stack buffer overflow

If vtysh was instructed to perform line-by-line processing on the output
of a command executed against a daemon and this output, as received by
vtysh, was not terminated with a newline, vtysh could print contents of
memory to its output device.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: Note deprecation in documentation
Donald Sharp [Fri, 1 Jun 2018 19:13:54 +0000 (15:13 -0400)]
bgpd: Note deprecation in documentation

Note that these commands:

bgp config-type cisco
no bgp multiple-instance

are now deprecated and will be removed in a future version of FRR.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Deprecate and hide the `no bgp multiple-instance` command
Donald Sharp [Fri, 1 Jun 2018 19:03:57 +0000 (15:03 -0400)]
bgpd: Deprecate and hide the `no bgp multiple-instance` command

This command needs to be deprecated.  It partially implements
a refusal to create multiple instances.  If you do not need
multiple instances, just don't create them in the cli instead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Hide and deprecate `bgp config-type cisco` command
Donald Sharp [Fri, 1 Jun 2018 18:56:15 +0000 (14:56 -0400)]
bgpd: Hide and deprecate `bgp config-type cisco` command

This command needs to be deprecated.  It sets a small variety
of options via the BGP_OPT_CONFIG_CISCO flag.  Set for removal
in 1 year.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2329 from pguibert6WIND/issue_2275_proposal
Quentin Young [Fri, 1 Jun 2018 16:39:20 +0000 (12:39 -0400)]
Merge pull request #2329 from pguibert6WIND/issue_2275_proposal

doc: inform the diff between config from zebra and outside

5 years agoMerge pull request #2309 from opensourcerouting/master-mpls_te_print_detail-fix
Olivier Dugeon [Fri, 1 Jun 2018 14:32:15 +0000 (16:32 +0200)]
Merge pull request #2309 from opensourcerouting/master-mpls_te_print_detail-fix

isisd: fix mpls_te_print_detail to not read out-of-bounds

5 years agozebra: keep one command to handle vty with/without table param
Philippe Guibert [Thu, 17 May 2018 13:34:51 +0000 (15:34 +0200)]
zebra: keep one command to handle vty with/without table param

That fix is a workaround from a vtysh limitation.
Because table identifier should be accessible in configuration only for
vrf netns backends, there was a need to differentiate the vty commands.
Unfortunately, vtysh parses the two commands without knowing which
command has really been installed.
Using one single vty command will avoid having this issue in vtysh.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: add in show vrf information about vrf backend kind
Philippe Guibert [Thu, 10 May 2018 08:05:28 +0000 (10:05 +0200)]
zebra: add in show vrf information about vrf backend kind

By default, nothing is displayed. If vrf backend is linux network
namespaces, then "netns-based vrfs" is displayed, before dumping the
list of VRFs.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: add show ip route table vrf command
Philippe Guibert [Wed, 28 Mar 2018 09:06:39 +0000 (11:06 +0200)]
zebra: add show ip route table vrf command

It is possible to get table per VRF, provided that vrf backend is
configured with NETNS.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: ns_table list is extended to support multiple NETNS
Philippe Guibert [Wed, 28 Mar 2018 08:58:28 +0000 (10:58 +0200)]
zebra: ns_table list is extended to support multiple NETNS

In the case where vrf backend is netns, then the list of ns tables may
be extended. A single list is kept,but an attribute is added: the ns_id.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: table_id election with the vrf backend
Philippe Guibert [Wed, 28 Mar 2018 08:46:14 +0000 (10:46 +0200)]
zebra: table_id election with the vrf backend

As table_id for VRF with netns backend is main table ( RT_TABLE_MAIN or
zebrad.rtm_table_default), this makes possible to return the table id
that wants to be configured for those cases. ( in addition to default
VRF). In other cases ( VRF Lite presumably), then vrf table_id is
returned.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: add table keyword to route configuration vty command
Philippe Guibert [Wed, 28 Mar 2018 09:31:22 +0000 (11:31 +0200)]
zebra: add table keyword to route configuration vty command

Add the table keyword for all ip route/ip mroute/ipv6 route commands
that are available. Also, the main structure is being added a table
identifier.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: replace 'intact' keyword with something more clear
Philippe Guibert [Wed, 30 May 2018 09:46:13 +0000 (11:46 +0200)]
doc: replace 'intact' keyword with something more clear

Keeping the config intact might be misunderstood. I say that even if VRF
netns is automatically discovered, it is possible for administrator to
save the netns information in the config file, to bring more clarity (
hence the config commands available).

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: inform the diff between config from zebra and outside
Philippe Guibert [Wed, 30 May 2018 09:38:24 +0000 (11:38 +0200)]
doc: inform the diff between config from zebra and outside

To avoid some confusions, it is precised in the documentation that
the configuration not done from zebra will not be injected in the
configuration context. As consequence, the config file will not be
impacted by underlying network context. But also, this will not be
possible for *Zebra* to attempt to modify outside networking objects.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #2324 from qlyoung/docuser
Martin Winter [Fri, 1 Jun 2018 01:01:09 +0000 (03:01 +0200)]
Merge pull request #2324 from qlyoung/docuser

doc: cleanup sharp.rst

5 years agoMerge pull request #2250 from donaldsharp/watchfrr
Martin Winter [Thu, 31 May 2018 23:20:26 +0000 (01:20 +0200)]
Merge pull request #2250 from donaldsharp/watchfrr

redhat: Make watchfrr the default

5 years agoMerge pull request #2332 from donaldsharp/sa_42
Renato Westphal [Thu, 31 May 2018 15:10:35 +0000 (12:10 -0300)]
Merge pull request #2332 from donaldsharp/sa_42

Sa 42

5 years agoMerge pull request #2325 from donaldsharp/aggregate
Renato Westphal [Thu, 31 May 2018 15:05:48 +0000 (12:05 -0300)]
Merge pull request #2325 from donaldsharp/aggregate

bgpd: Add null0 route back for aggregate-address route created.

5 years agobgpd: Cleanup leaked ecommunity on shutdown
Donald Sharp [Wed, 30 May 2018 22:53:13 +0000 (18:53 -0400)]
bgpd: Cleanup leaked ecommunity on shutdown

Cleanup the leaked ecommunity data that we may have on shutdown.
Cleanup leaked vrf name strings on shutdown.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Lock originating bgp pointer for vrf route leaking
Donald Sharp [Wed, 30 May 2018 22:17:17 +0000 (18:17 -0400)]
bgpd: Lock originating bgp pointer for vrf route leaking

There exists cases where we will attempt to hard delete
the bgp instance( say a `no router bgp` is issued )
when we have vrf route leaking.  If we do have this
lock the bgp instance of the originator and do not
let it be deleted out from under us until we are
finished processing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix memory use after free
Donald Sharp [Wed, 30 May 2018 21:55:04 +0000 (17:55 -0400)]
bgpd: Fix memory use after free

We were immediately using memory after it was freed.  Fix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Cleanup leaked memory on shutdown
Donald Sharp [Wed, 30 May 2018 21:51:29 +0000 (17:51 -0400)]
bgpd: Cleanup leaked memory on shutdown

When we are shutting down, there exists a code path
where the connected table leaks some memory.  Cleanup
the code to remove the memory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix SA issue with uninited ifindex value
Donald Sharp [Thu, 31 May 2018 13:37:34 +0000 (09:37 -0400)]
bgpd: Fix SA issue with uninited ifindex value

The rearrangement of where the decision point of
filling in the aggregate information, must have allowed
SA to find a path of code where we may use ifindex uninitialized.
While I don't think this is possible to happen, make this issue
go away.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoisisd: fix mpls_te_print_detail to not read out-of-bounds
Christian Franke [Fri, 25 May 2018 16:21:25 +0000 (18:21 +0200)]
isisd: fix mpls_te_print_detail to not read out-of-bounds