]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
8 years agobgpd: Switch u_int64_t -> uint64_t
Donald Sharp [Fri, 7 Apr 2017 17:34:01 +0000 (13:34 -0400)]
bgpd: Switch u_int64_t -> uint64_t

Apparently u_int64_t is not available( or we don't pull the
right headers in for solaris based systems).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Get mpls building across multiple platforms.
Donald Sharp [Thu, 6 Apr 2017 14:25:43 +0000 (10:25 -0400)]
zebra: Get mpls building across multiple platforms.

The build system for mpls is a bit convoluted.  We need
a way to handle builds across multiple platforms.  This,
I believe addresses this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fix usage of HAVE_CUMULUS
Donald Sharp [Wed, 15 Mar 2017 19:15:40 +0000 (15:15 -0400)]
zebra: Fix usage of HAVE_CUMULUS

The function zebra_mpls_lsp_label_consistent needs
to be wrappered by HAVE_CUMULUS

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix iana_afi_t afi_t confusion
Donald Sharp [Wed, 15 Mar 2017 19:12:47 +0000 (15:12 -0400)]
bgpd: Fix iana_afi_t afi_t confusion

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: correct labeled-unicast withdraw update
Don Slice [Wed, 15 Mar 2017 18:06:54 +0000 (14:06 -0400)]
bgpd: correct labeled-unicast withdraw update

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix labeled-unicast generation and parsing issues
Don Slice [Wed, 15 Mar 2017 12:43:01 +0000 (08:43 -0400)]
bgpd: Fix labeled-unicast generation and parsing issues

Labeled-unicast updates were being sent with an ipv6 nexthop due to
not setting the mp_nexthop_len or nh_afi.  On the receive side, the
prefix length was being incorrectly determined and has been fixed.
Also the stream for bgp_label_buf was not created.  All resolved.

Ticket: CM-15260
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by:

8 years agobgpd: bgp_static_update just called bgp_static_update_main
Donald Sharp [Tue, 14 Mar 2017 14:02:16 +0000 (10:02 -0400)]
bgpd: bgp_static_update just called bgp_static_update_main

Just make it one function call

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
8 years agozebra: Fix gcc compile warn->error issue
Donald Sharp [Fri, 10 Mar 2017 18:34:02 +0000 (13:34 -0500)]
zebra: Fix gcc compile warn->error issue

flags is set but never used.  Since we
plan to use it in the future, make
it evident what is going on here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Use appropriate Attribute number for labels
Donald Sharp [Fri, 10 Mar 2017 13:04:39 +0000 (08:04 -0500)]
bgpd: Use appropriate Attribute number for labels

The draft-ietf-idr-bgp-prefix-sid-04 specifies the label attribute
should be 40 not 30.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Modify attr->flag to be 64 bit
Donald Sharp [Fri, 10 Mar 2017 12:59:52 +0000 (07:59 -0500)]
bgpd: Modify attr->flag to be 64 bit

With the some current bgp drafts the Attribute number has
surpassed 32.  Which is a bit unfortunate in that we keep
track of the attributes via a bitfield based on the attribute #.

For the moment since I am not aware of Attribute #'s being
greater than 64, convert the flag to 64 bit and allow the
bit shifting to know about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd, lib, zebra: Implement handling of BGP-Prefix-SID label Index
Vivek Venkatraman [Thu, 9 Mar 2017 17:55:54 +0000 (12:55 -0500)]
bgpd, lib, zebra: Implement handling of BGP-Prefix-SID label Index

Implement BGP Prefix-SID IETF draft to be able to signal a labeled-unicast
prefix with a label index (segment ID). This makes it easier to deploy
global MPLS labels with BGP, even without other aspects of Segment Routing
implemented.

This patch implements the handling of the BGP-Prefix-SID Label Index
attribute. When received from a peer and the index is acceptable, the local
label is picked up from the SRGB and is programmed as the incoming label as
well as advertised to peers. If the index is not acceptable, no local label
is assigned. The outgoing label will always be the one advertised by the
downstream neighbor.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agobgpd: This patch implements the exchange of the BGP-Prefix-SID label index attr
Vivek Venkatraman [Thu, 9 Mar 2017 17:22:04 +0000 (12:22 -0500)]
bgpd: This patch implements the exchange of the BGP-Prefix-SID label index attr

