]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agoMerge branch 'frr/pull/210' ("tools: frr-reload removes "ipv6 nd ra-interval" ...")
David Lamparter [Fri, 17 Feb 2017 20:34:48 +0000 (21:34 +0100)]
Merge branch 'frr/pull/210' ("tools: frr-reload removes "ipv6 nd ra-interval" ...")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/214' ("bgpd: use tabs in Makefile.am")
David Lamparter [Fri, 17 Feb 2017 20:33:57 +0000 (21:33 +0100)]
Merge branch 'frr/pull/214' ("bgpd: use tabs in Makefile.am")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/213' ("*: remove QUAGGA_NO_DEPRECATED_INTERFACES")
David Lamparter [Fri, 17 Feb 2017 20:33:26 +0000 (21:33 +0100)]
Merge branch 'frr/pull/213' ("*: remove QUAGGA_NO_DEPRECATED_INTERFACES")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/212' ("bgpd: remove unnecessary parens in compare")
David Lamparter [Fri, 17 Feb 2017 20:32:54 +0000 (21:32 +0100)]
Merge branch 'frr/pull/212' ("bgpd: remove unnecessary parens in compare")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/211' ("ospfd: add *.a to .gitignore")
David Lamparter [Fri, 17 Feb 2017 20:32:14 +0000 (21:32 +0100)]
Merge branch 'frr/pull/211' ("ospfd: add *.a to .gitignore")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: use tabs in Makefile.am
Quentin Young [Fri, 17 Feb 2017 18:46:42 +0000 (18:46 +0000)]
bgpd: use tabs in Makefile.am

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years ago*: remove QUAGGA_NO_DEPRECATED_INTERFACES
Quentin Young [Fri, 17 Feb 2017 18:19:27 +0000 (18:19 +0000)]
*: remove QUAGGA_NO_DEPRECATED_INTERFACES

This define is used only to guard macros in lib/linklist.h which
themselves are not used anywhere in the codebase and have been marked
deprecated since anno domini 2005

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: remove unnecessary parens in compare
Quentin Young [Fri, 17 Feb 2017 18:13:05 +0000 (18:13 +0000)]
bgpd: remove unnecessary parens in compare

For clean build under latest clang

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoospfd: add *.a to .gitignore
Quentin Young [Fri, 17 Feb 2017 17:57:59 +0000 (17:57 +0000)]
ospfd: add *.a to .gitignore

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #103 from pguibert6WIND/frr_6wind_evpn_5
Lou Berger [Fri, 17 Feb 2017 17:18:08 +0000 (12:18 -0500)]
Merge pull request #103 from pguibert6WIND/frr_6wind_evpn_5

Provide EVPN basic support on master branch + EVPN Route Target 5 Support (V2)

7 years agoMerge branch 'frr/pull/205' ("Pim stuff")
David Lamparter [Fri, 17 Feb 2017 17:06:54 +0000 (18:06 +0100)]
Merge branch 'frr/pull/205' ("Pim stuff")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agotools: frr-reload removes "ipv6 nd ra-interval" and "no ipv6 nd suppress-ra"
Daniel Walton [Fri, 17 Feb 2017 14:05:56 +0000 (02:05 +1200)]
tools: frr-reload removes "ipv6 nd ra-interval" and "no ipv6 nd suppress-ra"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agobgpd: revert some RT ecom filtering to fix valgrind id'ed error and
Philippe Guibert [Fri, 17 Feb 2017 07:57:37 +0000 (08:57 +0100)]
bgpd: revert some RT ecom filtering to fix valgrind id'ed error and
potential misreporting.

This commits revert the call of ecommunity_ecom2str without filtering.

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgpd: initialise ecom sub field str when setting routermac
Philippe Guibert [Thu, 16 Feb 2017 16:09:46 +0000 (17:09 +0100)]
bgpd: initialise ecom sub field str when setting routermac

In order to avoid valgrind issue, the str field is initialised.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: restore pre-evpn output behavior
Philippe Guibert [Thu, 16 Feb 2017 14:12:22 +0000 (15:12 +0100)]
lib: restore pre-evpn output behavior

