]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge pull request #1882 from LabNConsulting/working/master/community-dismiss
Martin Winter [Tue, 3 Apr 2018 14:54:27 +0000 (15:54 +0100)]
Merge pull request #1882 from LabNConsulting/working/master/community-dismiss

workflow.rst: add note that author's shouldn't delete a comment or review

6 years agoMerge pull request #2005 from qlyoung/remove-masc-node
Rafael Zalamena [Mon, 2 Apr 2018 20:55:44 +0000 (17:55 -0300)]
Merge pull request #2005 from qlyoung/remove-masc-node

lib: remove MASC_NODE

6 years agoMerge pull request #2003 from qlyoung/remove-service-node
Rafael Zalamena [Mon, 2 Apr 2018 20:53:44 +0000 (17:53 -0300)]
Merge pull request #2003 from qlyoung/remove-service-node

lib: remove SERVICE_NODE

6 years agoMerge pull request #2012 from qlyoung/draft-bz-v4goawayflag-00
Russ White [Sun, 1 Apr 2018 21:21:43 +0000 (17:21 -0400)]
Merge pull request #2012 from qlyoung/draft-bz-v4goawayflag-00

zebra: implement draft-bz-v4goawayflag-00

6 years agozebra: implement draft-bz-v4goawayflag-00
Quentin Young [Sun, 1 Apr 2018 20:37:24 +0000 (16:37 -0400)]
zebra: implement draft-bz-v4goawayflag-00

Adds support for V4 GoAway flag as described in
https://www.ietf.org/id/draft-bz-v4goawayflag-00.txt

This option allows advertising neighbors to indicate to recipients that
they should disable IPv4 on the link.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: remove MASC_NODE
Quentin Young [Fri, 30 Mar 2018 21:45:41 +0000 (17:45 -0400)]
lib: remove MASC_NODE

Unused

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: remove SERVICE_NODE
Quentin Young [Fri, 30 Mar 2018 20:29:51 +0000 (16:29 -0400)]
lib: remove SERVICE_NODE

Unused

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1984 from donaldsharp/conf_date_master
Russ White [Fri, 30 Mar 2018 16:35:53 +0000 (12:35 -0400)]
Merge pull request #1984 from donaldsharp/conf_date_master

lib: Remove backwards compatiblity at 1 year

6 years agodoc: add note on use of scripts to enable immediate removale deprecated APIs/macros
Lou Berger [Thu, 29 Mar 2018 22:50:30 +0000 (18:50 -0400)]
doc: add note on use of scripts to enable immediate removale deprecated APIs/macros

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #1921 from donaldsharp/pim_stuff
Lou Berger [Fri, 30 Mar 2018 16:03:33 +0000 (12:03 -0400)]
Merge pull request #1921 from donaldsharp/pim_stuff

Pim stuff

6 years agoMerge pull request #1997 from qlyoung/fix-doc-nits-03-30
Russ White [Fri, 30 Mar 2018 15:13:02 +0000 (11:13 -0400)]
Merge pull request #1997 from qlyoung/fix-doc-nits-03-30

doc: cleanup documentation nits

6 years agodoc: cleanup documentation nits
Quentin Young [Fri, 30 Mar 2018 15:09:15 +0000 (11:09 -0400)]
doc: cleanup documentation nits

* Ubuntu 18.04 build doc was not included in its toctree
* Duplicate definition of the same CLI command removed

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1966 from donaldsharp/vrf_late_to_the_party
Russ White [Fri, 30 Mar 2018 14:51:38 +0000 (10:51 -0400)]
Merge pull request #1966 from donaldsharp/vrf_late_to_the_party

zebra: Set table id *before* we enable the vrf

6 years agoMerge pull request #1978 from qlyoung/fix-debug-all-vtysh-node
Russ White [Fri, 30 Mar 2018 14:44:14 +0000 (10:44 -0400)]
Merge pull request #1978 from qlyoung/fix-debug-all-vtysh-node

vtysh: fix node install of `[no] debug all`

6 years agoMerge pull request #1980 from donaldsharp/tools_frr
Russ White [Fri, 30 Mar 2018 14:36:34 +0000 (10:36 -0400)]
Merge pull request #1980 from donaldsharp/tools_frr

tools: Cleanup shutdown

6 years agoMerge pull request #1987 from donaldsharp/zserv_read_fix
Russ White [Fri, 30 Mar 2018 13:37:51 +0000 (09:37 -0400)]
Merge pull request #1987 from donaldsharp/zserv_read_fix

two zebra changes

