]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agozebra: Set "has" flags on optional scalar fields of FPM protobuf messages
Sergey Fionov [Wed, 28 Mar 2018 22:51:31 +0000 (01:51 +0300)]
zebra: Set "has" flags on optional scalar fields of FPM protobuf messages

Otherwise, these fields are not serialized.

Signed-off-by: Sergey Fionov <fionov@gmail.com>
6 years agoMerge pull request #1854 from qlyoung/integer-standards-compliance
Lou Berger [Wed, 28 Mar 2018 14:30:54 +0000 (10:30 -0400)]
Merge pull request #1854 from qlyoung/integer-standards-compliance

*: use C99 standard fixed-width integer types

6 years agoMerge pull request #1928 from pguibert6WIND/flowspec_get_vrf_from_rt
Lou Berger [Tue, 27 Mar 2018 20:41:59 +0000 (16:41 -0400)]
Merge pull request #1928 from pguibert6WIND/flowspec_get_vrf_from_rt

bgpd / flowspec / add an API to get incoming VRF from a RT

6 years agoMerge pull request #1970 from opensourcerouting/1804-master
Donald Sharp [Tue, 27 Mar 2018 19:30:10 +0000 (15:30 -0400)]
Merge pull request #1970 from opensourcerouting/1804-master

Ubuntu 18.04 Package support and docs (Master branch)

6 years ago*: use C99 standard fixed-width integer types
Quentin Young [Tue, 27 Mar 2018 19:13:34 +0000 (15:13 -0400)]
*: use C99 standard fixed-width integer types

The following types are nonstandard:
- u_char
- u_short
- u_int
- u_long
- u_int8_t
- u_int16_t
- u_int32_t

Replace them with the C99 standard types:
- uint8_t
- unsigned short
- unsigned int
- unsigned long
- uint8_t
- uint16_t
- uint32_t

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agotools, doc: update checkpatch for u_int_*
Quentin Young [Mon, 19 Mar 2018 16:35:48 +0000 (12:35 -0400)]
tools, doc: update checkpatch for u_int_*

* Checkpatch.pl now checks for nonstandard integral types
* Add shell script to replace all nonstandard types with their standard
  counterparts in C source files
* Document usage of types, mention conversion script

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1915 from vivek-cumulus/evpn-ipv6-external-routing
Philippe Guibert [Tue, 27 Mar 2018 15:32:06 +0000 (17:32 +0200)]
Merge pull request #1915 from vivek-cumulus/evpn-ipv6-external-routing

EVPN IPv6 external routing

6 years agodoc: Add Ubuntu 18.04 doc to dist tar
Martin Winter [Tue, 27 Mar 2018 14:41:28 +0000 (07:41 -0700)]
doc: Add Ubuntu 18.04 doc to dist tar

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodoc: Add Building instructions for Ubuntu 18.04
Martin Winter [Tue, 27 Mar 2018 14:09:11 +0000 (07:09 -0700)]
doc: Add Building instructions for Ubuntu 18.04

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: update doc for Ubuntu 18.04
Martin Winter [Mon, 19 Mar 2018 18:29:34 +0000 (11:29 -0700)]
debianpkg: update doc for Ubuntu 18.04

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Override systemd-service-file-refers-to-unusual-wantedby-target
Martin Winter [Mon, 19 Mar 2018 18:28:19 +0000 (11:28 -0700)]
debianpkg: Override systemd-service-file-refers-to-unusual-wantedby-target

Override new lintian warning for using the network-online.target

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Fix maintainer-script-should-not-use-recursive-chown-or-chmod
Martin Winter [Mon, 19 Mar 2018 18:16:09 +0000 (11:16 -0700)]
debianpkg: Fix maintainer-script-should-not-use-recursive-chown-or-chmod

New lintian version causes warning for recursive chown and chmod. This
change avoids the the recursive operation by splitting it into to commands

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Add support for Ubuntu 18.04
Martin Winter [Sat, 17 Mar 2018 19:57:13 +0000 (12:57 -0700)]
debianpkg: Add support for Ubuntu 18.04

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agobgpd: add an API to get incoming VRF from a RT
Philippe Guibert [Tue, 23 Jan 2018 17:09:12 +0000 (18:09 +0100)]
bgpd: add an API to get incoming VRF from a RT

