]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agobgpd: fix nexthop comparison for nexthop vpnv6 attribute
Philippe Guibert [Fri, 6 Jan 2017 12:35:40 +0000 (13:35 +0100)]
bgpd: fix nexthop comparison for nexthop vpnv6 attribute

As nexthop attribute for vpnv6 also contains a blank RD and a blank tag,
the IPv6 address length increases from 16 to 24 bytes. The same was
observed for vpnv4 nexthop, but was missing for VPNv6.
The same is done for martian nexthop debugging.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agoMerge pull request #67 from opensourcerouting/stable-test-fixes
Donald Sharp [Fri, 13 Jan 2017 13:51:14 +0000 (08:51 -0500)]
Merge pull request #67 from opensourcerouting/stable-test-fixes

stable/2.0 test fixes

7 years agolib: limit size of vty buffer to 4096 bytes
Quentin Young [Tue, 10 Jan 2017 23:33:50 +0000 (23:33 +0000)]
lib: limit size of vty buffer to 4096 bytes

This removes the automatic resizing of the vty input buffer and places a
hard size cap of 4096 bytes. It also fixes a potentially unsafe strcpy.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
[cherry-picked from master 2af38873d89e20bd039255418366c1601aa99e64]

7 years agotests: fix mis-fixed format string
David Lamparter [Thu, 15 Dec 2016 23:14:55 +0000 (00:14 +0100)]
tests: fix mis-fixed format string

PRIu64 is "u", we need "x", so PRIx64...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Cc: Donald Sharp <sharpd@cumulusnetworks.com>
[cherry-picked from master eed831e065694b3746896b126f6ad47548ea9dc0]

7 years agoMerge pull request #38 from donaldsharp/stable_ospf6_fix
David Lamparter [Fri, 13 Jan 2017 10:32:17 +0000 (11:32 +0100)]
Merge pull request #38 from donaldsharp/stable_ospf6_fix

ospf6d: resolve problem with area range lsid creation

7 years agotests: fix exit <> return mix-up in dejagnu
David Lamparter [Thu, 15 Dec 2016 23:09:46 +0000 (00:09 +0100)]
tests: fix exit <> return mix-up in dejagnu

exit 0 exits the entire testrunner... Oops.
Also, "unresolved" breaks too many things, so make this a pass.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
[cherry-picked from master e988dfd35b0d9df437ac043a613472437c8842e6]

7 years agotests: ignore stderr for expect
David Lamparter [Fri, 13 Jan 2017 10:23:18 +0000 (11:23 +0100)]
tests: ignore stderr for expect

expect redirects both stdout and stderr to its input.  This causes
serious problems when libzebra prints log messages to stderr, which are
then asynchronously inserted in the middle of lines of stdout test
output.  Ultimately this makes testbgpmpattr fail on FreeBSD.

(The stdio buffering seems to be slightly different on FreeBSD,
triggering the bug.)

Just ignore stderr for expect.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #65 from LabNConsulting/working/2.0/afi-safi-vty/c
Donald Sharp [Thu, 12 Jan 2017 17:54:30 +0000 (12:54 -0500)]
Merge pull request #65 from LabNConsulting/working/2.0/afi-safi-vty/c