6 years agoMerge pull request #1990 from donaldsharp/bgp_v6_ifindex
Russ White [Fri, 30 Mar 2018 13:25:52 +0000 (09:25 -0400)]
Merge pull request #1990 from donaldsharp/bgp_v6_ifindex

bgpd: Only supply ifindex for a v6 nexthop if LL

6 years agoMerge pull request #1991 from chiragshah6/ospfv3_dev
Russ White [Fri, 30 Mar 2018 13:23:42 +0000 (09:23 -0400)]
Merge pull request #1991 from chiragshah6/ospfv3_dev

ospf6d: fix loop in ABRs

6 years agoMerge pull request #1817 from pguibert6WIND/flowspec_client
Vincent JARDIN [Fri, 30 Mar 2018 13:13:36 +0000 (15:13 +0200)]
Merge pull request #1817 from pguibert6WIND/flowspec_client

Flowspec client

6 years agoMerge pull request #1992 from qlyoung/change-alpine-build-doc-title
Russ White [Fri, 30 Mar 2018 12:51:44 +0000 (08:51 -0400)]
Merge pull request #1992 from qlyoung/change-alpine-build-doc-title

doc: change title of Alpine build doc

6 years agoMerge pull request #1955 from qlyoung/stylechecker
Olivier Dugeon [Fri, 30 Mar 2018 12:21:22 +0000 (13:21 +0100)]
Merge pull request #1955 from qlyoung/stylechecker

tools: do not check for kernel macros

6 years agoMerge pull request #1961 from qlyoung/docuser
Lou Berger [Fri, 30 Mar 2018 12:10:50 +0000 (08:10 -0400)]
Merge pull request #1961 from qlyoung/docuser

doc: tweak html body width

6 years agoMerge pull request #1959 from donaldsharp/route_map_doc
Lou Berger [Fri, 30 Mar 2018 12:10:06 +0000 (08:10 -0400)]
Merge pull request #1959 from donaldsharp/route_map_doc

Route map doc

6 years agobgpd: Flowspec display handlers uses snprintf
Philippe Guibert [Wed, 28 Mar 2018 12:35:56 +0000 (14:35 +0200)]
bgpd: Flowspec display handlers uses snprintf

snprintf routine is used widely, when the handler routine in charge of
displaying the output is called.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: mp_unreach_nlri fs sent with no nexthop
Philippe Guibert [Wed, 14 Mar 2018 09:33:40 +0000 (10:33 +0100)]
bgpd: mp_unreach_nlri fs sent with no nexthop

FS UNREACH message with 0 NLRI inside is sent after each peer
establishment. FS can send NLRI messages with no nexthop.
The commit fixes a message that is triggered by mistake
if FS was about to be sent, then that message is not output.
Also it fixes a typo.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: enhance show bgp ipv4 flowspec <IP>
Philippe Guibert [Thu, 15 Mar 2018 12:32:04 +0000 (13:32 +0100)]
bgpd: enhance show bgp ipv4 flowspec <IP>

This command gives detail about a FS entry which contains an IP that
matches one of the rules of the FS entry. The output is the same output
as when one does show bgp ipv4 flowspec detail

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: support for json in show bgp ipv4 flowspec commands
Philippe Guibert [Wed, 7 Mar 2018 17:54:09 +0000 (18:54 +0100)]
bgpd: support for json in show bgp ipv4 flowspec commands

The json format is returd when requested from the two commands:
- show bgp ipv4 flowspec
- show bgp ipv4 flowspec detail

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agovtysh: add flowspec address family cmd support
Philippe Guibert [Wed, 7 Mar 2018 09:02:45 +0000 (10:02 +0100)]
vtysh: add flowspec address family cmd support

add flowspec v4 and flowspec v6 address family support for BGP.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agotests: add flowspec test with BGP MP_REACH/UNREACH
Philippe Guibert [Tue, 6 Mar 2018 13:25:48 +0000 (14:25 +0100)]
tests: add flowspec test with BGP MP_REACH/UNREACH

This commit checks that the reception of MP_REACH and MP_UNREACH
flowspec is handled correctly.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: introduce [no] debug bgp flowspec
Philippe Guibert [Tue, 20 Feb 2018 09:58:42 +0000 (10:58 +0100)]
bgpd: introduce [no] debug bgp flowspec

It is possible to enhance debug bgp flowspec feature by using vty
command. This command, if enabled, will dump the match/set couple of
information received on NLRI.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: support for show bgp ipv4 flowspec
Philippe Guibert [Mon, 19 Feb 2018 16:17:41 +0000 (17:17 +0100)]
bgpd: support for show bgp ipv4 flowspec