This commit is relying on bgp vpn-policy. It is needed to configure
several bgp vrf instances, and in each of the bgp instance, configure
the following command under address-family ipv4 unicast node:
[no] rt redirect import RTLIST

Then, a function is provided, that will parse the BGP instances.
The incoming ecommunity will be compared with the configured rt redirect
import ecommunity list, and return the VRF first instance of the matching
route target.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #1946 from qlyoung/asan-configure-option
Russ White [Mon, 26 Mar 2018 21:16:53 +0000 (17:16 -0400)]
Merge pull request #1946 from qlyoung/asan-configure-option

frr: add configure flags for sanitizers, document sanitizers

6 years agoMerge pull request #1940 from qlyoung/no-write-incomplete-config
Russ White [Mon, 26 Mar 2018 17:20:43 +0000 (13:20 -0400)]
Merge pull request #1940 from qlyoung/no-write-incomplete-config

watchfrr, vtysh: do not write config during crash

6 years agoMerge pull request #1944 from donaldsharp/delete_from_tables
Russ White [Mon, 26 Mar 2018 17:12:29 +0000 (13:12 -0400)]
Merge pull request #1944 from donaldsharp/delete_from_tables

zebra: Allow deletions from arbitrary tables

6 years agoMerge pull request #1958 from chiragshah6/ospfv3_dev
Russ White [Mon, 26 Mar 2018 17:10:08 +0000 (13:10 -0400)]
Merge pull request #1958 from chiragshah6/ospfv3_dev

ospf6d: Retain inter area border router type-4

6 years agoMerge pull request #1956 from pguibert6WIND/misc_fixes_netns
Renato Westphal [Mon, 26 Mar 2018 16:29:38 +0000 (13:29 -0300)]
Merge pull request #1956 from pguibert6WIND/misc_fixes_netns

Misc fixes netns

6 years agoMerge pull request #1964 from qlyoung/fix-no-display-heuristic-coalesce-u
Rafael Zalamena [Mon, 26 Mar 2018 14:52:23 +0000 (11:52 -0300)]
Merge pull request #1964 from qlyoung/fix-no-display-heuristic-coalesce-u

bgpd: actually suppress coalesce-time

6 years agobgpd: actually suppress coalesce-time
Quentin Young [Mon, 26 Mar 2018 05:24:41 +0000 (01:24 -0400)]
bgpd: actually suppress coalesce-time

Previous patches to suppress display of automatically calculated
coalesce-time did not fully work because the flag indicating whether the
value was automatically calculated was not set properly upon creation.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoUpdate zebra_netns_notify.c
Philippe Guibert [Sat, 24 Mar 2018 05:49:21 +0000 (06:49 +0100)]
Update zebra_netns_notify.c

6 years agoMerge pull request #1952 from donaldsharp/zebra_rule_replace
Renato Westphal [Fri, 23 Mar 2018 16:01:57 +0000 (13:01 -0300)]
Merge pull request #1952 from donaldsharp/zebra_rule_replace

zebra: Allow rule replace semantics

6 years agoMerge pull request #1957 from qlyoung/fix-mtrace-unaligned-pointer-access
Renato Westphal [Fri, 23 Mar 2018 15:33:11 +0000 (12:33 -0300)]
Merge pull request #1957 from qlyoung/fix-mtrace-unaligned-pointer-access

pimd: fix unaligned pointer access

6 years agoMerge pull request #1945 from qlyoung/fix-vrf-static-routes
Renato Westphal [Fri, 23 Mar 2018 15:31:53 +0000 (12:31 -0300)]
Merge pull request #1945 from qlyoung/fix-vrf-static-routes

zebra: fix config of vrf static routes

6 years agozebra: handle the zebra netns delete notifications
Philippe Guibert [Thu, 22 Mar 2018 17:02:00 +0000 (18:02 +0100)]
zebra: handle the zebra netns delete notifications

Upon a 'ip netns del' event, the associated vrf with netns backend is
looked for, then the internal contexts are first disabled, then
suppressed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: move hash rules creation to the vrf_enable place
Philippe Guibert [Thu, 22 Mar 2018 17:00:10 +0000 (18:00 +0100)]
zebra: move hash rules creation to the vrf_enable place

