]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agobgpd: introduction of vxlan tunnel attribute
Philippe Guibert [Wed, 10 Aug 2016 08:46:53 +0000 (10:46 +0200)]
bgpd: introduction of vxlan tunnel attribute

As per draft-ietf-idr-tunnel-encaps-02, section 3.2.1, BGP Encap
attribute supports vxlan tunnel type. A new tunnel attribute has been
appended to subtlv list, describing the vxlan network identifier to
be used for the routing information of the BGP update message.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agotests: update ecommunity_ecom2str call api
Philippe Guibert [Fri, 7 Oct 2016 16:26:33 +0000 (18:26 +0200)]
tests: update ecommunity_ecom2str call api

Test adaptation using updated API, introducing new ecommunity type.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: support for router mac extended community
Philippe Guibert [Tue, 9 Aug 2016 08:47:03 +0000 (10:47 +0200)]
bgpd: support for router mac extended community

As per draft-ietf-bess-evpn-inter-subnet-forwarding-01, chapter 6.1,
a new extended community called router's MAC Extended Community is
provided. This community is appended to extended community list.
Note that a show API has been changed in order to be able to not
display (or not) this new type.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: enhance reception of bgp ext. community default gateway
Philippe Guibert [Thu, 6 Oct 2016 13:46:45 +0000 (15:46 +0200)]
bgpd: enhance reception of bgp ext. community default gateway

This fix permits processing of default gateway extended
community if present. This option, if router mac option is not
present, will replace it.
Also, when exporting route entry to VRF RIB, if VRF is layer 2
type, then the ecommunity related to mac address and router mac
are stripped.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: add support for evpn subnode by using afi/safi parameter
Philippe Guibert [Tue, 17 Jan 2017 21:41:06 +0000 (22:41 +0100)]
bgpd: add support for evpn subnode by using afi/safi parameter

Added the possibility to enter in evpn address-family in bgp node, by
using 'address-family l2vpn evpn' command.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: add define of compilation for EVPN in prefix.c
Philippe Guibert [Tue, 17 Jan 2017 21:21:40 +0000 (22:21 +0100)]
lib: add define of compilation for EVPN in prefix.c

Because the prefix structure may include or not evpn sub structure, then
HAVE_EVPN compilation define is also used in prefix.c, because it
references the sub field evpn of prefix structure.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: evpn NLRI route type 5 forging
Philippe Guibert [Mon, 5 Sep 2016 12:19:40 +0000 (14:19 +0200)]
bgpd: evpn NLRI route type 5 forging

This patch introduces the ability to make route type 5 message
when EVPN is enabled. Picked up paramters are collected from the
bgp extra attribute structure and are the ESI, the ethernet tag
information. In addition to this, nexthop attribute is collected too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: evpn RT-5 bgp update carries nexthop attribute
Philippe Guibert [Mon, 5 Sep 2016 13:54:49 +0000 (15:54 +0200)]
bgpd: evpn RT-5 bgp update carries nexthop attribute

This patch appends nexthop attribute to EVPN message, in addition
to appending gateway IP in RT-5 NLRI itself. In reception, if
both informations are stored, then the GW IP information will
supersede the NLRI nexthop attribute.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: route type 5 internal structures plus processing
Philippe Guibert [Mon, 5 Sep 2016 12:07:01 +0000 (14:07 +0200)]
bgpd: route type 5 internal structures plus processing

The commit introduces the changes to be done to carry route type 5 EVPN
information in bgp extra attribute information. The commit also handles
the update processing for route type 5 information, including ESI,
gatewayIP and label information.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: Update logging for EVPN prefixes
vivek [Tue, 9 Aug 2016 23:02:03 +0000 (16:02 -0700)]
bgpd: Update logging for EVPN prefixes

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Ticket: CM-12262
Reviewed By: CCR-5065
Testing Done: Manual

7 years agolib: Enhance prefix dump for EVPN prefixes
vivek [Tue, 9 Aug 2016 22:55:51 +0000 (15:55 -0700)]
lib: Enhance prefix dump for EVPN prefixes

This commit is also taking into account changes related to srcdes
feature introduction in zebra folder.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Ticket: CM-12262
Reviewed By: CCR-5065
Testing Done: Manual

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: Functions related to AF_ETHERNET
vivek [Tue, 2 Aug 2016 18:51:35 +0000 (11:51 -0700)]
lib: Functions related to AF_ETHERNET

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
7 years agotests: update bgp_nlri_parse function usage in bgp testing
Philippe Guibert [Mon, 23 Jan 2017 13:42:02 +0000 (14:42 +0100)]
tests: update bgp_nlri_parse function usage in bgp testing