If an EVPN entry is detected, and type is not route type 5, displays the
Ethernet MAC configured, as it was before evpn is introduced.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: restore pre-evpn output behavior
Philippe Guibert [Thu, 16 Feb 2017 14:11:04 +0000 (15:11 +0100)]
bgpd: restore pre-evpn output behavior

This commit is displaying all the ECs from one entry in rfapi code.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agopimd: Allow IPDEFTTL to be used for omnios
Donald Sharp [Tue, 14 Feb 2017 21:19:16 +0000 (16:19 -0500)]
pimd: Allow IPDEFTTL to be used for omnios

The omnios OS has no IPDEFTTL defined.
Add the ability to handle it for this
one case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: ifdown sequnce stale report entry
Chirag Shah [Fri, 27 Jan 2017 19:33:01 +0000 (11:33 -0800)]
pimd: ifdown sequnce stale report entry

Ticket: CM-14652
Testing Done: Tested via sending IGMP report and flap port and verified pim upstream and mroute, the entry is deleted. Run pim-smoke

Even after Report received port down event, IGMP entry alawys exists in upstream, mroute, kernel.
The entry exist because it was recreated after delete due missing check if group has no more source list,
    mode is exclude, last source address was * means (*, G) so do not trigger to create entry.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: mroute entries unresolved IIF issue
Chirag Shah [Sat, 21 Jan 2017 23:18:08 +0000 (15:18 -0800)]
pimd: mroute entries unresolved IIF issue

Ticket:CM-14056
Reviewed By:sharpd, CCR-5603
Testing Done: verified multiple ifdown/ifup event on submitter setup and dev setup with 2k s,g entries, ran pim-smoke.

1. during ifdown event, pim vif for bridge was not resetting vif_index to -1 due to errno received from
kernel during vif del sequence. It could be timing issue where kernel may have delete prior to pimd sending request.
For vif_del even kernel returns error, reset vif_index to -1 in pimd DB so next if up event VIF receives new vif_index
and reprograms in kernel.
2. during mroute del sequence reset mfcc_parent to MAXVIF.
3. during mroute add check if parent mfcc_parent is MAXVIF then do not download to kernel such mroute entry.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agopimd: messages to neighbors should have TTL = 1
Chirag Shah [Fri, 13 Jan 2017 01:15:44 +0000 (17:15 -0800)]
pimd: messages to neighbors should have TTL = 1

Ticket:CM-12924
Reviewed By:shapd
Testing Done: configure PIM neighbor, verify PIM hello packet dump for ttl to be 1.

Set TTL to 1 for outgoing multicast control packets destine to ALL-PIM-ROUTERS as oppose to unicast mcast packets.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agopimd: non-null register checksum incorrect
Chirag Shah [Thu, 12 Jan 2017 03:36:50 +0000 (19:36 -0800)]
pimd: non-null register checksum incorrect

Ticket: CM-12041
Reviewed By: sharpd, CCR-5556
Testing Done: Tested on Local setup generating PIM Register (Data/Null) and processing both Tx/Rx with correct checksum.
Provided quagga debian to submitter and checksum cases passed on submitter setup.

1. PIM Register msg checksum only accounts for 8 bytes (4 bytes for PIM header and next 4 byetes before data payload).
In PIM header checksum calculation checked PIM packet type (in this case REGISTER type) then only pass 8 bytes as length
rather than full packet length.
2. PIM Register Rx path also handled with 8 byte and full pim lenth checksum.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoFix PIM DBG message
Chirag Shah [Sat, 7 Jan 2017 00:44:49 +0000 (16:44 -0800)]
Fix PIM DBG message

Ticket: CM-13771
Reviewed By: CCR-5537
Testing Done: yes

Fix to CM-13771 where DBG message was out of order.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #149 from pguibert6WIND/frr_6wind_stringify
David Lamparter [Tue, 14 Feb 2017 16:36:38 +0000 (17:36 +0100)]
Merge pull request #149 from pguibert6WIND/frr_6wind_stringify

issue #142 / pull request to provide mac address stringification

7 years agobgpd: set the returned buffer to '\0' in case is returns nothing
Philippe Guibert [Tue, 14 Feb 2017 11:11:29 +0000 (12:11 +0100)]
bgpd: set the returned buffer to '\0' in case is returns nothing