The vrf netns usage makes a crash, when deleting vrf, due to the hash
list of rules not initialised for non default VRF.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: fix misc changes related to link updates with correct zns
Philippe Guibert [Thu, 22 Mar 2018 16:00:48 +0000 (17:00 +0100)]
zebra: fix misc changes related to link updates with correct zns

Because vrf with netns backend may be used, the correct zns must be
found prior any modifications.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #1904 from qlyoung/docuser
Martin Winter [Thu, 22 Mar 2018 23:39:55 +0000 (23:39 +0000)]
Merge pull request #1904 from qlyoung/docuser

docs cleanup

6 years agoMerge pull request #1931 from msablic/pim_mtrace_router
Donald Sharp [Thu, 22 Mar 2018 22:41:20 +0000 (18:41 -0400)]
Merge pull request #1931 from msablic/pim_mtrace_router

pimd: mtrace router code improvments and fixes

6 years agopimd: mtrace router code improvments and fixes
Mladen Sablic [Mon, 19 Mar 2018 16:36:29 +0000 (17:36 +0100)]
pimd: mtrace router code improvments and fixes

Mtrace router code has been fixed for the case where no PIM
interface exists towards the source and next-hop is returned.

fwd_ttl is set to one, for correct reporting of mcast ttl.

Also, NO_MULTICAST error is returned when there is no PIM.

And prev_hop is set to source, for case when connected to source,
to help termination of hop-by-hop queries.

Dependency of logging on PIM, when sending mtrace packet, has been
removed.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
6 years agozebra: When removing a rule, release from hash storing it.
Donald Sharp [Thu, 22 Mar 2018 21:00:19 +0000 (17:00 -0400)]
zebra: When removing a rule, release from hash storing it.

When we are removing a rule from the zns->rules_hash, free up
the rule from the hash and free the memory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: document sanitizers & scanners
Quentin Young [Thu, 22 Mar 2018 18:55:13 +0000 (14:55 -0400)]
doc: document sanitizers & scanners

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoospf6d: retain inter area border router type-4
Chirag Shah [Mon, 12 Mar 2018 23:37:06 +0000 (16:37 -0700)]
ospf6d: retain inter area border router type-4

During Intra area border router calculation, all
border routers are  marked for remove from brouter table.
Once SPF calculation is done, retain inter area
border router if the adv. intra border router (abr)
is present in SPF table.

Ticket:CM-20171
Testing Done:
Validated inter area ASBR (L1) is retained at
R1 and R2 post intra border router calculation.

L1 -- (area 1)-- L2 -- (area 0) -- R1 --- R2

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoconfigure.ac: --enable-[thread,memory]-sanitizer
Quentin Young [Thu, 22 Mar 2018 18:25:28 +0000 (14:25 -0400)]
configure.ac: --enable-[thread,memory]-sanitizer

Add configure options to enable the other sanitizers.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agozebra: Allow rule replace semantics
Donald Sharp [Thu, 22 Mar 2018 12:26:27 +0000 (08:26 -0400)]
zebra: Allow rule replace semantics

When we get a rule that is supposed to replace
an existing rule, make it look like a rule replace
semantics.

Install new rule, then delete the old original rule.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: fix unaligned pointer access
Quentin Young [Thu, 22 Mar 2018 16:41:52 +0000 (12:41 -0400)]
pimd: fix unaligned pointer access

Can't take the address of members of packed structures due to potential for
alignment faults on some platforms.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: work around broken makeinfo on centos7
Quentin Young [Thu, 22 Mar 2018 16:01:13 +0000 (12:01 -0400)]
doc: work around broken makeinfo on centos7

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1947 from LabNConsulting/working/master/bgp-vpn-leak-crash-fix
Donald Sharp [Thu, 22 Mar 2018 12:42:04 +0000 (08:42 -0400)]
Merge pull request #1947 from LabNConsulting/working/master/bgp-vpn-leak-crash-fix

bgpd: fix crash unleaking RFP routes

6 years agoMerge pull request #1951 from opensourcerouting/alpine-gitignore
Donald Sharp [Thu, 22 Mar 2018 12:29:37 +0000 (08:29 -0400)]
Merge pull request #1951 from opensourcerouting/alpine-gitignore