The show bgp ipv4 flowspec routine is made available, displays the
flowspec rules contained in the BGP FIB database, as well as the actions
to be done on those rules. Two routines are available:
show bgp ipv4 flowspec
show bgp ipv4 flowspec detail

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: ecommunity show bgp ipv4 flowspec
Philippe Guibert [Mon, 15 Jan 2018 18:17:02 +0000 (19:17 +0100)]
bgpd: ecommunity show bgp ipv4 flowspec

ecommunity library is modified to return the flowspec ecommunities in
display format.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: use bgp flowspec API to validate and receive NLRI
Philippe Guibert [Thu, 1 Mar 2018 15:07:38 +0000 (16:07 +0100)]
bgpd: use bgp flowspec API to validate and receive NLRI

The changes introduce validation of NLRI FS entries at incoming, before
being pushed in FIB. Note that the so called validation only checks for
validity of the incoming flowspec nlri format, and not the validation as
per RFC5575.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: add flowspec utilities to decode, convert fs nlri
Philippe Guibert [Wed, 14 Feb 2018 10:13:50 +0000 (11:13 +0100)]
bgpd: add flowspec utilities to decode, convert fs nlri

The FS nlri is depicted so as to be able to be in readable format,
either by human, or by some other ( remote daemon ?).
This work is a derived work from [0]. Initially done for validation
only, this work is extended.
The FS NLRI is able to decode addresses, numbers ( protocols, ports,
tcp values) combined ( or not) with operators. This makes possible
to have a NLRI entry for a set of ports, and/or for an other set of
value of port.
This implementation mainly brings the API visible. The API should be
consistent across the various usages.

[0] https://github.com/chinatelecom-sdn-group/quagga_flowspec/

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: jaydom <chinatelecom-sdn-group@github.com>
6 years agobgpd: disable aggregation for flowspec entries
Philippe Guibert [Thu, 1 Mar 2018 14:24:39 +0000 (15:24 +0100)]
bgpd: disable aggregation for flowspec entries

Flowspec entries do not need aggregation feature.
Actually, all flowspec entries are unique.
So, some check is done against aggregate functionalities in the code.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: add flowspec feature
jaydom [Mon, 23 Jan 2017 02:45:30 +0000 (10:45 +0800)]
bgpd: add flowspec feature

This work is derived from a work done by China-Telecom.
That initial work can be found in [0].
As the gap between frr and quagga is important, a reworks has been
done in the meantime.
The initial work consists of bringing the following:
- Bringing the client side of flowspec.
- the enhancement of address-family ipv4/ipv6 flowspec
- partial data path handling at reception has been prepared
- the support for ipv4 flowspec or ipv6 flowspec in BGP open messages,
  and the internals of BGP has been done.
- the memory contexts necessary for flowspec has been provisioned

In addition to this work, the following has been done:
- the complement of adaptation for FS safi in bgp code
- the code checkstyle has been reworked so as to match frr checkstyle
- the processing of IPv6 FS NLRI is prevented
- the processing of FS NLRI is stopped ( temporary)

[0] https://github.com/chinatelecom-sdn-group/quagga_flowspec/

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: jaydom <chinatelecom-sdn-group@github.com>
6 years agolib: prefix support for flowspec
Philippe Guibert [Wed, 10 Jan 2018 18:13:27 +0000 (19:13 +0100)]
lib: prefix support for flowspec

prefix structure is used to handle flowspec prefixes. A new AFI is
introduced: AF_FLOWSPEC. A sub structure named flowspec_prefix is
used in prefix to host the flowspec entry.
Reason to introduce that new kind is that prefixlen from prefix
structure is too short to all the flowspec needs, since NLRI can go over
0xff bytes.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agotools: add fixup-deprecated.py script to replace deprecated quagga/frr mactors/types...
Lou Berger [Thu, 29 Mar 2018 21:01:33 +0000 (17:01 -0400)]
tools: add fixup-deprecated.py script to replace deprecated quagga/frr mactors/types/etc.

       Initial deprecated macros are:
   #define VNL
   #define VTYNL
   #define VTY_NEWLINE
   #define VTY_GET_INTEGER(desc, v, str)
   #define VTY_GET_INTEGER_RANGE(desc, v, str, min, max)
   #define VTY_GET_ULONG(desc, v, str)
   #define VTY_GET_ULL(desc, v, str)
   #define VTY_GET_IPV4_ADDRESS(desc, v, str)
   #define VTY_GET_IPV4_PREFIX(desc, v, str)
   #define vty_outln(vty, str, ...)

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agodoc: change title of Alpine build doc
Quentin Young [Thu, 29 Mar 2018 18:29:08 +0000 (14:29 -0400)]
doc: change title of Alpine build doc