Updated: stable/2.0 pull to pick up bgp afi/safi vty changes (Issues #14 and #61)

7 years agobgpd: convert 'show_ip_bgp_vpnv4' to afi/safi form (Issue #61)
Lou Berger [Thu, 12 Jan 2017 14:36:24 +0000 (09:36 -0500)]
bgpd: convert 'show_ip_bgp_vpnv4' to afi/safi form (Issue #61)

7 years agobgpd: remove code contained by ifdef KEEP_OLD_VPNV4_COMMANDS
Lou Berger [Thu, 12 Jan 2017 13:54:22 +0000 (08:54 -0500)]
bgpd: remove code contained by ifdef KEEP_OLD_VPNV4_COMMANDS

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgpd: conditionally compile out old vpnv4 syntax (Issue #61)
Lou Berger [Tue, 10 Jan 2017 20:53:03 +0000 (15:53 -0500)]
bgpd: conditionally compile out old vpnv4 syntax (Issue #61)
      (under ifdef KEEP_OLD_VPNV4_COMMANDS)

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgpd: restore wildcard handling in show summary (Issue#14)
Lou Berger [Fri, 6 Jan 2017 23:25:56 +0000 (18:25 -0500)]
bgpd: restore wildcard handling in show summary (Issue#14)
      Includes more branch specific afi/safi changes

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgpd: restore some missing afi/safi commands (Issue #14)
Lou Berger [Fri, 6 Jan 2017 15:50:31 +0000 (10:50 -0500)]
bgpd: restore some missing afi/safi commands (Issue #14)
      Added defines and parse utility functions
      Fix vty code that treated vpn&encap as AFIs
      and some other related vty printing/handline issues
      Note: Includes branch specific changes (due to new parser)

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoMerge pull request #51 from donaldsharp/atol_borked
Olivier Dugeon [Mon, 9 Jan 2017 14:26:41 +0000 (15:26 +0100)]
Merge pull request #51 from donaldsharp/atol_borked

Atol borked

7 years agoMerge pull request #47 from donaldsharp/valgrind
Donald Sharp [Mon, 9 Jan 2017 14:17:17 +0000 (09:17 -0500)]
Merge pull request #47 from donaldsharp/valgrind

Valgrind

7 years agoMerge pull request #53 from opensourcerouting/fixes/isis-for-stable
Donald Sharp [Fri, 6 Jan 2017 20:13:43 +0000 (15:13 -0500)]
Merge pull request #53 from opensourcerouting/fixes/isis-for-stable

isisd: clean up own LSPs correctly on update

7 years agoisisd: clean up own LSPs correctly on update
Christian Franke [Fri, 6 Jan 2017 19:19:40 +0000 (20:19 +0100)]
isisd: clean up own LSPs correctly on update

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoMerge pull request #50 from mwinter-osr/redhat-pkg-rename
Donald Sharp [Fri, 6 Jan 2017 17:41:43 +0000 (12:41 -0500)]
Merge pull request #50 from mwinter-osr/redhat-pkg-rename

Redhat pkg rename

7 years agozebra: Allow tag values greater than 2 billion on arm
Donald Sharp [Fri, 6 Jan 2017 17:25:55 +0000 (12:25 -0500)]
zebra: Allow tag values greater than 2 billion on arm

Due to the usage of atol, values that are larger than
2 billion on arm for tag are not converted correctly.

Ticket: CM-14099
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Allow 'neighbor X local-as Y' to have large values
Donald Sharp [Fri, 6 Jan 2017 17:24:03 +0000 (12:24 -0500)]
bgpd: Allow 'neighbor X local-as Y' to have large values

On ARM platforms specifying a local-as greater than
2 billion causes issues due to atoi usage.

Ticket: CM-14019
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoconfigure.ac: rename red hat spec from quagga.spec to frr.spec
Martin Winter [Fri, 6 Jan 2017 17:12:16 +0000 (00:12 +0700)]
configure.ac: rename red hat spec from quagga.spec to frr.spec

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agocumulus files: Rename Project from Quagga to FRR
Martin Winter [Fri, 6 Jan 2017 17:10:57 +0000 (00:10 +0700)]
cumulus files: Rename Project from Quagga to FRR

Default files used by redhat package scripts

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: rename project from Quagga to FRR
Martin Winter [Fri, 6 Jan 2017 16:45:13 +0000 (23:45 +0700)]
redhat: rename project from Quagga to FRR

Rename all instances of Quagga to FRR in red hat package files

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoMerge pull request #41 from donaldsharp/quagga_to_frr
Martin Winter [Fri, 6 Jan 2017 13:07:41 +0000 (20:07 +0700)]
Merge pull request #41 from donaldsharp/quagga_to_frr

Quagga to frr - Rename of Quagga to FRR (FreeRangeRouting)

7 years agoospfd: Stop attempt to read beyond end of argv
Donald Sharp [Thu, 5 Jan 2017 17:52:18 +0000 (12:52 -0500)]
ospfd: Stop attempt to read beyond end of argv

When unconfiguring certain commands in ospf, you can
run into situations where we attempt to read beyond
the end of a argv[] vector created.  On certain platforms
this will crash it.

Ticket: CM-14090
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Stop potential uninitialized memory access
Donald Sharp [Thu, 5 Jan 2017 17:44:23 +0000 (12:44 -0500)]
lib: Stop potential uninitialized memory access

VRF_UNKNOWN = MAX_INT16_T

The vrf macros to determine where in the bitmap something belongs
assume that the valid values of a vrf are 0 - (MAX_INT16 - 1)
so when they attempt to determine where to look in the bitmap
for VRF_DEFAULT, we can get invalid reads of memory.

This happens because bgp can create vrf's with VRF_UNKNOWN
when we get configuration for a vrf before we've been actually
created in zebra.

Ticket: CM-14090
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #45 from opensourcerouting/fixes/isis-for-stable
Donald Sharp [Fri, 6 Jan 2017 00:32:30 +0000 (19:32 -0500)]
Merge pull request #45 from opensourcerouting/fixes/isis-for-stable

isisd: don't generate LSPs with LSP-ID zero on is-type change

7 years agoisisd: don't generate LSPs with LSP-ID zero on is-type change
Christian Franke [Thu, 5 Jan 2017 19:22:31 +0000 (20:22 +0100)]
isisd: don't generate LSPs with LSP-ID zero on is-type change

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agodebian: Convert Quagga -> Frr
Donald Sharp [Wed, 4 Jan 2017 14:25:20 +0000 (09:25 -0500)]
debian: Convert Quagga -> Frr

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Update ZAPI to version 4 and HEADER_MARKER to 254
Donald Sharp [Wed, 4 Jan 2017 13:03:14 +0000 (08:03 -0500)]
lib: Update ZAPI to version 4 and HEADER_MARKER to 254

Update the ZEBRA_HEADER_MARKER to 254.  This will differentiate
ourselves from Quagga.  Zebra should not listen to people not
properly using the right programs now.

Update the ZAPI version number to 4.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agodoc: Fixup quagga -> frr
Donald Sharp [Wed, 4 Jan 2017 12:53:30 +0000 (07:53 -0500)]
doc: Fixup quagga -> frr

Modify the documentation so that it talks about FRR instead of Quagga.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agowatchfrr: Rename watchquagga -> watchfrr
Donald Sharp [Wed, 4 Jan 2017 01:13:02 +0000 (20:13 -0500)]
watchfrr: Rename watchquagga -> watchfrr

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospf6d: resolve problem with area range lsid creation
Don Slice [Fri, 16 Dec 2016 16:53:30 +0000 (08:53 -0800)]
ospf6d: resolve problem with area range lsid creation

The problem reported was that routers downstream from the ABR would have
prefixes in the IPv6 rib that should have been summarized.  Testing showed
that the prefixes were absent in the lsdb but not removed from the rib.

The problem (and others) stemmed from determining the link-state id to use
for the area-range statement only from other entries in the range-table. Since
the area range statement creates inter-prefix LSAs (summaries) which are in all
aspects identical to other inter-prefix LSAs, the number space for the lsid
needs to be unique across all inter-prefix LSAs, not just unique between area
range statements.  This fix removes the use of range-table specific lsids and
acquires the lsid just as any other inter-prefix LSA.

Ticket: CM-13626
Signed-off-by: Don Slice
Reviewed By: CCR-5489
Testing Done: Manual testing, repeated runs of the test that previously failed,
ospf-smoke

7 years agoMerge pull request #37 from LabNConsulting/working/2.0/patch-set-170102a
David Lamparter [Tue, 3 Jan 2017 15:44:44 +0000 (16:44 +0100)]
Merge pull request #37 from LabNConsulting/working/2.0/patch-set-170102a

Working/2.0/patch set 170102a

7 years agoMerge pull request #28 from opensourcerouting/dev/osr/rename-part1
Donald Sharp [Tue, 3 Jan 2017 15:44:11 +0000 (10:44 -0500)]
Merge pull request #28 from opensourcerouting/dev/osr/rename-part1

rename, part1

7 years agolib: Partial Revert of 4ecc09d and modify zclient connect behavior
Donald Sharp [Mon, 12 Dec 2016 12:59:16 +0000 (07:59 -0500)]
lib: Partial Revert of 4ecc09d and modify zclient connect behavior

Commit 43cc09d has been shown to cause several issues with clients
connecting.

Partial revert, since I wanted to keep the debug logs added
for that commit, as well remove the piece of code that
stops attempting to connect to zebra.  If we've failed
a bunch of times, there is nothing wrong with continuing
to do so once every 60 seconds.  I've debug guarded
the connect failure for those people running bgp
without zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobgpd: fix ecommunity hash related leak
Lou Berger [Fri, 30 Dec 2016 21:48:29 +0000 (16:48 -0500)]
bgpd: fix ecommunity hash related leak

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgp: Use intern/unintern for encap to fix valgrind identified memory leak
Lou Berger [Sat, 17 Dec 2016 22:58:33 +0000 (17:58 -0500)]
bgp: Use intern/unintern for encap to fix valgrind identified memory leak

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agorfapi: pickup recent changes
Lou Berger [Fri, 4 Nov 2016 13:30:07 +0000 (09:30 -0400)]
rfapi: pickup recent changes
       expose bgp_rfapi_get_group_by_lni_label for use by rfp
       add EVPN Ethernet Tag (VID) RT
       ensure as is init'ed
       fix spelling of information

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgp: first pass at restoring missing vpn&encap show commands (issue#14)
Lou Berger [Sun, 18 Dec 2016 18:45:20 +0000 (13:45 -0500)]
bgp: first pass at restoring missing vpn&encap show commands (issue#14)

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoBGP: deal with vnc related string ambiguities (issue #9)
G. Paul Ziemba [Fri, 4 Nov 2016 16:47:36 +0000 (09:47 -0700)]
BGP: deal with vnc related string ambiguities (issue #9)
    - "redist foo" parsing modified to check for foo==vnc and foo==vnc-direct
      instead of just leading 'v' character
    - string designating ZEBRA_ROUTE_VNC_DIRECT changed from "vpn" to "vnc-direct"
    - route_types.pl parser recognizes 7th field to restrict availability
      of a route type in the redist command to specific daemons
    - restrict "vnc-direct" to bgpd only (doesn't make sense elsewhere)
    - vnc documentation updated to match

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agolib/command.c: fix leak id'ed by valgrind
Lou Berger [Sat, 17 Dec 2016 18:26:03 +0000 (13:26 -0500)]
lib/command.c: fix leak id'ed by valgrind

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgpd: fix unitialized value check id'ed by valgrind
Lou Berger [Sat, 17 Dec 2016 18:20:59 +0000 (13:20 -0500)]
bgpd: fix unitialized value check id'ed by valgrind

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoprefix.c: replace free with XFREE for memory allocated with XMALLOC
Lou Berger [Mon, 7 Nov 2016 12:33:15 +0000 (07:33 -0500)]
prefix.c: replace free with XFREE for memory allocated with XMALLOC

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoMerge pull request #31 from opensourcerouting/freebsd-route-update-fix-for-2.0
David Lamparter [Wed, 28 Dec 2016 14:49:24 +0000 (15:49 +0100)]
Merge pull request #31 from opensourcerouting/freebsd-route-update-fix-for-2.0

Fixes #20

7 years agozebra: remove unused variable
Renato Westphal [Fri, 16 Dec 2016 14:51:07 +0000 (12:51 -0200)]
zebra: remove unused variable

It looks like 'nexthop_fib_num' has been lingering around since 2003
without any use. Remove it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agodoc: add the ldpd vty port to the SERVICES file
Renato Westphal [Thu, 15 Dec 2016 18:24:54 +0000 (16:24 -0200)]
doc: add the ldpd vty port to the SERVICES file

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: fix FIB route updates on *BSD
Renato Westphal [Fri, 16 Dec 2016 12:48:37 +0000 (10:48 -0200)]
zebra: fix FIB route updates on *BSD

On *BSD, we update a route in the FIB by removing the old one and then
installing the new version.

With that said, on kernel_route_rib() we need to provide a pointer to
both the old version and the new version of the route.

We were, however, passing a pointer to the new version to both the
'old' and 'new' parameters. This is not a problem on Linux, which uses
NLM_F_REPLACE to update routes, but it breaks route updates on *BSD
because the 'old' parameter points to a route that is not installed in
the kernel. The kernel_route_rib() function then fails to uninstall the
supposedly 'old' route and can fail to install the new version as well if
the kernel doesn't support ECMP (e.g. FreeBSD with default configuration).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobuild: rename (2 of ?): route_types macros
David Lamparter [Tue, 20 Dec 2016 17:31:42 +0000 (18:31 +0100)]
build: rename (2 of ?): route_types macros

All of the autogenerated macros in lib/route_types.pl are now called
FRR_* instead of QUAGGA_*.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: replace some hardcoding with ./configure
David Lamparter [Tue, 20 Dec 2016 17:10:30 +0000 (18:10 +0100)]
build: replace some hardcoding with ./configure

Several places have paths and names that can change hardcoded, e.g. the
package name and the /var/run path.  This fixes a few of them, there's
still some to do.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: remove INSTALL.quagga.txt
David Lamparter [Tue, 20 Dec 2016 16:59:13 +0000 (17:59 +0100)]
build: remove INSTALL.quagga.txt

It's horribly outdated & wrong info is worse than none.
doc/install.texi should probably be updated instead.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: more renaming in configure.ac
David Lamparter [Wed, 14 Dec 2016 19:22:59 +0000 (20:22 +0100)]
build: more renaming in configure.ac

7 years agobuild: rename (1 of ?): configure.ac + preproc
David Lamparter [Wed, 14 Dec 2016 18:30:44 +0000 (19:30 +0100)]
build: rename (1 of ?): configure.ac + preproc

This replaces Quagga -> FRR in most configure.ac settings as well as
a handful of preprocessor macros in the source code.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agodoc: use config values from configure in manpages
David Lamparter [Wed, 14 Dec 2016 19:22:25 +0000 (20:22 +0100)]
doc: use config values from configure in manpages

This makes the actual change to the manpages to get ./configure effects
applied into them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agodoc: rename manpages to ".in" for autoconf
David Lamparter [Wed, 14 Dec 2016 19:24:34 +0000 (20:24 +0100)]
doc: rename manpages to ".in" for autoconf

The manpages contain references to installation paths and thus should be
preprocessed by ./configure to get the actual paths.

This commit is an exact-rename so the changes for the preprocessing are
easier to review (diffs in renames are hard to read...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: remove $Format tags
David Lamparter [Wed, 14 Dec 2016 18:14:04 +0000 (19:14 +0100)]
build: remove $Format tags

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #8 from donaldsharp/summary
David Lamparter [Tue, 20 Dec 2016 14:31:56 +0000 (15:31 +0100)]
Merge pull request #8 from donaldsharp/summary

bgpd: Fix 'show ip bgp summary' variable output being wrong

7 years agoMerge pull request #7 from donaldsharp/community
David Lamparter [Tue, 20 Dec 2016 14:29:43 +0000 (15:29 +0100)]
Merge pull request #7 from donaldsharp/community

frr: Modify doc to talk about cli

7 years agobgpd: Fix 'show ip bgp summary' variable output being wrong
Donald Sharp [Fri, 16 Dec 2016 02:28:51 +0000 (21:28 -0500)]
bgpd: Fix 'show ip bgp summary' variable output being wrong

The first time through calling 'show ip bgp summary'
we were always calculating the variable hostname field
size incorrectly.

Ticket: CM-13900
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agofrr: Modify doc to talk about cli
Donald Sharp [Fri, 16 Dec 2016 20:35:14 +0000 (15:35 -0500)]
frr: Modify doc to talk about cli

Add some verbiage to the COMMUNITY.md to talk
about the philosophy of what cli should do.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1 from donaldsharp/stable_patches
David Lamparter [Fri, 16 Dec 2016 03:51:12 +0000 (04:51 +0100)]
Merge pull request #1 from donaldsharp/stable_patches

A small collection of patches that fix issues found by valgrind

7 years agobgpd: Fix 'show ip bgp summary' variable output being wrong
Donald Sharp [Fri, 16 Dec 2016 02:28:51 +0000 (21:28 -0500)]
bgpd: Fix 'show ip bgp summary' variable output being wrong

The first time through calling 'show ip bgp summary'
we were always calculating the variable hostname field
size incorrectly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Cleanup double read of free'd data
Donald Sharp [Fri, 16 Dec 2016 01:41:47 +0000 (20:41 -0500)]
bgpd: Cleanup double read of free'd data

Valgrind found this issue.  This cleans it
up from happening.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Ensure ptrs are NULL on free
Donald Sharp [Fri, 16 Dec 2016 01:39:46 +0000 (20:39 -0500)]
lib: Ensure ptrs are NULL on free

There exists a possibility that when we cleanup
for shutdown that we may attempt to access
them again.

Found via valgrind, stopped showing up in there.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgp: Modify output to be a bit clearer
Donald Sharp [Fri, 9 Dec 2016 13:03:13 +0000 (08:03 -0500)]
bgp: Modify output to be a bit clearer

Modify the 'show ip bgp ...' output to be a bit clearer
on what work it did.

Modify:

root@dell-s6000-02 ~/quagga# vtysh -c "show ip bgp"
BGP table version is 7, local router ID is 6.0.0.9
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 6.0.0.5/32 169.254.0.1 0 0 65101 ?
*> 6.0.0.6/32 169.254.0.17 0 0 65101 ?
*> 6.0.0.7/32 169.254.0.33 0 0 65104 ?
*> 6.0.0.8/32 169.254.0.49 0 0 65104 ?
*> 6.0.0.9/32 0.0.0.0 0 32768 ?
*= 6.0.0.10/32 169.254.0.49 0 65104 65200 ?
*=             169.254.0.33 0 65104 65200 ?
*=             169.254.0.17 0 65101 65200 ?
*>             169.254.0.1 0 65101 65200 ?

Displayed 6 out of 9 total prefixes

To

.....

Displayed 6 routes and 9 total paths

Issue #11
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agovtysh: Fix static compilation
Donald Sharp [Wed, 7 Dec 2016 20:28:44 +0000 (15:28 -0500)]
vtysh: Fix static compilation

When compiling vtysh with --enable-static and --disasble-shared
we get linker errors with duplicate function names.

This commit addresses this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit dd2ecdedf88eb612759617ba044e4c29353088de)

7 years agoMerge branch 'fixes/chris-for-stable-2.0' into stable/2.0
David Lamparter [Thu, 8 Dec 2016 14:04:16 +0000 (15:04 +0100)]
Merge branch 'fixes/chris-for-stable-2.0' into stable/2.0

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd/rfp: ignore rfptest binary
Christian Franke [Thu, 8 Dec 2016 12:51:35 +0000 (13:51 +0100)]
bgpd/rfp: ignore rfptest binary

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agolib: fix prefix2str return value and assert
Christian Franke [Mon, 21 Nov 2016 18:39:10 +0000 (19:39 +0100)]
lib: fix prefix2str return value and assert

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoMerge branch '-isisd-simpl' into stable/2.0
David Lamparter [Thu, 8 Dec 2016 11:52:45 +0000 (12:52 +0100)]
Merge branch '-isisd-simpl' into stable/2.0

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd vnc: Add 'debug bgp vnc verbose' target
Lou Berger [Wed, 7 Dec 2016 20:02:55 +0000 (15:02 -0500)]
bgpd vnc: Add 'debug bgp vnc verbose' target

all vnc debug logging is now covered by a 'debug bgp vnc' target

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: always set SO_SNDBUF and SO_RCVBUF using a best effort approach
Renato Westphal [Wed, 7 Dec 2016 15:21:46 +0000 (13:21 -0200)]
*: always set SO_SNDBUF and SO_RCVBUF using a best effort approach

If we fail to set any socket's buffer size, try again with a smaller value
and keep going until it succeeds. This is better than just giving up or,
even worse, abort the creation of a socket (ospf6d and ripd).

Fix broken ospf6d on FreeBSD.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospfd: set the OSPF socket's send buffer size only once
Renato Westphal [Wed, 7 Dec 2016 15:21:45 +0000 (13:21 -0200)]
ospfd: set the OSPF socket's send buffer size only once

This reverts commit b7fe4141, which introduced a logic where the OSPF
send buffer size was dynamically updated to reflect the maximum MTU
of the OSPF enabled interfaces (this was done to make ospfd work with
interfaces configured for jumbo frames).

Since commit a78d75b0, this is not necessary anymore because
ospf_sock_init() now sets the OSPF send buffer size to a very high value
(8MB). Also, the previous logic was broken because it didn't account
for run-time interface MTU changes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoquagga: Remove description of deprecated interfaces
Donald Sharp [Wed, 7 Dec 2016 13:34:39 +0000 (08:34 -0500)]
quagga: Remove description of deprecated interfaces

The deprecated interface section is no longer being used.
Let's remove it from the document.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoquagga: Add Debug Guard section in COMMUNITY.md
Donald Sharp [Wed, 7 Dec 2016 13:34:38 +0000 (08:34 -0500)]
quagga: Add Debug Guard section in COMMUNITY.md

Add verbiage to loosely describe how developers MUST
guard debugs put into their code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoisisd: Remove unnecessary debug
Donald Sharp [Tue, 6 Dec 2016 02:45:06 +0000 (21:45 -0500)]
isisd: Remove unnecessary debug

Remove unnecessary debug from isis write mem.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: number sections in COMMUNITY.md HTML
David Lamparter [Mon, 5 Dec 2016 18:08:00 +0000 (19:08 +0100)]
build: number sections in COMMUNITY.md HTML

adds some CSS to get section numbers.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: remove unused NS_BITMAP MTYPE
David Lamparter [Mon, 5 Dec 2016 15:34:15 +0000 (16:34 +0100)]
lib: remove unused NS_BITMAP MTYPE

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch '-rip' into stable/2.0
David Lamparter [Mon, 5 Dec 2016 15:25:58 +0000 (16:25 +0100)]
Merge branch '-rip' into stable/2.0

This fixes up a lot of RIP/RIPng compliance tests that were still
flagged up.

Tested-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoMerge branch '-renato' into stable/2.0
David Lamparter [Mon, 5 Dec 2016 15:22:16 +0000 (16:22 +0100)]
Merge branch '-renato' into stable/2.0

This contains bgp memory leak fixes as well as cleanups to VRF/namespace
handling and has been run through extended testing in Cumulus' testbed:

Tested-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib, zebra: Minimize display of link-params sub data
Donald Sharp [Thu, 1 Dec 2016 15:49:22 +0000 (10:49 -0500)]
lib, zebra: Minimize display of link-params sub data

When link-params is configured it auto starts displaying
6000-02# conf t
dell-s6000-02(config)# int swp1
dell-s6000-02(config-if)# link-params
dell-s6000-02(config-link-params)# admin-grp 0x12345678
dell-s6000-02(config-link-params)# end
dell-s6000-02# show run

interface swp1
 link-params
  enable
  metric 0              <----Remove the bw lines
  max-bw 1.25e+06
  max-rsv-bw 1.25e+06
  unrsv-bw 0 1.25e+06
  unrsv-bw 1 1.25e+06
  unrsv-bw 2 1.25e+06
  unrsv-bw 3 1.25e+06
  unrsv-bw 4 1.25e+06
  unrsv-bw 5 1.25e+06
  unrsv-bw 6 1.25e+06
  unrsv-bw 7 1.25e+06
  admin-grp 305419896
  exit-link-params
!

I'd like to reduce this to:

interface enp0s3
 ip igmp
 ip pim sm
 link-params
  enable
  admin-grp 0x12345678    <----- Fix this to be what we entered
  exit-link-params
!

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: Remove nexthop for peer only for "real" peer
vivek [Sun, 4 Dec 2016 02:51:49 +0000 (21:51 -0500)]
bgpd: Remove nexthop for peer only for "real" peer

During connection establishment, there is a separate peer structure created
for the doppelganger (for incoming connection). When this is deleted after
the connection has established, take care to ensure that the nexthop entry
for the peer is not deleted.

Fixes: f9164b1d74f6a20d69d7ef10d2e39b4ae7996cbf
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-13875
Reviewed By: None
Testing Done: Manual

(cherry picked from commit 4f2bc892cbddbf36bd5e1b2f36c33260af614b33)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agodoc: update README to mention PIM-SSM and LDP support
Renato Westphal [Sat, 3 Dec 2016 23:35:23 +0000 (21:35 -0200)]
doc: update README to mention PIM-SSM and LDP support

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: Fix 'show ip bgp' to not change it's output
Donald Sharp [Fri, 2 Dec 2016 18:57:04 +0000 (13:57 -0500)]
bgpd: Fix 'show ip bgp' to not change it's output

For unicast routes do not change the output of the 'show ip bgp' command.

This will allow people with existing scripts to continue to work.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: Fix route node unlock when clearing adj-out
vivek [Fri, 2 Dec 2016 13:22:21 +0000 (08:22 -0500)]
bgpd: Fix route node unlock when clearing adj-out

When clearing the adj-out for a subgroup (e.g., upon peer going down),
ensure that the adj-out is removed before unlocking the route node that
it points to, otherwise, there is a possibility that the route node may
be prematurely freed.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-13690
Reviewed By: None
Testing Done: bgp-smoke, resilient-hash tests

(cherry picked from commit c3d7d35f3b7152c9e50e52c3cfd60b0dc52df703)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospfd: Fix json Crash with inactive timer
Donald Sharp [Fri, 2 Dec 2016 13:19:26 +0000 (08:19 -0500)]
ospfd: Fix json Crash with inactive timer

When nbr->t_inactivity is not active, and
you do a show json over the neighbor it
will crash ospfd.  Fix the code so it
prints out -1 when the timer is inactive.

Ticket:CM-13835
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
(cherry picked from commit 78d8fcb9623ab4d9cebf6187a451448e056a84bf)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: replace MIT license with ISC
David Lamparter [Thu, 1 Dec 2016 16:18:57 +0000 (17:18 +0100)]
lib: replace MIT license with ISC

Since other parts (e.g. ldpd) use the ISC license, and the ISC license
is just a simplified form of the MIT license, just move things over and
reduce the number of different licenses we have in use here.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: COMMUNITY.md: add git branch diagram
David Lamparter [Thu, 1 Dec 2016 16:16:24 +0000 (17:16 +0100)]
build: COMMUNITY.md: add git branch diagram

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agozebra: check ZEBRA_IFC_REAL on if_up
Christian Franke [Mon, 7 Nov 2016 12:37:25 +0000 (13:37 +0100)]
zebra: check ZEBRA_IFC_REAL on if_up

Only connected routes which have ZEBRA_IFC_REAL set should
be redistributed.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: fix invalid memory access in peer_free()
Renato Westphal [Mon, 28 Nov 2016 18:47:13 +0000 (16:47 -0200)]
bgpd: fix invalid memory access in peer_free()

We shoult not call bgp_unlock() before calling
bgp_delete_connected_nexthop() in the peer_free() function. Otherwise,
if bgp->lock reaches zero, bgp_free() is called and peer->bgp becomes
an invalid pointer in the bgp_delete_connected_nexthop() function.

To fix this, move the call to bgp_unlock() to the end of peer_free().

Bug exposed by commit 37d361e ("bgpd: plug several memleaks").

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: Fix crashes when no default bgp instance is configured.
Donald Sharp [Thu, 1 Dec 2016 14:11:12 +0000 (09:11 -0500)]
bgpd: Fix crashes when no default bgp instance is configured.

The vnc code assumes that bgp must have a default instance.
This code change checks to make sure that we do before
proceeding.  It makes no assurances that vnc will behave
correctly without a default instance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agopimd: Fix large integer display of drpriority
Donald Sharp [Wed, 30 Nov 2016 13:23:12 +0000 (08:23 -0500)]
pimd: Fix large integer display of drpriority

When displaying drpriority you can enter unsigned
integer values from 1-2^32.  The display was
turning the unsigned value into a signed value
and thus we were displaying the wrong value.

Ticket: CM-13787
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: David Ahern <dsa@cumulusnetworks.com>
(cherry picked from commit db17265f1025e3ec578998ad537c33b49ed33cde)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospfd: Fix memory leak when not using json
Donald Sharp [Wed, 30 Nov 2016 13:23:11 +0000 (08:23 -0500)]
ospfd: Fix memory leak when not using json

When doing a show command under ospf, if
not using json we would have a small memory
leak in show_ip_ospf_common.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 50750712b1ac8364e290c67782eaf371025dc59e)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: drop TODO from redhat/quagga.spec.in
David Lamparter [Tue, 29 Nov 2016 19:31:43 +0000 (20:31 +0100)]
build: drop TODO from redhat/quagga.spec.in

Fixes: 955026c8... "build: ditch outdated documents, including HACKING"
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: fix "show ip bgp" column alignment
Daniel Walton [Tue, 29 Nov 2016 17:47:12 +0000 (12:47 -0500)]
bgpd: fix "show ip bgp" column alignment

The "Weight" column is off:

BGP table version is 0, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, =
multipath,
              i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*> 4.1.1.2/32       9.9.9.2                  0          32768 ?
*> 4.1.1.4/32       9.9.9.2                  0          32768 ?
Displayed  2 out of 2 total prefixes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 65c7395b07e8c592c847d4a1e22fc89ddf448341)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospfd: "ip ospf bfd" removes the "ip ospf bfd 3 250 250" command
Daniel Walton [Tue, 29 Nov 2016 17:47:11 +0000 (12:47 -0500)]
ospfd: "ip ospf bfd" removes the "ip ospf bfd 3 250 250" command

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-13712
(cherry picked from commit 367b138748e894bbfaae36d1cf7c90eafebfebc9)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: improve COMMUNITY.md formatting
David Lamparter [Tue, 29 Nov 2016 09:44:17 +0000 (10:44 +0100)]
build: improve COMMUNITY.md formatting

Add a render_md.py helper to convert it to HTML (needs python "markdown"
module installed).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoisisd: create the isis_circuit_prepare() helper function
Renato Westphal [Mon, 28 Nov 2016 20:55:01 +0000 (18:55 -0200)]
isisd: create the isis_circuit_prepare() helper function

This reduces code duplication and the likelihood of a bug like 186534
("isisd: fix loss of packets after circuit is brought up") to happen
again.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoisisd: use a smaller #ifdef for isis_receive()
Renato Westphal [Mon, 28 Nov 2016 20:35:36 +0000 (18:35 -0200)]
isisd: use a smaller #ifdef for isis_receive()

There's no need to provide two definitions of the isis_receive()
function (one for GNU_LINUX and the other for !GNU_LINUX). Both differ
only slightly so it makes more sense to define isis_receive() just once
and use a smaller #ifdef to account for these differences. This improves
code readability.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobgpd: fix invalid memory access in peer_free()
Renato Westphal [Mon, 28 Nov 2016 17:00:05 +0000 (15:00 -0200)]
bgpd: fix invalid memory access in peer_free()

We shoult not call bgp_unlock() before calling
bgp_delete_connected_nexthop() in the peer_free() function. Otherwise,
if bgp->lock reaches zero, bgp_free() is called and peer->bgp becomes
an invalid pointer in the bgp_delete_connected_nexthop() function.

To fix this, move the call to bgp_unlock() to the end of peer_free().

Bug exposed by commit 37d361e ("bgpd: plug several memleaks").

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