]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agodoc: cleanup community list docs more
Quentin Young [Fri, 8 Jun 2018 09:39:27 +0000 (09:39 +0000)]
doc: cleanup community list docs more

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: massive cleanup of bgp.rst
Quentin Young [Thu, 7 Jun 2018 22:35:52 +0000 (22:35 +0000)]
doc: massive cleanup of bgp.rst

This doc needed (and still needs) a lot of love.

* Reorganize doc into logical sections
* Clean up lots of grammatical mistakes and misspellings
* Clean up lots of bad formatting
* Remove non-existent configuration options and commands
* Mark deprecated configuration options as deprecated
* Fix all cross-references to follow a standard format
* Fix capitalization on section and subsection titles
* Fix section and subsection level underlines

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.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 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 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 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: 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

6 years agobgpd: Ignore return code for str2prefix
Donald Sharp [Wed, 30 May 2018 13:50:22 +0000 (09:50 -0400)]
bgpd: Ignore return code for str2prefix

The call to str2prefix_rd when we get to this point of the
code cannot fail.  As such let's just ignore the return code.

Found by Coverity SA.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: hash_get w/ hash_alloc_intern cannot fail
Donald Sharp [Wed, 30 May 2018 13:42:24 +0000 (09:42 -0400)]
pimd: hash_get w/ hash_alloc_intern cannot fail

The assignment of sa with the usage of hash_get and hash_alloc_intern
can never fail.  No need to look for a failure case.

Found by Coverity SA.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Notice when peer_clear fails
Donald Sharp [Wed, 30 May 2018 13:37:03 +0000 (09:37 -0400)]
bgpd: Notice when peer_clear fails

Issue Found by Coverity Scan.  When we call peer_clear we
are checking the return code in every other call.  Add
a bit of extra code to notice the failure and note it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Fix redundant or test
Donald Sharp [Wed, 30 May 2018 13:32:33 +0000 (09:32 -0400)]
bgpd: Fix redundant or test

The if statement had a second instance of the same variable
to test as part of the statement.

Found by SA.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: add BGP VRF use case
Philippe Guibert [Wed, 30 May 2018 13:15:25 +0000 (15:15 +0200)]
doc: add BGP VRF use case

This commit brings some information about BGP VRF case with peering
using multiple VRF instances.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoredhat: Fix old systems on upgrade path
Donald Sharp [Wed, 30 May 2018 11:53:28 +0000 (07:53 -0400)]
redhat: Fix old systems on upgrade path

Fix old systems in upgrade path to enable watchfrr when upgrading.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoredhat: Make watchfrr the default
Donald Sharp [Thu, 17 May 2018 11:58:02 +0000 (07:58 -0400)]
redhat: Make watchfrr the default

With systemd being the default on more systems now, lets
configure watchfrr to start else systemd systems on
redhat will not stay up for more than 1 minute.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd, lib: Cleanup CI warnings from system
Donald Sharp [Wed, 16 May 2018 12:17:53 +0000 (08:17 -0400)]
bgpd, lib: Cleanup CI warnings from system

Make the CI system happy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years ago*: support for evpn type-4 route
mitesh [Fri, 13 Apr 2018 22:01:12 +0000 (15:01 -0700)]
*: support for evpn type-4 route

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: Add null0 route back for aggregate-address route created.
Donald Sharp [Wed, 30 May 2018 00:04:17 +0000 (20:04 -0400)]
bgpd: Add null0 route back for aggregate-address route created.

The aggregate-address command is not creating the null0
route.  This got lost somewhere in the last year or so.
Add this ability back for BGP route installs into
zebra.

We need this aggregate route installed into the rib
because we are drawing this traffic to us irrelevant
of the number of routes we do have for that prefix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: cleanup sharp.rst
Quentin Young [Tue, 29 May 2018 21:00:59 +0000 (21:00 +0000)]
doc: cleanup sharp.rst

The user doc index was not displaying correctly because of some syntax
errors in sharp.rst

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2142 from pguibert6WIND/fs_zebra_complement
Donald Sharp [Tue, 29 May 2018 15:33:00 +0000 (11:33 -0400)]
Merge pull request #2142 from pguibert6WIND/fs_zebra_complement

Flowspec complement : port support and policy routing per interface and plugin wrapper

6 years agoMerge pull request #2307 from opensourcerouting/master-isis-tlv-copy-fix
Jafar Al-Gharaibeh [Tue, 29 May 2018 14:34:59 +0000 (10:34 -0400)]
Merge pull request #2307 from opensourcerouting/master-isis-tlv-copy-fix