alpine: add APKBUILD to .gitignore

6 years agoalpine: add APKBUILD to .gitignore
Christian Franke [Thu, 22 Mar 2018 12:27:35 +0000 (13:27 +0100)]
alpine: add APKBUILD to .gitignore

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agobgpd: qualify use of BGP_ROUTE_RFP with ENABLE_BGP_VNC
G. Paul Ziemba [Thu, 22 Mar 2018 04:18:25 +0000 (21:18 -0700)]
bgpd: qualify use of BGP_ROUTE_RFP with ENABLE_BGP_VNC

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
6 years agoMerge pull request #1938 from donaldsharp/vpn_peer_withdrawal
paulzlabn [Thu, 22 Mar 2018 01:27:22 +0000 (18:27 -0700)]
Merge pull request #1938 from donaldsharp/vpn_peer_withdrawal

bgpd: Fix peer withdrawal and route leaking for vpn's and vrf's

6 years agobgpd: fix crash unleaking RFP routes
G. Paul Ziemba [Thu, 22 Mar 2018 01:20:39 +0000 (18:20 -0700)]
bgpd: fix crash unleaking RFP routes

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
6 years agofrr: --enable-address-sanitizer
Quentin Young [Thu, 22 Mar 2018 00:47:34 +0000 (20:47 -0400)]
frr: --enable-address-sanitizer

Modify Autotools files to support an easy option for enabling ASAN.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agozebra: fix config of vrf static routes
Quentin Young [Wed, 21 Mar 2018 20:47:46 +0000 (16:47 -0400)]
zebra: fix config of vrf static routes

This patch fixes two bugs with respect to static route configuration
inside vrf contexts:

* Entering a negative form of a static route created the static route.
* Once created, static routes could not be deleted.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: Use BGP instance to derive the VRF for route uninstall
vivek [Wed, 1 Nov 2017 20:36:46 +0000 (13:36 -0700)]
bgpd: Use BGP instance to derive the VRF for route uninstall

When uninstalling routes from zebra, ensure that the BGP instance for
which processing is being done is used to derive the VRF. It is incorrect
to derive the VRF from the peer when dealing with scenarios like VRF route
leaking, EVPN symmetric/external routing etc., where the peer which sourced
the route could belong to a different VRF.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Ticket: CM-18413
Reviewed By: CCR-6778
Testing Done: Manual testing of BGP route withdraw/delete, bgp-min

6 years agobgpd: Fix peer withdrawal and route leaking for vpn's and vrf's
Donald Sharp [Tue, 20 Mar 2018 13:18:01 +0000 (09:18 -0400)]
bgpd: Fix peer withdrawal and route leaking for vpn's and vrf's

When a peer is removed the routes are withdrawn via bgp_process_main_one
As such we need to put a bit of code in to handle this situation
for the vpn/vrf route leaking code.

I think this code path is also called for when a vrf's route is
changed and I believe we will end up putting a bit more code
here to handle the nexthop changes.

I've also started trying to document the bgp_process_main_one
function a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1935 from qlyoung/doc-how-to-style
Russ White [Wed, 21 Mar 2018 18:41:44 +0000 (14:41 -0400)]
Merge pull request #1935 from qlyoung/doc-how-to-style

doc: document code style tools

6 years agozebra: Allow deletions from arbitrary tables
Donald Sharp [Wed, 21 Mar 2018 17:49:51 +0000 (13:49 -0400)]
zebra: Allow deletions from arbitrary tables

When a route_delete is received allow the deletion
to occur in the passed in tableid if the vrf is VRF_DEFAULT.

This now matches route_add behavior in rib_add_multipath

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: use ` not `` for :file:
Quentin Young [Wed, 21 Mar 2018 16:34:51 +0000 (12:34 -0400)]
doc: use ` not `` for :file:

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1943 from donaldsharp/update_pr_1942
Donald Sharp [Wed, 21 Mar 2018 14:57:55 +0000 (10:57 -0400)]
Merge pull request #1943 from donaldsharp/update_pr_1942

ripd: considering a interface with 2 or more IP

6 years agoMerge pull request #1941 from donaldsharp/cs1
Rafael Zalamena [Wed, 21 Mar 2018 12:36:05 +0000 (09:36 -0300)]
Merge pull request #1941 from donaldsharp/cs1