Because the bgp_nlri_parse function has been extended with one parameter,
when doing bgp testing against some packets, the correct call to
bgp_nlri_parse must be done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: handling EVPN Route Type 5 NLRI message
Philippe Guibert [Mon, 5 Sep 2016 09:07:25 +0000 (11:07 +0200)]
bgpd: handling EVPN Route Type 5 NLRI message

This patch introduces code to receive a NLRI message with route type
5, as defined in draft-ietf-bess-evpn-prefix-advertisement-02. It
It increases the number of parameters to extract from the NLRI and
to store into bgp extra information structure. Those parameters are
the ESI (ethernet segment identifier), the gateway IP Address (which
acts like nexthop attribute but is contained inside the NLRI itself)
and the ethernet tag identifier ( that acts for the VXLan Identifier)
This patch updates bgp_update() and bgp_withdraw() api, and then does the
necessary adapations for rfapi.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: enhance structures and esi and mac functions to handle EVPN
Philippe Guibert [Wed, 26 Oct 2016 10:21:53 +0000 (12:21 +0200)]
bgpd: enhance structures and esi and mac functions to handle EVPN

EVPN introduces new objects to be handled: Ethernet Segment Identifier,
and MAC Address.
For Route type 5 message, it also involves gateway IP field that can be
either IPv4 or IPv6 address. This commit introduces those main structures.
It also introduces some functions to convert esi and mac address to
string, and vice-versa.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: add support for epvn into afindex
Philippe Guibert [Fri, 20 Jan 2017 16:13:24 +0000 (17:13 +0100)]
bgpd: add support for epvn into afindex

afindex needs knowledge of l2vpn afi parameter, as well as evpn safi
parameter.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
7 years agobgpd: basic support for EVPN
Philippe Guibert [Mon, 5 Sep 2016 08:53:51 +0000 (10:53 +0200)]
bgpd: basic support for EVPN

To handle BGP NLRI EVPN messages, bgp is modified to handle AFI_L2VPN
and SAFI_EVPN values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: basic vty support for EVPN
Philippe Guibert [Mon, 5 Sep 2016 08:54:06 +0000 (10:54 +0200)]
bgpd: basic vty support for EVPN

Introduction of EVPN address-family node that is reachable under
BGP node, like follow: address-family evpn. Under that node, only
some commands are available for configuring a neighbor or setting
some basic settings like attribute unchanged behaviour. Currently,
no vty command is available for setting NLRI entries for EVPN.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agovtysh: add support for bgp evpn address-family
Philippe Guibert [Wed, 4 Jan 2017 14:47:00 +0000 (15:47 +0100)]
vtysh: add support for bgp evpn address-family

Add support for evpn address-family on vty shell.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: define BGP_EVPN_NODE
Philippe Guibert [Wed, 4 Jan 2017 14:45:54 +0000 (15:45 +0100)]
lib: define BGP_EVPN_NODE

This define introduces bgp sub node address-family evpn.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: afi_ether structure packing fix
Philippe Guibert [Thu, 27 Oct 2016 08:24:44 +0000 (10:24 +0200)]
lib: afi_ether structure packing fix

'packed' keyword had no effect on packing the afi_ethernet structure.
The attribute keyword has been eppended in order to take into account
the packed feature.

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
7 years agolib: add prefix support for evpn route type 5
Philippe Guibert [Thu, 12 Jan 2017 09:14:18 +0000 (10:14 +0100)]
lib: add prefix support for evpn route type 5

The requirement from draft-ietf-bess-evpn-prefix-advertisement-03
mentions that the Eth-Tag ID, IP Prefix Length and IP Prefix will be
part of the route key used by BGP. The ip prefix length is then appended
to the evpn_addr. In addition to this, the ethernet tag ID is reused.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: EVPN prefix definition
vivek [Wed, 27 Jul 2016 17:20:47 +0000 (10:20 -0700)]
lib: EVPN prefix definition

Extend the prefix data structure to allow for basic support for EVPN type-3
and type-2 routes.

Note: This may be revised in future.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-11937
Reviewed By: CCR-5001
Testing Done: None

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: add AFI_L2VPN and SAFI_EVPN
Philippe Guibert [Mon, 5 Dec 2016 13:11:07 +0000 (14:11 +0100)]
lib: add AFI_L2VPN and SAFI_EVPN