isisd: fix bug in tlv_copy of empty MT-router-info

6 years agoMerge pull request #2266 from chiragshah6/ospfv3_dev
Jafar Al-Gharaibeh [Tue, 29 May 2018 14:33:48 +0000 (10:33 -0400)]
Merge pull request #2266 from chiragshah6/ospfv3_dev

ospf6d: Fix inter area prefix

6 years agoMerge pull request #2312 from opensourcerouting/master-malloc-0-fix
Donald Sharp [Tue, 29 May 2018 14:21:43 +0000 (10:21 -0400)]
Merge pull request #2312 from opensourcerouting/master-malloc-0-fix

lib: make allocators work for allocation sizes of 0

6 years agolib: make allocators work for allocation sizes of 0
Christian Franke [Tue, 29 May 2018 12:47:20 +0000 (14:47 +0200)]
lib: make allocators work for allocation sizes of 0

Fixes: #2155
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoMerge pull request #2310 from opensourcerouting/master-gitignore-pytest-cache
Quentin Young [Tue, 29 May 2018 07:45:04 +0000 (03:45 -0400)]
Merge pull request #2310 from opensourcerouting/master-gitignore-pytest-cache

tests: add pytest cache to gitignore

6 years agotests: Improve test suite for peer attributes
Pascal Mathis [Mon, 28 May 2018 16:50:52 +0000 (18:50 +0200)]
tests: Improve test suite for peer attributes

This commit improves the previous implementation of the peer attribute
test suite by getting rid of some really ugly macros and replacing them
with sane functions.

Additionally, the macro TEST_ASSERT was changed to TEST_ASSERT_EQ (==
comparison) which now also prints the line where the assertion has been
infringend. This should make it way more clear where a specific issue
has been spotted.

Last but not least, the multicast families for both IPv4 and IPv6 had
been added as they are working without any further changes or special
cases for all currently existing peer attributes. Other AFI/SAFI
references have been removed to keep the code clean.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agobgpd: Fix style issues for peer-group overrides
Pascal Mathis [Sun, 27 May 2018 17:36:48 +0000 (19:36 +0200)]
bgpd: Fix style issues for peer-group overrides

This commit fixes all outstanding style/formatting issues as detected by
'git clang-format' or 'checkpath' for the new peer-group override
implementation, which spanned across several commits.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agobgpd: Fix group overrides for AF flags/filters
Pascal Mathis [Sun, 27 May 2018 17:23:57 +0000 (19:23 +0200)]
bgpd: Fix group overrides for AF flags/filters

The previous commit introduced very strict unit tests which check all
three involved components (config input, config output, internal data
structures) which revealed two more bugs in the peer-group override
implementation.

This commit fixes overrides for 'allowas-in <number>' and
'unsuppress-map', which both had a small mistake/typo causing those
issues.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agotests: Add tests for overriding BGP peer attrs
Pascal Mathis [Sun, 27 May 2018 15:52:19 +0000 (17:52 +0200)]
tests: Add tests for overriding BGP peer attrs

This commit introduces unit tests for BGP peer attributes and checks all
three involved components, which are:

- CLI Configuration Input: The appropriate commands to configure the
attribute on either a peer or peer-group are being executed the same way
an end user would do it.

- CLI Configuration Output: The output of 'show running-config' is being
checked for presence/absence of expected configuration strings.

- Internal Data Structures: The internal data structures for maintaining
flag/filter states (value + override + invert) are being checked after
each operation to ensure the override has been implemented properly.

All attributes to be tested must be defined within the 'peer_attrs'
structure, which contains all peer attributes as of today and checks
them with both IPv4 Unicast and IPv6 Unicast. More address families are
supposed to be introduced at a later point in time.

Each attribute is being checked in its own 'clean' BGP environment, so
everything gets reset after each attribute to avoid any weird edge
cases. The 'correct' BGP startup and shutdown routine was taken from
'bgp_main.c' to ensure that we are not leaking any memory or acting
different than the real 'bgpd' would do.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agobgpd: Fix group overrides for inverted AF flags
Pascal Mathis [Sun, 27 May 2018 15:39:45 +0000 (17:39 +0200)]
bgpd: Fix group overrides for inverted AF flags

This commit fixes peer-group overrides for inverted AF flags. This
implementation is currently only being used by the three 'send-community'
flags. Commit 70ee29b4d introduced generic support for overriding AF
flags, but did not support inverted flags.

By introducing an additional array on the BGP peer structure called
'af_flags_invert' all current and future flags which should work in an
inverted way can now also be properly overridden.