In the case where extended communities to str function is called with a
filtering mecanism, then the case that the returned buffer is not inited
may happen. Hence the change done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: prefix2str initialises incoming buffer in case erroneous EVPN pfx
Philippe Guibert [Tue, 14 Feb 2017 10:54:33 +0000 (11:54 +0100)]
lib: prefix2str initialises incoming buffer in case erroneous EVPN pfx

In the case, evpn prefix is requested to be transformed into string, and
if the evpn prefix is not an evpn route type 5 entry, then the prefix is
returning an initialised string that mentions the vpn prefix is unknown.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: fix address-family display for l2vpn evpn
Philippe Guibert [Thu, 9 Feb 2017 08:26:30 +0000 (09:26 +0100)]
bgpd: fix address-family display for l2vpn evpn

When configuring l2vpn evpn address-family, the show running indicates
that the address-family l2vpn evpn address-family has been configured,
and not evpn, as it was done before this commit. This is a bug fix.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: simplify str2esi function
Philippe Guibert [Thu, 9 Feb 2017 08:23:23 +0000 (09:23 +0100)]
bgpd: simplify str2esi function

The commit replaces the char-by-char handling function by sscanf routine
usage. This implementation is simplified and does the same.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: remove useless white space character in evpn function declaration
Philippe Guibert [Thu, 9 Feb 2017 08:12:21 +0000 (09:12 +0100)]
bgpd: remove useless white space character in evpn function declaration

Some tabulation replaces the white space used for the declaration of
this evpn function.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: fix overlay index comparison
Philippe Guibert [Thu, 9 Feb 2017 08:09:54 +0000 (09:09 +0100)]
bgpd: fix overlay index comparison

To know if overlay index is the same between two route information,
then the two overlay index field is compared. If both fields are set to
null, then the comparison should be equal, then return true, which was
not done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: change str2mac call api
Philippe Guibert [Thu, 9 Feb 2017 07:44:13 +0000 (08:44 +0100)]
bgpd: change str2mac call api

With the changed API, some adaptations are done in rfapi code, and in
bgpd evpn code. For evpn code, the internal storage of routermac addr is
kept as struct ethaddr structure. Also the evpn add_routermac api has as
incoming parameter a struct ethaddr param.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: simplify str2mac and use struct ethaddr structure
Philippe Guibert [Thu, 9 Feb 2017 07:42:32 +0000 (08:42 +0100)]
lib: simplify str2mac and use struct ethaddr structure

This commit simplified the string to mac conversion, since it uses
sscanf, instead of depicting each incoming character one by one, and
doing self analysis. Also,this commit changes the internal usage of the
mac address representation in mac handling function.

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: reflect mac handling change of apis to bgpd
Philippe Guibert [Fri, 3 Feb 2017 08:10:08 +0000 (09:10 +0100)]
bgpd: reflect mac handling change of apis to bgpd

As the prefix call function for mac handling has prefix_ prepended
before, the change must be propagated to all locations where those
functions are called.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: append prefix_ for mac handling functions
Philippe Guibert [Fri, 3 Feb 2017 07:28:57 +0000 (08:28 +0100)]
lib: append prefix_ for mac handling functions

This commit is changing the function naming for mac handling functions.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: replace AFI_ETHER reference with AFI_L2VPN ref
Philippe Guibert [Fri, 3 Feb 2017 07:02:14 +0000 (08:02 +0100)]
bgpd: replace AFI_ETHER reference with AFI_L2VPN ref

The introduction of AFI_L2VPN prefix makes usage of AFI_ETHER deprecated
and is of no usage currently. The former replaces the latter one.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: replace AFI_ETHER reference with AFI_L2VPN ref
Philippe Guibert [Fri, 3 Feb 2017 07:00:58 +0000 (08:00 +0100)]
bgpd: replace AFI_ETHER reference with AFI_L2VPN ref

The introduction of AFI_L2VPN prefix makes usage of AFI_ETHER deprecated
and is of no usage currently. The former replaces the latter one.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: replace AFI_ETHER reference with AFI_L2VPN
Philippe Guibert [Fri, 3 Feb 2017 06:59:20 +0000 (07:59 +0100)]
lib: replace AFI_ETHER reference with AFI_L2VPN