To support EVPN, a new AFI and SAFI value are defined here.
For internal processing, two other values are used. Those values will
be used to reach RIB entries by using internal afi and safi values
as indexes. This commit is using naming convention for using EVPN.
External value exchanged in BGP packets  is called of with
IANA_ presence in macro, while internal value will not have _IANA_
presence.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agoconfigure: add enable-evpn support
Philippe Guibert [Thu, 12 Jan 2017 10:04:06 +0000 (11:04 +0100)]
configure: add enable-evpn support

By default, EVPN is disabled by default. In order to support it, the
configure command has been made available in order to introduce a define
that is used for compilation.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agoMerge pull request #204 from opensourcerouting/ospfclient-link
Donald Sharp [Tue, 14 Feb 2017 02:40:18 +0000 (21:40 -0500)]
Merge pull request #204 from opensourcerouting/ospfclient-link

ospfclient: fix gcc -O0 build

7 years agoospfclient: fix gcc -O0 build
David Lamparter [Tue, 14 Feb 2017 02:31:26 +0000 (03:31 +0100)]
ospfclient: fix gcc -O0 build

the "static const" inside DECLARE_MTYPE still causes issues on gcc -O0
(re. gcc bug 69981).  Work around by disabling MTYPE declarations for
ospfclient.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #195 from opensourcerouting/cli_merge
Donald Sharp [Sat, 11 Feb 2017 12:00:00 +0000 (07:00 -0500)]
Merge pull request #195 from opensourcerouting/cli_merge

CLI: independent merge step

7 years agoMerge pull request #197 from opensourcerouting/pytest_workdir
Donald Sharp [Sat, 11 Feb 2017 11:59:07 +0000 (06:59 -0500)]
Merge pull request #197 from opensourcerouting/pytest_workdir

tests: fix out-of-tree build

7 years agotests: fix out-of-tree build
David Lamparter [Sat, 11 Feb 2017 00:03:57 +0000 (01:03 +0100)]
tests: fix out-of-tree build

Fix pytest with $(top_srcdir) != "."

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agovtysh: make -c useful with -C (dryrun)
David Lamparter [Fri, 10 Feb 2017 16:15:36 +0000 (17:15 +0100)]
vtysh: make -c useful with -C (dryrun)

-c was previously ignored when -C (dryrun/config-check) was present.
Change so that -C -c creates an useful dry-run mode.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agogrammar_sandbox: count ambiguous commands
David Lamparter [Fri, 10 Feb 2017 16:14:50 +0000 (17:14 +0100)]
grammar_sandbox: count ambiguous commands

... and make the return value useful (for vtysh)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #194 from opensourcerouting/coverity-lib-2
Donald Sharp [Fri, 10 Feb 2017 16:06:37 +0000 (11:06 -0500)]
Merge pull request #194 from opensourcerouting/coverity-lib-2

more lib/ coverity fixes

7 years ago*: fix ambiguous commands
David Lamparter [Fri, 10 Feb 2017 15:56:10 +0000 (16:56 +0100)]
*: fix ambiguous commands

Some "show [ip] bgp ipv4 encap ..." commands remaining ambiguous.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agogrammar_sandbox: add ambiguous-command finder
David Lamparter [Fri, 10 Feb 2017 15:43:17 +0000 (16:43 +0100)]
grammar_sandbox: add ambiguous-command finder

Best run in vtysh.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: track name of command in cmd_element
David Lamparter [Fri, 10 Feb 2017 15:42:49 +0000 (16:42 +0100)]
lib: track name of command in cmd_element

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agotests: add uninstall_element in testcli
David Lamparter [Wed, 25 Jan 2017 03:14:07 +0000 (04:14 +0100)]
tests: add uninstall_element in testcli

Test uninstall_element().  The commandline-specified counter allows
isolating memleaks more closely, differentiating one-off vs. repeated
leaks.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: parser: rewrite token deduplication
David Lamparter [Fri, 16 Dec 2016 22:27:39 +0000 (23:27 +0100)]
lib: parser: rewrite token deduplication

Merge the parsed graph into the existing one as a separate step.  This
makes it possible to merge identical subgraphs, which is used e.g. in
bgpd for <A.B.C.D|X:X::X:X|WORD> neighbor names.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: rework vty_use_backup_config()
David Lamparter [Fri, 10 Feb 2017 14:04:40 +0000 (15:04 +0100)]
lib: rework vty_use_backup_config()