Match the rest of them.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoospf6d: fix loop in ABRs
Chirag Shah [Tue, 27 Mar 2018 22:28:14 +0000 (15:28 -0700)]
ospf6d: fix loop in ABRs

When two routers from same area connected to backbone,
intra route advertised from area x should take precedence
within area x. The same route would be injected as summary
lsa to area 0/y. The same LSA via second abr injected back to
area x and since area 0 is lower than area x its route take
precedence.
Move the area check below path type and cost as both are crucial
to determine best route.

Ticket:CM-19627
Testing Done:
Initial route generated via area 1 as Intra-Prefix LSA (2009).
R1 and R2 both re advertised Inter Area Prefix LSA
(Summary LSA 2003) to area 1.
With the change area 1 Intra route precedence is preserved.
The address of H1 from Right is reachable via ping.

     area 1 |  area 0
            R1
          /   \
         /     \
        /       \
  H1 --Left     Right
        \       /
         \     /
          \   /
            R2
     area 1 |  area 0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #1985 from sfionov/fpm_pb_optional_scalar
Donald Sharp [Thu, 29 Mar 2018 17:07:55 +0000 (13:07 -0400)]
Merge pull request #1985 from sfionov/fpm_pb_optional_scalar

zebra: Set "has" flags on optional scalar fields of FPM protobuf messages

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 #1824 from pguibert6WIND/table_manager
Donald Sharp [Thu, 29 Mar 2018 16:09:15 +0000 (12:09 -0400)]
Merge pull request #1824 from pguibert6WIND/table_manager

Table manager for zebra

6 years agobgpd: Only supply ifindex for a v6 nexthop if LL
Donald Sharp [Thu, 29 Mar 2018 15:43:49 +0000 (11:43 -0400)]
bgpd: Only supply ifindex for a v6 nexthop if LL

BGP is calculating a v6 routes nexthop as the nexthop address
+ an ifindex.  The ifindex calculated comes from where we received
the route from as that we have to do this for LL addresses.

But a v6 address that is not a LL we do not need to provide
to zebra for nexthop resolution because a global address
by default can be looked up and resolved appropriately.

Modify the code so that we must have an ifindex for a v6 nexthop
if the address is LL, else don't pass the ifindex down to zebra.

Fixes: #1986
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add table and nexthop vrf information to netlink debug
Donald Sharp [Thu, 29 Mar 2018 12:58:45 +0000 (08:58 -0400)]
zebra: Add table and nexthop vrf information to netlink debug

Add some additional debug information to the netlink debug
messages so we can see the table we are installing to as
well as the nexthop's vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Subtract header length in the right spot
Donald Sharp [Thu, 29 Mar 2018 12:52:39 +0000 (08:52 -0400)]
zebra: Subtract header length in the right spot

The header length needs to be subtracted from the handling
side of the zapi in zebra.  This is because we refigure the
header data structure.  The receive side doesn't care
about the total header length so no need to subtract there.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: add API to allocate a range of table identifiers
Philippe Guibert [Mon, 5 Mar 2018 17:09:57 +0000 (18:09 +0100)]
bgpd: add API to allocate a range of table identifiers

In BGP, doing policy-routing  requires to use table identifiers.
Flowspec protocol will need to have that. 1 API from bgp zebra has been
done to get the table chunk.
Internally, onec flowspec is enabled, the BGP engine will try to
connect smoothly to the table manager. If zebra is not connected, it
will try to connect 10 seconds later. If zebra is connected, and it is
success, then a polling mechanism each 60 seconds is put in place. All
the internal mechanism has no impact on the BGP process.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: add the handling of table ids from remote daemons
Philippe Guibert [Mon, 5 Mar 2018 17:07:23 +0000 (18:07 +0100)]
zebra: add the handling of table ids from remote daemons

This commit is connecting the table manager with remote daemons by
handling the queries.
As the function is similar in many points with label allocator, a
function has been renamed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: add table manager files
Philippe Guibert [Mon, 5 Mar 2018 17:03:38 +0000 (18:03 +0100)]
zebra: add table manager files

The range is given from table manager from zebra daemon.
There are 2 ranges available for table identifier:
- [1;252] and [256;0xffffffff]
If the wished size enters in the first range, then the start and end
range of table identifier is given within the first range.
Otherwise, the second range is given, and an appropriate range is given.

Note that for now, the case of the VRF table identifier used is not
taken into account. Meaning that there may be overlapping. There are two
cases to handle:
- case a vrf lite is allocated after the zebra and various other daemons
  started.