Implement BGP Prefix-SID IETF draft to be able to signal a labeled-unicast
prefix with a label index (segment ID). This makes it easier to deploy
global MPLS labels with BGP, even without other aspects of Segment Routing
implemented.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agobgpd, zebra: Implement BGP Prefix-SID IETF draft
Vivek Venkatraman [Thu, 9 Mar 2017 16:43:59 +0000 (11:43 -0500)]
bgpd, zebra: Implement BGP Prefix-SID IETF draft

Implement BGP Prefix-SID IETF draft to be able to signal a labeled-unicast
prefix with a label index (segment ID). This makes it easier to deploy
global MPLS labels with BGP, even without other aspects of Segment Routing
implemented.

This patch implements configuration of the global label block (SRGB) and
configuration of a label-index for a network in BGP.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agobgpd: labeled unicast display
Don Slice [Thu, 9 Mar 2017 21:12:44 +0000 (16:12 -0500)]
bgpd: labeled unicast display

Implement 'show' and 'clear' commands for the labeled-unicast address-family.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agobgpd: labeled unicast processing
Don Slice [Thu, 9 Mar 2017 14:54:20 +0000 (09:54 -0500)]
bgpd: labeled unicast processing

Implement support for negotiating IPv4 or IPv6 labeled-unicast address
family, exchanging prefixes and installing them in the routing table, as
well as interactions with Zebra for FEC registration. This is the
implementation of RFC 3107.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agobgpd: labeled unicast config
Don Slice [Wed, 8 Feb 2017 19:19:54 +0000 (14:19 -0500)]
bgpd: labeled unicast config

Implement support for activating the labeled-unicast address family in
BGP and relevant configuration for this address family.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoquagga: labeled unicast definitions
Don Slice [Thu, 2 Feb 2017 18:34:00 +0000 (13:34 -0500)]
quagga: labeled unicast definitions

Internal and IANA definitions for labeled-unicast SAFI. Note that this SAFI
is specific to BGP and maps to the corresponding unicast SAFI in Zebra.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agozebra: labeled unicast handling
Don Slice [Thu, 2 Feb 2017 17:58:33 +0000 (12:58 -0500)]
zebra: labeled unicast handling

Support install of labeled-unicast routes by a client. This would be
BGP, in order to install routes corresponding to AFI/SAFI 1/4 (IPv4)
or 2/4 (IPv6). Convert labeled-unicast routes into label forwarding
entries (i.e., transit LSPs) when there is a static label binding.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agobgpd: update debugs enance
Don Slice [Wed, 1 Feb 2017 18:19:37 +0000 (13:19 -0500)]
bgpd: update debugs enance

Add information about AFI/SAFI to updates - received and sent.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agozebra: fec register
Don Slice [Wed, 1 Feb 2017 18:10:56 +0000 (13:10 -0500)]
zebra: fec register

Implement interface that allows a client to register a FEC for obtaining
a label binding (in-label). Update client whenever the label binding is
updated and cleanup when client goes away.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agozebra: static label binding
Don Slice [Tue, 27 Dec 2016 15:09:28 +0000 (07:09 -0800)]
zebra: static label binding

Implement static label binding of a label to a prefix (FEC).

Note: Currently, only binding to a prefix is supported, the nexthop and/or
other parameters are not considered.  This was cherry-picked by hand from
an earlier mpls branch.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoMerge pull request #336 from dwalton76/bgpd-allowas-in-removal
David Lamparter [Wed, 5 Apr 2017 20:30:11 +0000 (22:30 +0200)]
Merge pull request #336 from dwalton76/bgpd-allowas-in-removal

bgpd: removing "allowas-in" for peer-group member still allows AS_PATHS