Like config_write(), this should use rename(), even though atomicity is
not a real issue here.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: fix remaining coverity issues
David Lamparter [Fri, 10 Feb 2017 14:04:06 +0000 (15:04 +0100)]
lib: fix remaining coverity issues

Reported-by: Coverity
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: parser: remove previous deduplication code
David Lamparter [Fri, 16 Dec 2016 21:36:21 +0000 (22:36 +0100)]
lib: parser: remove previous deduplication code

Rewritten in next commit.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #192 from donaldsharp/snmp1
David Lamparter [Fri, 10 Feb 2017 12:12:45 +0000 (13:12 +0100)]
Merge pull request #192 from donaldsharp/snmp1

debian: Fix to not auto-install snmp MIB

7 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Thu, 9 Feb 2017 17:13:49 +0000 (12:13 -0500)]
Merge remote-tracking branch 'origin/stable/2.0'

7 years agoMerge pull request #191 from opensourcerouting/ospfclient-incl
Donald Sharp [Thu, 9 Feb 2017 17:12:17 +0000 (12:12 -0500)]
Merge pull request #191 from opensourcerouting/ospfclient-incl

[stable] ospfclient: #include sources

7 years agodebian: Fix to not auto-install snmp MIB
Donald Sharp [Thu, 9 Feb 2017 15:37:00 +0000 (10:37 -0500)]
debian: Fix to not auto-install snmp MIB

Only install the snmp MIB for zebra if we
are building the debian package with SNMP.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospfclient: #include sources
David Lamparter [Thu, 9 Feb 2017 11:59:44 +0000 (12:59 +0100)]
ospfclient: #include sources

Pulling in source files from another directory breaks automake's
distclean target, and there seems to be no good fix for this...
(particularly since we need -fPIC build for a DSO here, while ospfd
compiles for an executable...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Thu, 9 Feb 2017 14:53:46 +0000 (09:53 -0500)]
Merge remote-tracking branch 'origin/stable/2.0'

7 years agoMerge pull request #189 from opensourcerouting/config-write-sync
Donald Sharp [Thu, 9 Feb 2017 14:52:58 +0000 (09:52 -0500)]
Merge pull request #189 from opensourcerouting/config-write-sync

lib: use fsync() for config writes, plug fd leak

7 years agoMerge pull request #164 from opensourcerouting/pytest2
Donald Sharp [Thu, 9 Feb 2017 14:38:37 +0000 (09:38 -0500)]
Merge pull request #164 from opensourcerouting/pytest2

Rework test runners to use pytest

7 years agoMerge pull request #190 from opensourcerouting/config-write-sync-stable
Donald Sharp [Thu, 9 Feb 2017 14:26:58 +0000 (09:26 -0500)]
Merge pull request #190 from opensourcerouting/config-write-sync-stable

[stable] lib: use fsync() for config writes, plug fd leak

7 years agolib: use fsync() for config writes, plug fd leak
David Lamparter [Wed, 8 Feb 2017 15:14:10 +0000 (16:14 +0100)]
lib: use fsync() for config writes, plug fd leak

sync() has a HUGE impact on systems that perform actual I/O, i.e. real
servers...