The introduction of AFI_L2VPN prefix makes usage of AFI_ETHER deprecated
and is of no usage currently. The latter define is linked to AFI_L2VPN.
For that, the prefix enumerate has the AFI_ETHER value removed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: use XMALLOC for ESI handling
Philippe Guibert [Wed, 1 Feb 2017 18:01:16 +0000 (19:01 +0100)]
bgpd: use XMALLOC for ESI handling

The memory allocation mecanism from frr is used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: evpn use string handling functions from mac manipulation
Philippe Guibert [Wed, 1 Feb 2017 17:52:33 +0000 (18:52 +0100)]
bgpd: evpn use string handling functions from mac manipulation

EVPN code adaptation to replace old mac string internal utility with the
new one available in lib folder.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: use mac2str() function utility to display mac address
Philippe Guibert [Wed, 1 Feb 2017 17:41:38 +0000 (18:41 +0100)]
bgpd: use mac2str() function utility to display mac address

VNC uses the prefix API to handle mac string.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: handle str2mac case where buffer is allocated by the function
Philippe Guibert [Wed, 1 Feb 2017 18:05:19 +0000 (19:05 +0100)]
lib: handle str2mac case where buffer is allocated by the function

The case where no buffer is passed to the str2mac function is handled.
In that case, a buffer is allocated. Then the check against the buffer
length is not done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: add string to macaddress and reverse function
Philippe Guibert [Wed, 1 Feb 2017 17:26:34 +0000 (18:26 +0100)]
lib: add string to macaddress and reverse function

As mac-address structure is to be used as a prefix field, two new
functions permit handling mac address in order to convert it. either
from string to internal value, or the reverse operation.
Internal representation of a mac address is a 6 byte char value standing
for the 6 byte value the mac address has.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: fix rfapi call to ecom2str with correct number of parameters
Philippe Guibert [Mon, 30 Jan 2017 13:57:55 +0000 (14:57 +0100)]
bgpd: fix rfapi call to ecom2str with correct number of parameters

This commit is a complement for bgpd: handling router mac extended
community. As API of bgp_ecommunity ecom2str() function changed, rfapi
file has diverged with this API. The commit adds the correct number of
parameters.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: indent new evpn code to the frr standards
Philippe Guibert [Fri, 27 Jan 2017 07:25:27 +0000 (08:25 +0100)]
bgpd: indent new evpn code to the frr standards

Using intent tool, and apply to all bgp_evpn files.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: remove HAVE_EVPN references
Philippe Guibert [Wed, 25 Jan 2017 07:49:19 +0000 (08:49 +0100)]
bgpd: remove HAVE_EVPN references

This commit removes HAVE_EVPN references from bgpd folder

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agolib: remove HAVE_EVPN references
Philippe Guibert [Wed, 25 Jan 2017 07:48:42 +0000 (08:48 +0100)]
lib: remove HAVE_EVPN references

This commit removes references to HAVE_EVPN references in lib folder.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agoRevert "configure: add enable-evpn support"
Philippe Guibert [Wed, 25 Jan 2017 07:43:35 +0000 (08:43 +0100)]
Revert "configure: add enable-evpn support"

This reverts commit 764c98c9b45a3f7aa976bc9298c89e210b084fe2.

7 years agobgpd: use a define for addpath string size
Philippe Guibert [Mon, 23 Jan 2017 14:12:38 +0000 (15:12 +0100)]
bgpd: use a define for addpath string size

The define is added in order to be reused, when one wants to display
addpath identifier as a string with some comment.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agotests: fix bgp print in tests
Philippe Guibert [Mon, 23 Jan 2017 13:47:35 +0000 (14:47 +0100)]
tests: fix bgp print in tests

This commit is a fix from previous commit: Quagga: AFI/SAFI mappings
IANA to/from internal values. It removes the printf that was used for
troubleshooting the afi/safi change, in respect to testing.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: remove old address-family vty command for evpn
Philippe Guibert [Mon, 23 Jan 2017 08:28:53 +0000 (09:28 +0100)]
bgpd: remove old address-family vty command for evpn

old vty format to configure evpn: address-family evpn
is no longer supported.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: use HAVE_EVPN to disable evpn frame handling
Philippe Guibert [Tue, 17 Jan 2017 21:26:33 +0000 (22:26 +0100)]
bgpd: use HAVE_EVPN to disable evpn frame handling