Cs1

6 years agoripd: considering a interface with 2 or more IP
lyq140 [Wed, 21 Mar 2018 11:46:36 +0000 (07:46 -0400)]
ripd: considering a interface with 2 or more IP

This commit fixes these three issues:

1) rinfo is used for rip packet sending not tmp_rinfo
2) With RIP_SPLIT_HORIZON and an interface with more than 1 ip addresses
we will not send the routes out an interface that they originate on
3) With RIP_SPLIT_HORIZON_POISONED_REVERSE and an interface with
more than 1 ip address we will not send out ipA with a metric of 16
and ipb with a metric of 1.  Both will be 16 now.

Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
6 years agowatchfrr, vtysh: do not write config during crash
Quentin Young [Tue, 20 Mar 2018 19:07:36 +0000 (15:07 -0400)]
watchfrr, vtysh: do not write config during crash

If a daemon is restarting, crashed, or otherwise in the process of
reconnecting to watchfrr and a user issues "write memory" or "write
file" the resulting config will not include the configuration of that
daemon. This is problematic because this output will overwrite the
previous config, potentially causing unintentional loss of configuration
stored only in the config file based upon timing.

This patch remedies that by making watchfrr check that all daemons are
up before attempting a configuration write, and updating vtysh so that
its failsafe respects this condition as well.

Note that this issue only manifests when using integrated config.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: No need to check return value of str2prefix_rd
Donald Sharp [Tue, 20 Mar 2018 23:22:49 +0000 (19:22 -0400)]
bgpd: No need to check return value of str2prefix_rd

The str2prefix_rd function can fail, but for auto-derived
values this should be impossible to happen.  So ignore it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Clean up irt a tiny bit
Donald Sharp [Tue, 20 Mar 2018 23:19:54 +0000 (19:19 -0400)]
bgpd: Clean up irt a tiny bit

This commit does these 2 things:

1) irt->vrfs is never NULL so no need to test for it

2) No need to check for a good irt value returned from
vrf_import_rt_new as that the alloc operation will
dump if memory allocation fails.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Fix comparison to not look at itself
Donald Sharp [Tue, 20 Mar 2018 23:16:24 +0000 (19:16 -0400)]
zebra: Fix comparison to not look at itself

The nexthop vrf comparison should not be against itself

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: close fd when not needed
Donald Sharp [Tue, 20 Mar 2018 23:14:18 +0000 (19:14 -0400)]
zebra: close fd when not needed

Upon decision that the vrf is not going to be supported
by namespaces close the fd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospf6d: Delete malloced on error path
Donald Sharp [Tue, 20 Mar 2018 23:12:20 +0000 (19:12 -0400)]
ospf6d: Delete malloced on error path

We create route_to_del and then on the error path
we are not properly freeing it up.  Let's clean it
up for the goodness of mankind.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: peer->bgp must be non NULL
Donald Sharp [Tue, 20 Mar 2018 23:02:19 +0000 (19:02 -0400)]
bgpd: peer->bgp must be non NULL

We lock and set peer->bgp at peer creation and only
remove it at deletion.  Therefore these tests are
not needed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: More ecommunity string leak cleanup
Donald Sharp [Tue, 20 Mar 2018 22:57:08 +0000 (18:57 -0400)]
bgpd: More ecommunity string leak cleanup

Do not leak the ecommunity string created.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Check for peer before dereferencing it
Donald Sharp [Tue, 20 Mar 2018 22:50:22 +0000 (18:50 -0400)]
bgpd: Check for peer before dereferencing it

Check for the peer structure passed in to be valid
before we deref it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Ensure that we properly decode the zapi_route sent to us
Donald Sharp [Tue, 20 Mar 2018 22:48:12 +0000 (18:48 -0400)]
zebra: Ensure that we properly decode the zapi_route sent to us

Ensure that we have properly decoded the zapi_route sent to us
and if we cannot decode, log and move on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Fix memory leak on re-enter case
Donald Sharp [Tue, 20 Mar 2018 22:41:00 +0000 (18:41 -0400)]
zebra: Fix memory leak on re-enter case