The CLI commands will work exactly the same way as before, just that 'no
<command>' now sets the flag and override whereas '<command>' will unset
the flag and remove the override.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agotests: add pytest cache to gitignore
Christian Franke [Fri, 25 May 2018 15:39:26 +0000 (17:39 +0200)]
tests: add pytest cache to gitignore

6 years agoisisd: fix bug in tlv_copy of empty MT-router-info
Christian Franke [Mon, 28 May 2018 12:13:18 +0000 (14:13 +0200)]
isisd: fix bug in tlv_copy of empty MT-router-info

6 years agobgpd: Improve group overrides for AF filters
Pascal Mathis [Mon, 21 May 2018 10:09:25 +0000 (12:09 +0200)]
bgpd: Improve group overrides for AF filters

This commit adds the same peer-group override capabilites as d122d7cf7
for all filter/map options that can be enabled/disabled on each
address-family of a BGP peer.

All currently existing filter/map options are being supported:
filter-list, distribute-list, prefix-list, route-map and unsuppress-map

To implement this behavior, a new peer attribute 'filter_override' has
been added together with various PEER_FT_ (filter type) constants for
tracking the state of each filter in the same way as it is being done
with 'af_flags_override'.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agobgpd: Improve group overrides for AF flags
Pascal Mathis [Sat, 19 May 2018 20:10:48 +0000 (22:10 +0200)]
bgpd: Improve group overrides for AF flags

The current implementation for overriding peer-group configuration on a
peer member consists of several bandaids, which introduce more issues
than they fix. A generic approach for implementing peer-group overrides
for address-family flags is clearly missing.

This commit implements a generic and sane approach to overriding
peer-group configuration on a peer-member. A separate peer attribute
called 'af_flags_override' which was introduced in 04e1c5b is being used
to keep track of all address-family flags, storing whether the
configuration is being inherited from the parent-group or overridden.

All address-family flags are being supported by this implementation
(note: flags, not filters/maps) except 'send-community', which currently
breaks due to having the three flags enabled by default, which is not
being properly handled within this commit; all flags are supposed to
have an 'off'/'false' state by default.

In the interest of readability and comprehensibility, the flag
'send-community' is being fixed in a separate commit.

The following rules apply when looking at the new peer-group override
implementation this commit provides:

- Each peer-group can enable every flag (except the limitations noted
above), which gets automatically inherited to all members.

- Each peer can enable each flag independently and/or modify their
value, if available. (e.g.: weight <value>)

- Each command executed on a neighbor/peer gets explicitely set as an
override, so even when the peer-group has the same kind of
configuration, both will show up in 'show running-configuration'.

- Executing 'no <command>' on a peer will remove the peer-specific
configuration and make the peer inherit the configuration from the
peer-group again.

- Executing 'no <command>' on a peer-group will only remove the flag
from the peer-group, however not from peers explicitely setting that
flag.

This guarantees a clean implementation which does not break, even when
constantly messing with the flags of a peer-group. The same behavior is
present in Cisco devices, so people familiar with those should feel safe
when dealing with FRRs peer-groups.

The only restriction that now applies is that single peer cannot
disable a flag which was set by a peer-group, because 'no <command>' is
already being used for disabling a peer-specific override. This is not
supported by any known vendor though, would require many specific
edge-cases and magic comparisons and will most likely only end up
confusing the user. Additionally, peer-groups should only contain flags
which are being used by all peer members.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
6 years agoMerge pull request #2248 from ppmathis/enhancement/bgp-adjacent-routes
Jafar Al-Gharaibeh [Sun, 27 May 2018 16:53:33 +0000 (12:53 -0400)]
Merge pull request #2248 from ppmathis/enhancement/bgp-adjacent-routes

bgpd: Improve show commands for adjacent routes (advertised/received-routes)

6 years agoMerge pull request #2283 from donaldsharp/ignore_some_more
Russ White [Sun, 27 May 2018 15:02:15 +0000 (11:02 -0400)]
Merge pull request #2283 from donaldsharp/ignore_some_more

zebra: netlink cleanups

6 years agoMerge pull request #2291 from qlyoung/top-cleanup
Russ White [Sun, 27 May 2018 15:00:28 +0000 (11:00 -0400)]
Merge pull request #2291 from qlyoung/top-cleanup

*: remove update-autotools

6 years agoMerge pull request #2295 from qlyoung/sort-vni
Russ White [Sun, 27 May 2018 14:59:19 +0000 (10:59 -0400)]
Merge pull request #2295 from qlyoung/sort-vni