Transmission and Reception routines have a part of code that is
conditionnally compiled to the usage of HAVE_EVPN. Also, each time a
subfield of prefix evpn is reached, like in configuration also, then a
conditionnaly compilation with HAVE_EVPN is used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: fix show bgp l2vpn evpn all tag command
Philippe Guibert [Fri, 20 Jan 2017 17:47:23 +0000 (18:47 +0100)]
bgpd: fix show bgp l2vpn evpn all tag command

This commit fixes the nexthop display behaviour when an evpn entry is
matched. The commit handles both cases where IPv4 or IPv6 nexthop is
detected.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: update mp_nexthop field in case mp-bgp entry is created
Philippe Guibert [Fri, 20 Jan 2017 13:02:49 +0000 (14:02 +0100)]
bgpd: update mp_nexthop field in case mp-bgp entry is created

In case a manual set of MPLS, ENCAP, or EVPN entry is set, then the
nexthop attribute localted in attr->extra structure must be changed too.
In standard cases, where IPv4 IGP nexthop address is picked up, the same
address ie chosen.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: enhance network command for evpn route type 5
Philippe Guibert [Thu, 27 Oct 2016 06:02:36 +0000 (08:02 +0200)]
bgpd: enhance network command for evpn route type 5

A new vty command available under evpn address family. This command
takes following format:

(af-evpn)# [no] network <A.B.C.D/M|X:X::X:X/M> rd ASN:nn_or_IP-address:nn ethtag WORD
                 label WORD esi WORD gwip A.B.C.D routermac WORD
 [route-map WORD]

Among new parameters, ethtag stands for the ethernet tag indentifier.
ESI stands for the ethernet segment identifier, and must be entered in
following format: 00:11:22:33:44:55:66:77:88:99.
gwip stands for the gateway IP address contained in RT5 message. A
check is done on that value since if gwip is ipv4, then ip prefix must
be ipv4. The same for ipv6.
RouterMAc is the gateway mac address sent as extended community
attribute.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: vty commands added for EVPN address family
Philippe Guibert [Wed, 28 Sep 2016 16:54:17 +0000 (18:54 +0200)]
bgpd: vty commands added for EVPN address family

Enhancement of the following show vty evpn commands:

show bgp l2vpn evpn all A.B.C.D

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: fix display of ethernet vpn route prefix in vty
Julien Courtat [Tue, 18 Oct 2016 09:05:26 +0000 (11:05 +0200)]
bgpd: fix display of ethernet vpn route prefix in vty

L2VPN route prefix are composed of ethtag, mac address and ip address.
vty command "show bgp l2vpn rd <>" show macip prefix in the following
template: [ethtag][macaddress/len][ipaddress/len]

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
e

7 years agobgpd: enhance EPVN vty show commands
Philippe Guibert [Mon, 9 Jan 2017 17:26:24 +0000 (18:26 +0100)]
bgpd: enhance EPVN vty show commands

This patch introduces show show bgp evpn commands to dump
NLRI entries configured or received on BGP, related to EVPN
New command introduced is the following:
 show [ip] bgp l2vpn evpn [all | rd <rd name> ] [overlay]

Like for MPLS, similar set of commands is added for EVPN:
 show [ip] bgp l2vpn evpn [all|rd <RDNAME>]
 show [ip] bgp l2vpn evpn all neighbor <NEIGHBOR> routes
 show [ip] bgp l2vpn evpn all neighbor <NEIGHBOR> advertised-routes

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: handling router mac extended community
Philippe Guibert [Mon, 5 Sep 2016 11:20:41 +0000 (13:20 +0200)]
bgpd: handling router mac extended community

For each received routermac extended community, the mac address is
copied into routermac extended community context. For each emission,
a check is done against routermac extended community, if L2VPN is
enabled. If enabled, the extended community is appended.

Signed-off-by: Philippe Gubiert <philippe.guibert@6wind.com>
7 years agobgpd: add EVPN RT5 gatewayIp address to bgp_static context
Philippe Guibert [Fri, 20 Jan 2017 09:48:42 +0000 (10:48 +0100)]
bgpd: add EVPN RT5 gatewayIp address to bgp_static context

This field can be either IPv4 or IPv6 address and is filled in in
bgp_static configuration structure.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
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