When we have a case where the user re-enters the same
ip route line, we need to delete the memory we just
malloc'ed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: bgp.rst cleanup
Quentin Young [Tue, 20 Mar 2018 17:39:27 +0000 (13:39 -0400)]
doc: bgp.rst cleanup

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: fixup Makefile.am dist sources
Quentin Young [Tue, 20 Mar 2018 17:12:39 +0000 (13:12 -0400)]
doc: fixup Makefile.am dist sources

Add missing sources. Also took the liberty of sorting the sources
alphabetically.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: cleanup alpine build doc
Quentin Young [Tue, 20 Mar 2018 14:43:21 +0000 (10:43 -0400)]
doc: cleanup alpine build doc

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: forgot to add cligraph.* to dist sources
Quentin Young [Mon, 19 Mar 2018 17:41:23 +0000 (13:41 -0400)]
doc: forgot to add cligraph.* to dist sources

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: cleanup some misc files
Quentin Young [Wed, 14 Mar 2018 18:56:03 +0000 (14:56 -0400)]
doc: cleanup some misc files

* Translate plaintext stub documenting bgpd preprocessor constants for
  attributes into a RST file and include it in the doctree
* Remove the Markdown version of the OSPF-API document, as I've already
  translated it into RST
* Remove the Markdown version of the modules document, as I've already
  translated it into RST
* Rename the various "Building_FRR_*" documents to match standard RST
  file conventions

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: cligraph.svg -> cligraph.png, misc cleanup
Quentin Young [Wed, 14 Mar 2018 20:36:14 +0000 (16:36 -0400)]
doc: cligraph.svg -> cligraph.png, misc cleanup

LaTeX doesn't know how to typeset SVG images, so use a png. Sphinx has a
plugin to automatically convert images to the right format for every
builder but it depends on imagemagick and God only knows what plugin
support is like on Centos 6...

Also correct the name of the BGP typecodes doc in its index file.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: bgpd.rst title cleanup
Quentin Young [Wed, 14 Mar 2018 19:49:26 +0000 (15:49 -0400)]
doc: bgpd.rst title cleanup

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: make ospf section
Quentin Young [Wed, 14 Mar 2018 19:44:28 +0000 (15:44 -0400)]
doc: make ospf section

With OSPF API and OSPF-SR docs as subsections.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: move ZAPI docs to developer/
Quentin Young [Wed, 14 Mar 2018 19:05:23 +0000 (15:05 -0400)]
doc: move ZAPI docs to developer/

Documentation on ZAPI protocol details doesn't belong in the user docs.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: cleanup some misc files
Quentin Young [Wed, 14 Mar 2018 18:56:03 +0000 (14:56 -0400)]
doc: cleanup some misc files

* Translate plaintext stub documenting bgpd preprocessor constants for
  attributes into a RST file and include it in the doctree
* Remove the Markdown version of the OSPF-API document, as I've already
  translated it into RST
* Remove the Markdown version of the modules document, as I've already
  translated it into RST
* Rename the various "Building_FRR_*" documents to match standard RST
  file conventions

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1825 from chiragshah6/ospfv3_dev
Jafar Al-Gharaibeh [Tue, 20 Mar 2018 19:09:29 +0000 (13:09 -0600)]
Merge pull request #1825 from chiragshah6/ospfv3_dev

ospf6d: Intra-prefix LSA update after frr restart

6 years agoMerge pull request #1933 from qlyoung/move-community-md
Jafar Al-Gharaibeh [Tue, 20 Mar 2018 18:55:45 +0000 (12:55 -0600)]
Merge pull request #1933 from qlyoung/move-community-md

frr, doc: Move COMMUNITY.md to doc/developer/workflow.rst

6 years agoMerge pull request #1913 from LabNConsulting/working/master/bgp-vpn-leak-cli
Donald Sharp [Tue, 20 Mar 2018 17:26:48 +0000 (13:26 -0400)]
Merge pull request #1913 from LabNConsulting/working/master/bgp-vpn-leak-cli

bgpd: new vpn-policy CLI

6 years agoMerge pull request #1937 from LabNConsulting/working/master/bgp-vpn-leak-doc
Quentin Young [Tue, 20 Mar 2018 17:08:56 +0000 (13:08 -0400)]
Merge pull request #1937 from LabNConsulting/working/master/bgp-vpn-leak-doc