sort vni's

6 years agoMerge pull request #2289 from qlyoung/list-sort
Russ White [Sun, 27 May 2018 14:56:57 +0000 (10:56 -0400)]
Merge pull request #2289 from qlyoung/list-sort

linklist sorting + hash table -> linklist

6 years agoMerge pull request #2301 from LabNConsulting/working/master/bgpd-issue-2263-no-label...
Russ White [Sun, 27 May 2018 14:51:43 +0000 (10:51 -0400)]
Merge pull request #2301 from LabNConsulting/working/master/bgpd-issue-2263-no-label-auto

bgpd: issue 2263: fix "no label vpn export auto"

6 years agobgpd: issue 2263: fix "no label vpn export auto"
G. Paul Ziemba [Sat, 26 May 2018 14:05:42 +0000 (07:05 -0700)]
bgpd: issue 2263: fix "no label vpn export auto"

This command should unset the label (instead of wrongly
setting to "auto")

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
6 years agozebra: Add a breadcrumb for when we ignore a route
Donald Sharp [Fri, 25 May 2018 18:45:16 +0000 (14:45 -0400)]
zebra: Add a breadcrumb for when we ignore a route

When we receive a route that we think we own and we
are not in startup conditions, then add a small debug
to help debug the issue when this happens, instead
of silently just ignoring the route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agotools, zebra: Use different protocol value for our statics
Donald Sharp [Fri, 25 May 2018 18:36:12 +0000 (14:36 -0400)]
tools, zebra: Use different protocol value for our statics

The re-use of RTPROT_STATIC has caused too many collisions
where other legitimate route sources are causing us to
believe we are the originator of the route.  Modify
the code so that if another protocol inserts RTPROT_STATIC
we will assume it's a Kernel Route.

Fixes: #2293
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2300 from ajones-rvbd/ajones-issue-2299
Donald Sharp [Fri, 25 May 2018 22:44:40 +0000 (18:44 -0400)]
Merge pull request #2300 from ajones-rvbd/ajones-issue-2299

zebra/if_netlink: trivial cleanup of IFLA_WIRELESS

6 years agozebra/if_netlink: trivial cleanup of IFLA_WIRELESS
Arthur Jones [Fri, 25 May 2018 21:34:32 +0000 (14:34 -0700)]
zebra/if_netlink: trivial cleanup of IFLA_WIRELESS

With:
commit ba7773964c87019308e65a15b509e9889f7edc49
Author: Renato Westphal <renato@opensourcerouting.org>
Date:   Wed Sep 20 22:12:56 2017 -0300

We added our own copy of if_link.h (among others).  This
file unconditionally defines IFLA_WIRELESS, so we don't need
the conditional defines in the if_netlink.c code...

Issue: https://github.com/FRRouting/frr/issues/2299
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
6 years agoMerge pull request #2272 from msablic/vtysh_reconnect
Quentin Young [Fri, 25 May 2018 18:09:44 +0000 (14:09 -0400)]
Merge pull request #2272 from msablic/vtysh_reconnect

vtysh: reconnect to daemons when connection lost

6 years agobgpd: sort vni's in running config
Quentin Young [Fri, 25 May 2018 16:39:38 +0000 (16:39 +0000)]
bgpd: sort vni's in running config

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: add proper doc comments for hash & linklist
Quentin Young [Thu, 24 May 2018 18:43:57 +0000 (18:43 +0000)]
lib: add proper doc comments for hash & linklist

* Remove references to ospf source files from linklist.[ch]
* Remove documentation comments from hash.c and linklist.c
* Add comprehensive documentation comments to linklist.h and hash.h

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: add hash_to_list()
Quentin Young [Thu, 24 May 2018 15:44:54 +0000 (15:44 +0000)]
lib: add hash_to_list()

Convenience function to convert hash table to an unsorted linked list.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: add list_sort(), list_dup()
Quentin Young [Thu, 24 May 2018 07:04:48 +0000 (07:04 +0000)]
lib: add list_sort(), list_dup()

* list_dup(): duplicates a linked list
* list_sort(): in-place sort of linked list w/ ascending quicksort

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: attributes presence checked when mpreach is present
Philippe Guibert [Fri, 25 May 2018 10:22:14 +0000 (12:22 +0200)]
bgpd: attributes presence checked when mpreach is present

On the case where an mp_unreach attribute is received, while there is no
mp_reach attribute too, it is not necessary to check for missing
attributes.

Fixes: 67495ddb2e5b ("bgpd: Fixes for recent well-known-attr check patch.")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>