- case a vrf lite is initialised and the daemons then start

The second case is easy to handle. For the former case, I am not so
sure.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agolib: add framework for allocating routing table identifier IDs
Philippe Guibert [Mon, 5 Mar 2018 16:57:29 +0000 (17:57 +0100)]
lib: add framework for allocating routing table identifier IDs

The library changes add 3 new messages to exchange between daemons and
ZEBRA.
- ZEBRA_TABLE_MANAGER_CONNECT,
- ZEBRA_GET_TABLE_CHUNK,
- ZEBRA_RELEASE_TABLE_CHUNK,
the need is that routing tables identifier are shared by various
services. For the current case, policy routing enhancements are planned
to be used in FRR. Poliy routing relies on routing tables identifiers
from kernels. It will be mainly used by the future policy based routing
daemon, but not only. In the flowspec case, the BGP will need also to
inject policy routing information into specific routing tables.
For that, the proposal is made to let zebra give the appropriate range
that is needed for all daemons.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agolib: Remove backwards compatiblity at 1 year
Donald Sharp [Wed, 28 Mar 2018 20:18:16 +0000 (16:18 -0400)]
lib: Remove backwards compatiblity at 1 year

These macro's have existed for 1 year now and can be removed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: Cleanup a couple of issues in the bgp doc
Donald Sharp [Fri, 23 Mar 2018 00:46:22 +0000 (20:46 -0400)]
doc: Cleanup a couple of issues in the bgp doc

Add the documentation for 'remote-as [internal|external]`
Cleanup some old obsolete information
Specify that interfaces can be used as a peer in bgp

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: Update some bgp set nexthop documentation
Donald Sharp [Fri, 23 Mar 2018 00:37:26 +0000 (20:37 -0400)]
doc: Update some bgp set nexthop documentation

Update the BGP route-map 'set ip next-hop' documentation
to include some missing data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agotools: Cleanup shutdown
Donald Sharp [Wed, 28 Mar 2018 18:52:55 +0000 (14:52 -0400)]
tools: Cleanup shutdown

The shutdown code was sometimes taking 1 minute to run because
the ssd program was misbehaving after a make install.

This commit just removes the usage of ssd for shutdown
since we already have a pid file and we know that the
frr script cleans up the pid file as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agovtysh: fix node install of `[no] debug all`
Quentin Young [Wed, 28 Mar 2018 14:57:52 +0000 (10:57 -0400)]
vtysh: fix node install of `[no] debug all`

Command belongs in ENABLE_NODE, not VIEW_NODE.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.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 agoMerge branch 'master' into stylechecker
Quentin Young [Tue, 27 Mar 2018 19:21:15 +0000 (15:21 -0400)]
Merge branch 'master' into stylechecker

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 agodeveloper: workflow.rst - fix typo
Lou Berger [Tue, 27 Mar 2018 12:11:48 +0000 (08:11 -0400)]
developer: workflow.rst - fix typo

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agodeveloper: workflow.rst - add text on how to respond to reviews/comments
Lou Berger [Tue, 27 Mar 2018 12:08:15 +0000 (08:08 -0400)]
developer: workflow.rst - add text on how to respond to reviews/comments
   add note that author's shouldn't remove a comment or review.
           also add a note that automatically generated comments can
           be deleted by authors and others when such comments are not
           the most results from that automated comment source.

Signed-off-by: Lou Berger <lberger@labn.net>
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 agozebra: Set table id *before* we enable the vrf
Donald Sharp [Sun, 25 Mar 2018 23:35:27 +0000 (19:35 -0400)]
zebra: Set table id *before* we enable the vrf

The table id of the vrf is being given to us as part
of the vrf creation netlink callback.  Unfortunately it
was being set in the zvrf *after* the vrf_enable callback.

This didn't used to matter until we started having config data
stored on the side that we needed to act on when the vrf
came up enough to start working.

So when we were storing static routes and installing them
they were being pushed into the default table for non-default
vrf's.

Ticket: CM-19141
Signed-off-by: Donald Sharp <sharpd@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 agodoc: tweak html body width
Quentin Young [Fri, 23 Mar 2018 17:20:43 +0000 (13:20 -0400)]
doc: tweak html body width

The default theme has a css rule that limits the body element width to
800px, which results in sizeable chunk of empty space to the right of
the docs. Add a small css override to remove this limit (like the Python
docs do).

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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 agotools: do not check for kernel macros
Quentin Young [Thu, 22 Mar 2018 16:11:05 +0000 (12:11 -0400)]
tools: do not check for kernel macros

Certain things checked for by checkpatch.pl are kernel-specific macros
we don't have.

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