8 years agoMerge pull request #310 from opensourcerouting/thread-prep
Donald Sharp [Wed, 5 Apr 2017 16:39:25 +0000 (12:39 -0400)]
Merge pull request #310 from opensourcerouting/thread-prep

MT preparations

8 years agobgpd: removing "allowas-in" for peer-group member still allows AS_PATHS 336/head
Daniel Walton [Wed, 5 Apr 2017 15:19:00 +0000 (15:19 +0000)]
bgpd: removing "allowas-in" for peer-group member still allows AS_PATHS
with our ASN

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoMerge pull request #334 from pichuang/typo frr-3.1-dev
Donald Sharp [Wed, 5 Apr 2017 10:08:28 +0000 (06:08 -0400)]
Merge pull request #334 from pichuang/typo

Remove superfluous path and correct groupname

8 years agoRemove superfluous path and correct groupname 334/head
Phil Huang [Wed, 5 Apr 2017 08:00:56 +0000 (16:00 +0800)]
Remove superfluous path and correct groupname

Signed-off-by: Phil Huang <phil_huang@edge-core.com>
8 years agoMerge pull request #332 from opensourcerouting/snmp-fix
Donald Sharp [Tue, 4 Apr 2017 20:39:56 +0000 (16:39 -0400)]
Merge pull request #332 from opensourcerouting/snmp-fix

fix SNMP build

8 years agoMerge pull request #331 from dwalton76/quagga-reload
David Lamparter [Tue, 4 Apr 2017 19:47:01 +0000 (21:47 +0200)]
Merge pull request #331 from dwalton76/quagga-reload

tools: quagga-reload.py fails to change max-paths

8 years agoMerge pull request #330 from dwalton76/ospf-no-log-adjacency-changes-detail
David Lamparter [Tue, 4 Apr 2017 19:45:14 +0000 (21:45 +0200)]
Merge pull request #330 from dwalton76/ospf-no-log-adjacency-changes-detail

ospfd: "no log-adjacency-changes detail" disables log-adjacency-changes

8 years agoMerge pull request #329 from dwalton76/debug-zebra-nht
David Lamparter [Tue, 4 Apr 2017 19:44:28 +0000 (21:44 +0200)]
Merge pull request #329 from dwalton76/debug-zebra-nht

zebra: "debug zebra nht" is not in the config

8 years agovtysh: Fix build for non-snmp case 332/head
Donald Sharp [Tue, 4 Apr 2017 19:20:52 +0000 (15:20 -0400)]
vtysh: Fix build for non-snmp case

The snmp code is being included in the build of the vtysh_cmd.c
irrelevant of whether or not it is needed.  Be a bit smarter
about what files to include.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: fix CFLAGS for snmp modules
David Lamparter [Tue, 4 Apr 2017 19:25:19 +0000 (21:25 +0200)]
build: fix CFLAGS for snmp modules

The SNMP modules include <net-snmp/net-snmp-config.h>, which won't be
found in off-searchpath directories without SNMP_CFLAGS.  Unfortunately
in my tests the files were on the search path even without the flags.