Also, we were leaking a fd on each config write ever since
c5e69a0 "lib/vty: add separate output fd support to VTYs"
(by myself :( ...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/186' (pimd register length)
David Lamparter [Thu, 9 Feb 2017 12:46:44 +0000 (13:46 +0100)]
Merge branch 'frr/pull/186' (pimd register length)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: use fsync() for config writes, plug fd leak
David Lamparter [Wed, 8 Feb 2017 15:14:10 +0000 (16:14 +0100)]
lib: use fsync() for config writes, plug fd leak

sync() has a HUGE impact on systems that perform actual I/O, i.e. real
servers...

Also, we were leaking a fd on each config write ever since
c5e69a0 "lib/vty: add separate output fd support to VTYs"
(by myself :( ...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #185 from opensourcerouting/coverity-lib-1
Donald Sharp [Wed, 8 Feb 2017 18:44:53 +0000 (13:44 -0500)]
Merge pull request #185 from opensourcerouting/coverity-lib-1

Coverity foo

7 years agotests: add pytest testrunners
Christian Franke [Fri, 3 Feb 2017 15:58:58 +0000 (16:58 +0100)]
tests: add pytest testrunners

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agotests: reorganize tests hierarchically
Christian Franke [Fri, 3 Feb 2017 15:58:11 +0000 (16:58 +0100)]
tests: reorganize tests hierarchically

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agotests: remove dejagnu
Christian Franke [Fri, 3 Feb 2017 15:53:47 +0000 (16:53 +0100)]
tests: remove dejagnu

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agolib: csv: plug memleaks
David Lamparter [Wed, 8 Feb 2017 14:28:01 +0000 (15:28 +0100)]
lib: csv: plug memleaks

Reported-by: Coverity Scan
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: fix some coverity NULL check warnings
David Lamparter [Wed, 8 Feb 2017 14:14:23 +0000 (15:14 +0100)]
lib: fix some coverity NULL check warnings

Reported-by: Coverity Scan
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: remove unused str2in6_addr()
David Lamparter [Wed, 8 Feb 2017 14:19:09 +0000 (15:19 +0100)]
lib: remove unused str2in6_addr()

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: remove unused cmd_concat_strvec()
David Lamparter [Wed, 8 Feb 2017 14:13:58 +0000 (15:13 +0100)]
lib: remove unused cmd_concat_strvec()

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #182 from opensourcerouting/ldpd-coverity-scan
Donald Sharp [Wed, 8 Feb 2017 15:25:27 +0000 (10:25 -0500)]
Merge pull request #182 from opensourcerouting/ldpd-coverity-scan

ldpd: fix issues reported by coverity scan

7 years agoMerge pull request #181 from opensourcerouting/zebra-static-uninstall-mpls
Donald Sharp [Wed, 8 Feb 2017 15:25:11 +0000 (10:25 -0500)]
Merge pull request #181 from opensourcerouting/zebra-static-uninstall-mpls

zebra: fix uninstallation of LDP labeled static routes

7 years agoMerge branch 'frr/pull/183' ("Coverity")
David Lamparter [Wed, 8 Feb 2017 15:23:57 +0000 (16:23 +0100)]
Merge branch 'frr/pull/183' ("Coverity")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agopimd: Send proper length register packets
Donald Sharp [Tue, 7 Feb 2017 23:34:38 +0000 (18:34 -0500)]
pimd: Send proper length register packets

PIM Register packets are 20 bytes too long.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge branch 'master' of https://github.com/freerangerouting/frr into coverity
Donald Sharp [Wed, 8 Feb 2017 14:35:57 +0000 (09:35 -0500)]
Merge branch 'master' of https://github.com/freerangerouting/frr into coverity

7 years agobgpd: Fix miss-indented code.
Donald Sharp [Wed, 8 Feb 2017 14:35:33 +0000 (09:35 -0500)]
bgpd: Fix miss-indented code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge branch 'frr/pull/180' ("Warnings")
David Lamparter [Wed, 8 Feb 2017 14:31:24 +0000 (15:31 +0100)]
Merge branch 'frr/pull/180' ("Warnings")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agozebra: Don't leak socket with failure condition
Donald Sharp [Wed, 8 Feb 2017 13:26:07 +0000 (08:26 -0500)]
zebra: Don't leak socket with failure condition

Don't leak a socket when we are unable to set it
as non-blocking and warn the user as appropriate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoldpd: fix issues reported by coverity scan
Renato Westphal [Wed, 8 Feb 2017 13:21:13 +0000 (11:21 -0200)]
ldpd: fix issues reported by coverity scan

Fix two small memleaks in the CLI code and check the return values of
getsockname() and getpeername().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: fix uninstallation of LDP labeled static routes
Renato Westphal [Tue, 7 Feb 2017 13:42:01 +0000 (11:42 -0200)]
zebra: fix uninstallation of LDP labeled static routes

Problem:
1 - Add a static route: "ip route 10.0.0.0/24 172.16.1.1";
2 - Receive an LDP mapping for 10.0.0.0/24 from 172.16.1.1;
3 - Remove the static route: "no ip route 10.0.0.0/24 172.16.1.1".
4 - Static route is removed but not uninstalled from the kernel.

What happens is that, on static_uninstall_route(), we can't find the
route we want to uninstall because it has an LDP label where the original
static route doesn't have any MPLS label.

To fix this, we can just stop calling static_nexthop_label_same() and
remove this function. It's impossible to have two routes for the same
prefix with the same distance and same nexthop address. This means that
we can lookup the correct route to uninstall without having to check
its labels.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #179 from donaldsharp/more_quagga_fixups
Lou Berger [Wed, 8 Feb 2017 01:46:44 +0000 (20:46 -0500)]
Merge pull request #179 from donaldsharp/more_quagga_fixups

*: Found some instances of Quagga.conf

7 years agopimd: Cleanup dest buffer to small
Donald Sharp [Tue, 7 Feb 2017 20:08:56 +0000 (15:08 -0500)]
pimd: Cleanup dest buffer to small

Cleanup the in_ifname and out_ifname buffers
to be large enough to hold the actual interface
names.

Additionally move the common variables to be defined
once, instead of inside of multiple for loops

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Fix usage of uninitialized dn_flag[]
Donald Sharp [Tue, 7 Feb 2017 19:55:39 +0000 (14:55 -0500)]
bgpd: Fix usage of uninitialized dn_flag[]

dn_flag was tested inside of a 'use_json' block
further down in the function.  Move initialization
of the value to outside of the !use_json if statement

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Fix passage of uninitialized value to skiplist_next
Donald Sharp [Tue, 7 Feb 2017 19:48:45 +0000 (14:48 -0500)]
bgpd: Fix passage of uninitialized value to skiplist_next

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Fix uninitialized data
Donald Sharp [Tue, 7 Feb 2017 19:34:37 +0000 (14:34 -0500)]
bgpd: Fix uninitialized data

Calling zapi_ipv[4|6]_route assumes we
set the instance appropriately.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agotests: Fix warning in compile
Donald Sharp [Tue, 7 Feb 2017 19:14:17 +0000 (14:14 -0500)]
tests: Fix warning in compile

Fix bgp_mp_attr_test.c warning in compile
on fedora 25 and clang.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Fix warning -> error build issue
Donald Sharp [Tue, 7 Feb 2017 18:55:55 +0000 (13:55 -0500)]
lib: Fix warning -> error build issue

When compiling ./buildtest.sh the gcc compiler
on fedora 25 complains about indentation

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years ago*: Found some instances of Quagga.conf
Donald Sharp [Tue, 7 Feb 2017 18:44:09 +0000 (13:44 -0500)]
*: Found some instances of Quagga.conf

Cleanup Quagga.conf -> Frr.conf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Tue, 7 Feb 2017 18:20:12 +0000 (13:20 -0500)]
Merge remote-tracking branch 'origin/stable/2.0'

7 years agoMerge pull request #176 from opensourcerouting/mtype-underflow-backtrace
Donald Sharp [Tue, 7 Feb 2017 18:04:27 +0000 (13:04 -0500)]
Merge pull request #176 from opensourcerouting/mtype-underflow-backtrace

lib: print backtrace on MTYPE count underflow

7 years agoMerge pull request #178 from opensourcerouting/ospf_lib_private
Donald Sharp [Tue, 7 Feb 2017 18:04:13 +0000 (13:04 -0500)]
Merge pull request #178 from opensourcerouting/ospf_lib_private

make libfrrospf private

7 years agoMerge pull request #174 from LabNConsulting/working/master/patch-set/issue-172
David Lamparter [Tue, 7 Feb 2017 16:27:58 +0000 (17:27 +0100)]
Merge pull request #174 from LabNConsulting/working/master/patch-set/issue-172

master: Fix encap attribute on wire, protect against broken object.

7 years agoMerge pull request #173 from LabNConsulting/working/2.0/patch-set/issue-172
David Lamparter [Tue, 7 Feb 2017 16:27:44 +0000 (17:27 +0100)]
Merge pull request #173 from LabNConsulting/working/2.0/patch-set/issue-172

2.0: Fix encap attribute on wire, protect against broken object.

7 years agoospfd: make libfrrospf a private non-dynamic lib
David Lamparter [Tue, 24 Jan 2017 22:26:20 +0000 (23:26 +0100)]
ospfd: make libfrrospf a private non-dynamic lib

There's no point in installing libospf anymore, now that
libfrrospfclient doesn't link it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospfd: isolate ospfapiclient lib from ospf lib
David Lamparter [Tue, 24 Jan 2017 20:35:08 +0000 (21:35 +0100)]
ospfd: isolate ospfapiclient lib from ospf lib

The OSPF API-client library doesn't really use anything from libospf
except some small dumping tools.  Isolate these into a separate file
and detangle the ospfapiclient library.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #161 from donaldsharp/stableMcLibrary
David Lamparter [Tue, 7 Feb 2017 16:17:12 +0000 (17:17 +0100)]
Merge pull request #161 from donaldsharp/stableMcLibrary

Stable mc library

7 years agobgpd: Allow views to 'pretend' resolve nexthops
Donald Sharp [Wed, 1 Feb 2017 15:31:40 +0000 (10:31 -0500)]
bgpd: Allow views to 'pretend' resolve nexthops

Views are supposed to be independent tables that have no connection to
routing tables.  Since View's are 'independent' there is no way to do
'real' nexthop resolution since connected routes and interfaces are
associated with a particular table (or really vrf).  So when we have a
bgp instance assume that nexthops specified are actually valid, since we
are propagating what our neighbors are telling us.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
[cherry-picked from master 6fa1ab2eecb39b35256739f7083196d6f556f639]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/157' ("Fixinator")
David Lamparter [Tue, 7 Feb 2017 15:38:03 +0000 (16:38 +0100)]
Merge branch 'frr/pull/157' ("Fixinator")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: print backtrace on MTYPE count underflow
David Lamparter [Tue, 7 Feb 2017 15:23:38 +0000 (16:23 +0100)]
lib: print backtrace on MTYPE count underflow

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/165' ("Pim vrf")
David Lamparter [Tue, 7 Feb 2017 14:52:52 +0000 (15:52 +0100)]
Merge branch 'frr/pull/165' ("Pim vrf")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/166' ("bgpd: fix array oob ...")
David Lamparter [Tue, 7 Feb 2017 14:50:26 +0000 (15:50 +0100)]
Merge branch 'frr/pull/166' ("bgpd: fix array oob ...")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/152' ("Lib fixes")
David Lamparter [Tue, 7 Feb 2017 14:48:46 +0000 (15:48 +0100)]
Merge branch 'frr/pull/152' ("Lib fixes")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd rfapi: advertise encap attribute when TT is valid and not MPLS.
Lou Berger [Tue, 7 Feb 2017 02:29:43 +0000 (21:29 -0500)]
bgpd rfapi: advertise encap attribute when TT is valid and not MPLS.
     Ensure tunnel type set based on rx'ed
     Ignore bad/mpls encap types.

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoMerge pull request #171 from donaldsharp/double_free
Renato Westphal [Tue, 7 Feb 2017 13:48:15 +0000 (11:48 -0200)]
Merge pull request #171 from donaldsharp/double_free

lib: Don't use malloc!

7 years agoMerge pull request #169 from opensourcerouting/ldpd-label-alloc-rework
Donald Sharp [Tue, 7 Feb 2017 13:41:45 +0000 (08:41 -0500)]
Merge pull request #169 from opensourcerouting/ldpd-label-alloc-rework

ldpd: update local labels when necessary

7 years agobgpd rfapi: advertise encap attribute when TT is valid and not MPLS.
Lou Berger [Tue, 7 Feb 2017 02:29:43 +0000 (21:29 -0500)]
bgpd rfapi: advertise encap attribute when TT is valid and not MPLS.
     Ensure tunnel type set based on rx'ed
     Ignore bad/mpls encap types.

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agozebra: fix installation of LDP labels on static routes
Renato Westphal [Tue, 7 Feb 2017 11:47:37 +0000 (09:47 -0200)]
zebra: fix installation of LDP labels on static routes

If the ifindex of a nexthop is not zero, we can't assume that its type is
NEXTHOP_TYPE_IPV4_IFINDEX or NEXTHOP_TYPE_IPV6_IFINDEX. Nexthops of type
NEXTHOP_TYPE_IPV[46] can have their ifindex set by the nexthop_active()
function.

With that said, we need to me more flexible when comparing nexthops
on mpls_ftn_update() to make sure that we'll always find the correct
route/nexthop to update.

Regression introduced by commit 88d88a ("zebra/ldpd: allow MPLS ECMP on
unnumbered interfaces") and found by ANVL.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agolib: Fixup CR comment
Donald Sharp [Tue, 7 Feb 2017 09:54:40 +0000 (04:54 -0500)]
lib: Fixup CR comment

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Don't use malloc!
Donald Sharp [Mon, 6 Feb 2017 17:52:28 +0000 (12:52 -0500)]
lib: Don't use malloc!

thread.c was using malloc.  This was found by the
assert added to memory.c.

Fixes issues #170

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