doc: bgp vpn-vrf leaking CLI

6 years agoMerge pull request #1932 from ajones-rvbd/ajones-issue-1930
Martin Winter [Tue, 20 Mar 2018 14:55:22 +0000 (14:55 +0000)]
Merge pull request #1932 from ajones-rvbd/ajones-issue-1930

redhat: build dist tarball in a chroot

6 years agoMerge pull request #1909 from donaldsharp/zebra_rule
Renato Westphal [Tue, 20 Mar 2018 12:45:57 +0000 (09:45 -0300)]
Merge pull request #1909 from donaldsharp/zebra_rule

Zebra rule

6 years agoMerge pull request #1936 from qlyoung/fix-static-route-config-write-missing-space
Renato Westphal [Tue, 20 Mar 2018 11:52:25 +0000 (08:52 -0300)]
Merge pull request #1936 from qlyoung/fix-static-route-config-write-missing-space

zebra: fix static route config write

6 years agobgp_vty.c: fix docstrings for bgp_imexport_vpn
G. Paul Ziemba [Tue, 20 Mar 2018 03:59:46 +0000 (20:59 -0700)]
bgp_vty.c: fix docstrings for bgp_imexport_vpn

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
6 years agobgpd: vpn-vrf-leaking new CLI: address Vivek's review comments + crash fix
G. Paul Ziemba [Sun, 18 Mar 2018 22:08:45 +0000 (15:08 -0700)]
bgpd: vpn-vrf-leaking new CLI: address Vivek's review comments + crash fix

    - vpn_leak_to_vpn_active(): check instance type
    - vpn_leak_prechange(): qualify with test for active
    - vpn_leak_postchange(): remove duplicated call to
vpn_leak_from_vrf_update_all()

    - bgp_vty.c: Avoid null-pointer dereference for command "no rt vpn import"

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
6 years agobgpd: new vpn-policy CLI
G. Paul Ziemba [Fri, 16 Mar 2018 18:11:37 +0000 (11:11 -0700)]
bgpd: new vpn-policy CLI

PR #1739 added code to leak routes between (default VRF) VPN safi and unicast RIBs in any VRF. That set of changes included temporary CLI including vpn-policy blocks to specify RD/RT/label/&c. After considerable discussion, we arrived at a consensus CLI shown below.

The code of this PR implements the vpn-specific parts of this syntax:

router bgp <as> [vrf <FOO>]
    address-family <afi> unicast
        rd (vpn|evpn) export (AS:NN | IP:nn)
        label (vpn|evpn) export (0..1048575)
        rt (vpn|evpn) (import|export|both) RTLIST...
        nexthop vpn (import|export) (A.B.C.D | X:X::X:X)
        route-map (vpn|evpn|vrf NAME) (import|export) MAP

        [no] import|export [vpn|evpn|evpn8]
        [no] import|export vrf NAME

User documentation of the vpn-specific parts of the above syntax is in PR #1937

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
6 years agodoc: bgp vpn-vrf leaking CLI
G. Paul Ziemba [Tue, 20 Mar 2018 04:06:39 +0000 (21:06 -0700)]
doc: bgp vpn-vrf leaking CLI

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
6 years agoMerge pull request #1875 from ajones-rvbd/ajones-for-upstream
Quentin Young [Mon, 19 Mar 2018 22:03:18 +0000 (18:03 -0400)]
Merge pull request #1875 from ajones-rvbd/ajones-for-upstream

docker build: build Alpine Linux dev packages in docker

6 years agozebra: fix static route config write
Quentin Young [Mon, 19 Mar 2018 21:35:39 +0000 (17:35 -0400)]
zebra: fix static route config write

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodoc: document code style tools
Quentin Young [Mon, 19 Mar 2018 20:17:05 +0000 (16:17 -0400)]
doc: document code style tools

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodocker build: build Alpine Linux dev packages in docker
Arthur Jones [Mon, 12 Mar 2018 19:24:26 +0000 (12:24 -0700)]
docker build: build Alpine Linux dev packages in docker

Building alpine packages in a "standard" distro can be
complicated due to the limited scope of the distro (embedded
and small docker images).  Building in a VM is one possibility,
but docker support for alpine is very good (default docker images
come in alpine due to the very small size).