(SNMP_LIBS is not needed because only libfrrsnmp calls into net-snmp
functions.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agotools: quagga-reload.py fails to change max-paths 331/head
Daniel Walton [Tue, 4 Apr 2017 18:51:32 +0000 (18:51 +0000)]
tools: quagga-reload.py fails to change max-paths

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoospfd: "no log-adjacency-changes detail" disables log-adjacency-changes 330/head
Daniel Walton [Tue, 4 Apr 2017 18:13:43 +0000 (18:13 +0000)]
ospfd: "no log-adjacency-changes detail" disables log-adjacency-changes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: "debug zebra nht" is not in the config 329/head
Daniel Walton [Tue, 4 Apr 2017 18:11:04 +0000 (18:11 +0000)]
zebra: "debug zebra nht" is not in the config

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge branch 'master'
David Lamparter [Tue, 4 Apr 2017 18:04:07 +0000 (20:04 +0200)]
Merge branch 'master'

8 years agobuild: remove wildcards from snapcraft/Makefile.am
David Lamparter [Tue, 4 Apr 2017 16:37:47 +0000 (18:37 +0200)]
build: remove wildcards from snapcraft/Makefile.am

automake does not support globs.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge branch 'stable/2.0'
David Lamparter [Tue, 4 Apr 2017 16:34:08 +0000 (18:34 +0200)]
Merge branch 'stable/2.0'

Fixed minor conflicts from "defaults" change on stable.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge pull request #294 from opensourcerouting/modules
Donald Sharp [Tue, 4 Apr 2017 15:55:00 +0000 (11:55 -0400)]
Merge pull request #294 from opensourcerouting/modules

Loadable module support

8 years agovtysh: handle "show modules" like "show memory" 294/head
David Lamparter [Tue, 4 Apr 2017 14:12:59 +0000 (16:12 +0200)]
vtysh: handle "show modules" like "show memory"

Preface with line identifying which daemon it applies to.
[Also fixes a missed "plugin" -> "module" replace.]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge pull request #322 from qlyoung/fix-distance-commands
David Lamparter [Tue, 4 Apr 2017 13:59:12 +0000 (15:59 +0200)]
Merge pull request #322 from qlyoung/fix-distance-commands

ospfd, ospf6d: fix distance commands

8 years agoMerge pull request #321 from donaldsharp/speed
David Lamparter [Tue, 4 Apr 2017 13:58:11 +0000 (15:58 +0200)]
Merge pull request #321 from donaldsharp/speed

Speedy McSpeederson

8 years agoMerge pull request #314 from donaldsharp/scan-build
David Lamparter [Tue, 4 Apr 2017 13:57:00 +0000 (15:57 +0200)]
Merge pull request #314 from donaldsharp/scan-build

Scan build

8 years agoMerge pull request #324 from opensourcerouting/zebra-v4v6-typos
Donald Sharp [Tue, 4 Apr 2017 13:55:58 +0000 (09:55 -0400)]
Merge pull request #324 from opensourcerouting/zebra-v4v6-typos

zebra: fix v4/v6 typos in some show commands

8 years agozebra: Fix printf formatting 321/head
Donald Sharp [Tue, 4 Apr 2017 11:50:31 +0000 (07:50 -0400)]
zebra: Fix printf formatting

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: fix v4/v6 typos in some show commands 324/head
Renato Westphal [Tue, 4 Apr 2017 00:14:18 +0000 (21:14 -0300)]
zebra: fix v4/v6 typos in some show commands

This fixes a few problems like this one:
vtysh# show ipv6 route ospf6
Unknown route type

Also, replace SAFI_UNICAST with SAFI_MULTICAST in the "show ipv6 mroute
vrf all" command.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoMerge pull request #323 from LabNConsulting/working/master/patch/install1
Donald Sharp [Mon, 3 Apr 2017 22:55:30 +0000 (18:55 -0400)]
Merge pull request #323 from LabNConsulting/working/master/patch/install1

Fix a couple of centos related install issues

8 years agolib, zebra: Fix CR comments
Donald Sharp [Mon, 3 Apr 2017 22:28:26 +0000 (18:28 -0400)]
lib, zebra: Fix CR comments

lib -> Add a bit of documentation about what units we are in.
zebra -> Fix failure case to be a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoredhat/frr.spec.in: fix typo 323/head
Lou Berger [Mon, 3 Apr 2017 21:32:03 +0000 (17:32 -0400)]
redhat/frr.spec.in: fix typo

Signed-off-by: Lou Berger <lberger@labn.net>
8 years agodoc: fix some omissions in centos instructions
Lou Berger [Mon, 3 Apr 2017 21:30:31 +0000 (17:30 -0400)]
doc: fix some omissions in centos instructions

Signed-off-by: Lou Berger <lberger@labn.net>
8 years agoospfd, ospf6d: fix distance commands 322/head
Quentin Young [Mon, 3 Apr 2017 20:17:12 +0000 (20:17 +0000)]
ospfd, ospf6d: fix distance commands

OSPF distance commands were broken in a variety of ways. Fix 'em.

* `distance ospf` and `distance ospf6` were accepted commands
* Inconsistent doc strings
* Make use of {keyword|tokens}
* Add ability to reset specific distance without specifying a value
  Ex: ~# no distance ospf6 intra

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoMerge pull request #316 from qlyoung/fix-logc
Jafar Al-Gharaibeh [Mon, 3 Apr 2017 19:43:50 +0000 (14:43 -0500)]
Merge pull request #316 from qlyoung/fix-logc

lib: fix proto_redistnum() oversight from #257

8 years agozebra: Display new speed information in 'show int..' command
Donald Sharp [Thu, 30 Mar 2017 20:54:15 +0000 (16:54 -0400)]
zebra: Display new speed information in 'show int..' command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Retrieve interface speed when creating interface
Donald Sharp [Thu, 30 Mar 2017 19:51:29 +0000 (15:51 -0400)]
zebra: Retrieve interface speed when creating interface

When we get notification from the kernel about the creation
of a new interface, retrieve the speed of it from the kernel

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, zebra: Add ability to pass interface speed up from zebra
Donald Sharp [Thu, 30 Mar 2017 19:37:22 +0000 (15:37 -0400)]
lib, zebra: Add ability to pass interface speed up from zebra

This is a prepatory commit for future improvements.

Add a change to the zapi to pass the interface speed up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #311 from opensourcerouting/ldpd-vty-simpl
Donald Sharp [Mon, 3 Apr 2017 17:49:30 +0000 (13:49 -0400)]
Merge pull request #311 from opensourcerouting/ldpd-vty-simpl

ldpd: simplify CLI code + small fixes

8 years agolib: fix proto_redistnum() oversight from #257 316/head
Quentin Young [Sun, 2 Apr 2017 23:21:09 +0000 (23:21 +0000)]
lib: fix proto_redistnum() oversight from #257

proto_redistnum() now accepts full protocol strings and not partial
names per #10

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoRelease: FRR-2.0 frr-2.0
Martin Winter [Sun, 2 Apr 2017 05:22:47 +0000 (22:22 -0700)]
Release: FRR-2.0

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agoisisd: Fix some various clang warnings 314/head
Donald Sharp [Sat, 1 Apr 2017 12:42:19 +0000 (08:42 -0400)]
isisd: Fix some various clang warnings

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: fix usage of getgrouplist() in *BSD
Mike Tancsa [Fri, 31 Mar 2017 20:50:35 +0000 (17:50 -0300)]
lib: fix usage of getgrouplist() in *BSD

On BSD systems, the getgrouplist() function returns 0 if successful and
-1 on error.

Linux in the other hand returns *ngroups (the number of groups of which
user is a member) on success and -1 on error.

Given this difference, the most portable way to use getgrouplist()
is use its return value only for checking if it succeeded or not.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agonhrpd: Fix value set but never used.
Donald Sharp [Fri, 31 Mar 2017 21:00:26 +0000 (17:00 -0400)]
nhrpd: Fix value set but never used.

The nbma_addr value is set but never used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Cleanup termination to avoid possible null ptr deref
Donald Sharp [Fri, 31 Mar 2017 20:56:26 +0000 (16:56 -0400)]
pimd: Cleanup termination to avoid possible null ptr deref

When terminating pim, there existed( albeit small ) the chance
to cause a crash.  Cleanup the termination to not have
that chance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix incorrect indentation
Donald Sharp [Fri, 31 Mar 2017 20:50:08 +0000 (16:50 -0400)]
pimd: Fix incorrect indentation

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove impossible conditions from test
Donald Sharp [Fri, 31 Mar 2017 20:43:36 +0000 (16:43 -0400)]
pimd: Remove impossible conditions from test

It is impossible for the list->cmp function to
ever be handed NULL values as the arguments.

Clean up this in the code.

Additionally consolidate the exact same two functions
into 1 function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Cleanup api and stop crash
Donald Sharp [Fri, 31 Mar 2017 20:38:29 +0000 (16:38 -0400)]
pimd: Cleanup api and stop crash

There is no need for a function that calls another function.

Additionally, nexthop_updates from zebra can be either
ZEBRA_NEXTHOP_UPDATE -or-
ZEBRA_IMPORT_CHECK_UPDATE

If we were to receive a IMPORT_CHECK_UPDATE the code
would cause a immediate crash.  Fix this

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Cleanup unused variable write
Donald Sharp [Fri, 31 Mar 2017 20:28:22 +0000 (16:28 -0400)]
pimd: Cleanup unused variable write

There exists a common pattern in pim where we were setting
a variable to a value in the error case when we would no
longer need it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoldpd: do not consume vty_conf when updating the configuration 311/head
Renato Westphal [Thu, 30 Mar 2017 14:33:08 +0000 (11:33 -0300)]
ldpd: do not consume vty_conf when updating the configuration

David Lamparter gave the idea of keeping vty_conf as a permanent copy of
ldpd_conf in order to simplify the CLI code and facilitate the integration
with his cap'n proto framework in the future. Doing this demanded quite
some effort but it was worth it as the code looks much better now.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agobuild: find & use threading library 310/head
David Lamparter [Sat, 25 Apr 2015 11:10:36 +0000 (13:10 +0200)]
build: find & use threading library

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: Linux indentation on memory.[ch]
David Lamparter [Fri, 31 Mar 2017 14:37:23 +0000 (16:37 +0200)]
lib: Linux indentation on memory.[ch]

The fact that I originally wrote this in Linux Kernel style and then
reindented it to GNU makes me want to gouge my eyes out every time I
look at it.  Restore original indentation.

[This patch is whitespace-only.]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: memtypes: restore atomicity
David Lamparter [Wed, 26 Oct 2016 15:19:56 +0000 (17:19 +0200)]
lib: memtypes: restore atomicity

the original version of this code already used _Atomic and atomic_*().
Restore this functionality for future multithreading.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: try to find some kind of atomic ops
David Lamparter [Fri, 29 May 2015 07:56:51 +0000 (09:56 +0200)]
build: try to find some kind of atomic ops

Either one of:
- ISO C11
- gcc __atomic_*
- gcc/clang __sync_*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoldpd: extend the ldp_config_normalize() function
Renato Westphal [Fri, 31 Mar 2017 01:15:33 +0000 (22:15 -0300)]
ldpd: extend the ldp_config_normalize() function

* remove superfluous parts of the configuration when possible
  (e.g. interfaces that are disabled for both IPv4 and IPv6);
* move the check of whether the pseudowire is active or not from
  merge_l2vpns() to ldp_config_normalize() where it belongs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: fix configuration of non-existing VPLS interfaces and pseudowires
Renato Westphal [Fri, 31 Mar 2017 00:58:47 +0000 (21:58 -0300)]
ldpd: fix configuration of non-existing VPLS interfaces and pseudowires

If we don't know the ifindex, flags, etc of an interface at the time it's
configured, we should make sure that once this information is available
the appropriate structures are updated.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: remove the interface vty node
Renato Westphal [Thu, 30 Mar 2017 23:26:17 +0000 (20:26 -0300)]
ldpd: remove the interface vty node

ldpd uses a hierarchical configuration model where all commands are
defined inside the "mpls ldp" node and its subnodes. The idea is to keep
all LDP configuration in a single place to keep things simple. With that
said, we can remove the "config-if" node from ldpd because we already
have a separate node ("config-ldp-af-if") for LDP-related interface
specific commands.

Example:
vtysh(config)# mpls ldp
vtysh(config-ldp)# address-family ipv4
vtysh(config-ldp-af)# interface eth1
vtysh(config-ldp-af-if)# discovery hello ?
  holdtime  Hello holdtime
  interval  Hello interval

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agobuild: bump to C11
David Lamparter [Sat, 28 Jan 2017 23:51:45 +0000 (00:51 +0100)]
build: bump to C11

Funnily enough, "gnu11" is gcc's default in 5.x if you don't specify
anything, yet there is no "AC_PROG_CC_C11" in autoconf.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: disable autoconf "-g -O2" default CFLAGS
David Lamparter [Fri, 29 May 2015 00:22:48 +0000 (02:22 +0200)]
build: disable autoconf "-g -O2" default CFLAGS

We have AC_C_FLAG and try -Os before -O2.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: make sure SEGV handler cannot lock up
David Lamparter [Mon, 11 Jan 2016 15:02:49 +0000 (16:02 +0100)]
lib: make sure SEGV handler cannot lock up

Just adding -pthread to gcc options changes libc's behaviour, e.g.
making malloc() use proper locking.  This means a SEGV inside malloc()
(e.g. because malloc bookkeeping structures have been damaged by writing
to a broken pointer) can lead to a lockup by the following chain:

- random_function()
- malloc()
--- SEGV
- core_handler()
- zlog_backtrace_sigsafe()
- backtrace()
- malloc()

This will hang forever waiting for the malloc() lock to be released.

Another failure mode is dynamic linking with lazy binding (-z lazy,
default).  Since backtrace() is seldomly used, this means the call to
backtrace() in the core handler can in fact result in the dynamic linker
trying to resolve the "backtrace" symbol, which can also deadlock.

Add several safeguards to prevent any of this from happening.

(Unfortunately, these are not theoretical issues - I found them by
running into them headfirst.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoldpd: no need to synchronize pseudowires with LSPs anymore
Renato Westphal [Thu, 30 Mar 2017 23:19:16 +0000 (20:19 -0300)]
ldpd: no need to synchronize pseudowires with LSPs anymore

Since commit 595b4be, the l2vpn_pw_ok() function doesn't check if there's
a working LSP to the remote end of the pseudowire (we assume that zebra
will do that for us). With that said, the l2vpn_sync_pws() function is
not necessary anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: fix harmless maybe-uninitialized warning
Renato Westphal [Thu, 30 Mar 2017 15:33:46 +0000 (12:33 -0300)]
ldpd: fix harmless maybe-uninitialized warning

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoMerge pull request #291 from AnuradhaKaruppiah/pim-ssm
Jafar Al-Gharaibeh [Fri, 31 Mar 2017 05:15:23 +0000 (00:15 -0500)]
Merge pull request #291 from AnuradhaKaruppiah/pim-ssm

Pim ssm

8 years agoMerge branch 'master' into pim-ssm 291/head
Donald Sharp [Thu, 30 Mar 2017 21:20:34 +0000 (16:20 -0500)]
Merge branch 'master' into pim-ssm

8 years agoMerge pull request #301 from qlyoung/nhrpd-gitignore
Jafar Al-Gharaibeh [Thu, 30 Mar 2017 21:15:18 +0000 (16:15 -0500)]
Merge pull request #301 from qlyoung/nhrpd-gitignore

nhrpd: add .gitignore

8 years agoMerge pull request #307 from LabNConsulting/working/2.0/patch/rename2
Donald Sharp [Thu, 30 Mar 2017 19:23:55 +0000 (14:23 -0500)]
Merge pull request #307 from LabNConsulting/working/2.0/patch/rename2

Rename: FreeRangeRouting --> FRRouting

8 years agoMerge pull request #305 from opensourcerouting/build-doc-updates
Donald Sharp [Thu, 30 Mar 2017 19:23:15 +0000 (14:23 -0500)]
Merge pull request #305 from opensourcerouting/build-doc-updates

doc: Update for the Building_FRR docs to include new requirements

8 years agoRename: freerangerouting --> frrouting 307/head
Lou Berger [Thu, 30 Mar 2017 18:24:05 +0000 (14:24 -0400)]
Rename: freerangerouting --> frrouting

Signed-off-by: Lou Berger <lberger@labn.net>
8 years agoRename: FreeRangeRouting FRRouting
Lou Berger [Thu, 30 Mar 2017 18:22:35 +0000 (14:22 -0400)]
Rename: FreeRangeRouting FRRouting

Signed-off-by: Lou Berger <lberger@labn.net>
8 years agoMerge pull request #297 from opensourcerouting/ldpd-openbsd
Donald Sharp [Thu, 30 Mar 2017 11:23:59 +0000 (06:23 -0500)]
Merge pull request #297 from opensourcerouting/ldpd-openbsd

Add support for MPLSv6 in OpenBSD + minor fixes

8 years agoMerge pull request #296 from opensourcerouting/ldpd-sighup
Donald Sharp [Thu, 30 Mar 2017 11:18:25 +0000 (06:18 -0500)]
Merge pull request #296 from opensourcerouting/ldpd-sighup

ldpd: do a full configuration reload upon receiving a SIGHUP

8 years agoMerge pull request #299 from opensourcerouting/test-ref-out
Donald Sharp [Thu, 30 Mar 2017 11:14:21 +0000 (06:14 -0500)]
Merge pull request #299 from opensourcerouting/test-ref-out

tests: format TestRefMismatch more readable

8 years agoMerge pull request #298 from opensourcerouting/defaults
Donald Sharp [Thu, 30 Mar 2017 11:13:19 +0000 (06:13 -0500)]
Merge pull request #298 from opensourcerouting/defaults

track version & "defaults" in configs

8 years agonhrpd: add .gitignore 301/head
Quentin Young [Wed, 29 Mar 2017 23:40:55 +0000 (23:40 +0000)]
nhrpd: add .gitignore

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: sandbox: print vtysh daemon targets
David Lamparter [Wed, 22 Mar 2017 09:45:51 +0000 (10:45 +0100)]
lib: sandbox: print vtysh daemon targets

This is very useful to check whether a command disappeared from a
specific daemon (by comparing against an earlier output of
"grammar find-ambiguous printall nodescan")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agovtysh: parsing fixes on distribute-list
David Lamparter [Wed, 22 Mar 2017 09:22:14 +0000 (10:22 +0100)]
vtysh: parsing fixes on distribute-list

The vtysh preprocessing stuff doesn't like the first argument to
install_element() being something other than a _NODE constant, and the
comment hack wasn't cutting it... just expand this.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agovtysh: remove ignore list
David Lamparter [Wed, 22 Mar 2017 09:39:06 +0000 (10:39 +0100)]
vtysh: remove ignore list

With DEFUN_NOSH in place everywhere, this is useless.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: apply DEFUN_NOSH for node-switch CLI commands
David Lamparter [Wed, 22 Mar 2017 09:38:22 +0000 (10:38 +0100)]
*: apply DEFUN_NOSH for node-switch CLI commands

These have copies in vtysh that do the node-switch locally and are
listed in extract.pl's ignore list.  The ignore list however is
redundant since DEFUN_NOSH does the same thing...

ldpd is a bit hacky, but Renato is reworking this anyway.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: track version & "defaults" in configs 298/head
David Lamparter [Thu, 9 Mar 2017 18:00:19 +0000 (19:00 +0100)]
*: track version & "defaults" in configs

[CF]: Move default name to autoconf and update tests

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agotests: format TestRefMismatch more readable 299/head
Christian Franke [Tue, 28 Mar 2017 16:23:47 +0000 (18:23 +0200)]
tests: format TestRefMismatch more readable

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agodoc: minor tweaks in the build instructions 297/head
Renato Westphal [Tue, 28 Mar 2017 00:39:27 +0000 (21:39 -0300)]
doc: minor tweaks in the build instructions

* ldpd is built by default in all platforms, it's not necessary to
  provide --enable-ldpd anymore;
* Remove comment about ldpd not being tested on OpenBSD, it works very
  well on this platform;
* Provide instructions to enable MPLS forwarding in OpenBSD.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agozebra-mpls: replace legacy bzero by memset
Renato Westphal [Tue, 28 Mar 2017 00:17:37 +0000 (21:17 -0300)]
zebra-mpls: replace legacy bzero by memset

bzero() was deprecated in POSIX.1-2001 and removed in POSIX.1-2008 in
deference to memset().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agozebra-mpls: add support for MPLSv6 in OpenBSD
Renato Westphal [Tue, 28 Mar 2017 00:13:29 +0000 (21:13 -0300)]
zebra-mpls: add support for MPLSv6 in OpenBSD

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>