Here, we want to package up the current git repo into apk packages
that can be easily installed in alpine linux using the apk tool.
This support is not intended to package released versions of
apk packages, that, if it comes to be, should be done here:

git://git.alpinelinux.org/aports

We're content here to build packages that can be used by developers
to try out frr in docker and other alpine environments.

This is a very minimal environment, we don't support importing
keys (so, installing the packages with apk requires the
--allow-untrusted option).  In addition, we can't use the
git commit id in hex as version tag, as alpine doesn't support hex
digits in the version string.  So, we need to convert the git hash
to decimal before tagging the package with the extra version.
This is yucky, but I can't think of another way to get a
unique version per package.  The alpine way (using a numeric date),
only works for released packages, not for dev packages.

Issue: https://github.com/FRRouting/frr/issues/1859
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
6 years agoredhat: enable dist tarball to build in a chroot
Arthur Jones [Mon, 19 Mar 2018 17:04:00 +0000 (10:04 -0700)]
redhat: enable dist tarball to build in a chroot

When building the rpms, we can use a chroot (in my case docker) to
ensure that the BuildRequires are complete.  This test failed with
errors like:

    checking for CARES... no
    configure: error: trying to build nhrpd, but libcares not found. install c-ares and its -dev headers.
    error: Bad exit status from /var/tmp/rpm-tmp.FewvLf (%build)

This is due to a couple missing BuildRequires in the spec file.  Here, we
add those in for all RPM builds.

Testing done:

Ran a docker build on CentOS7 which succeeded.  Loaded the modules onto
CentOS6 to make sure they were at least valid there, that succeeded.

Issue: https://github.com/FRRouting/frr/issues/1930
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
6 years agofrr, doc: Move COMMUNITY.md to doc/developer/workflow.rst
Quentin Young [Mon, 19 Mar 2018 17:55:43 +0000 (13:55 -0400)]
frr, doc: Move COMMUNITY.md to doc/developer/workflow.rst

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1908 from donaldsharp/peer_established
Rafael Zalamena [Mon, 19 Mar 2018 14:35:37 +0000 (11:35 -0300)]
Merge pull request #1908 from donaldsharp/peer_established

bgpd: Clean up peer status checking for a received nlri

6 years agoMerge pull request #1924 from donaldsharp/cs
Rafael Zalamena [Mon, 19 Mar 2018 14:27:53 +0000 (11:27 -0300)]
Merge pull request #1924 from donaldsharp/cs

Cs

6 years agoMerge pull request #1925 from opensourcerouting/bugfix-isis_bpf_read
Donald Sharp [Mon, 19 Mar 2018 14:13:35 +0000 (10:13 -0400)]
Merge pull request #1925 from opensourcerouting/bugfix-isis_bpf_read

isisd: Fixed the way isis reads from bpf

6 years agobgpd: Don't leak the ecommunity_ecom2str string in debug
Donald Sharp [Mon, 19 Mar 2018 02:12:45 +0000 (22:12 -0400)]
bgpd: Don't leak the ecommunity_ecom2str string in debug

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Free memory leak
Donald Sharp [Mon, 19 Mar 2018 02:02:24 +0000 (22:02 -0400)]
zebra: Free memory leak

Free the memory leaked stream in failure cases.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Fix leaked fd and prevent null pointer deref
Donald Sharp [Mon, 19 Mar 2018 01:46:58 +0000 (21:46 -0400)]
pimd: Fix leaked fd and prevent null pointer deref

When the pim_nexthop_lookup fails, close the opened fd
as part of the failure condition.

Additionally pim_nexthop_lookup assumes that we've
actually already looked up a nexthop in the past.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Compare to the number of elements not size of array
Donald Sharp [Mon, 19 Mar 2018 01:30:27 +0000 (21:30 -0400)]
zebra: Compare to the number of elements not size of array

When figuring out whom to call and if we actually can legally
call into the handler array actually use the number of elements
in the array instead of the size of the array.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Fix leaked fd.
Donald Sharp [Mon, 19 Mar 2018 01:21:16 +0000 (21:21 -0400)]
zebra: Fix leaked fd.

When we detect an error condition, close down the opened
fd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.