]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
8 years agobuild: fix several ldpd XML-CLI build issues 82/head
David Lamparter [Fri, 13 Jan 2017 14:31:04 +0000 (15:31 +0100)]
build: fix several ldpd XML-CLI build issues

- the location of ldp_vty_cmds.c can be either in srcdir or builddir,
  depending on whether a premade file from a dist tarball is used
- perl libxml support is only needed if that file is absent
- the actual perl script wasn't even included in the dist tarball
- the include location doesn't work when srcdir != builddir

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge pull request #68 from donaldsharp/cleanup
Olivier Dugeon [Mon, 16 Jan 2017 14:12:55 +0000 (15:12 +0100)]
Merge pull request #68 from donaldsharp/cleanup

Cleanup

8 years agozebra: Some code cleanup based upon Review. 68/head
Donald Sharp [Mon, 16 Jan 2017 13:57:20 +0000 (08:57 -0500)]
zebra: Some code cleanup based upon Review.

Cleanup 2 spots in the code:
1) In if_netlink.c -> combine multi-line if statement into 1 line
2) In zebra_ptm.c -> only handle code that needs to be inside the if statement
in the if statement.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #70 from pguibert6WIND/frr_6wind_vpnv6_2
Donald Sharp [Sat, 14 Jan 2017 00:23:47 +0000 (19:23 -0500)]
Merge pull request #70 from pguibert6WIND/frr_6wind_vpnv6_2

VPNv6 Improvements ( version 2)

8 years agoMerge branch 'master' into cleanup
Donald Sharp [Fri, 13 Jan 2017 19:48:16 +0000 (14:48 -0500)]
Merge branch 'master' into cleanup

8 years agobgpd: Remove missed HAVE_IPV6
Donald Sharp [Fri, 13 Jan 2017 19:32:02 +0000 (14:32 -0500)]
bgpd: Remove missed HAVE_IPV6

Not sure how I missed this :(

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fixup paranthesis mistake
Donald Sharp [Fri, 13 Jan 2017 17:46:58 +0000 (12:46 -0500)]
zebra: Fixup paranthesis mistake

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge branch 'stable/2.0-for-merge'
David Lamparter [Fri, 13 Jan 2017 14:24:25 +0000 (15:24 +0100)]
Merge branch 'stable/2.0-for-merge'

Conflicts (CLI vs. atol()):
- bgpd/bgp_vty.c
- ospfd/ospf_vty.c
- zebra/zebra_vty.c

NB: pull req #65 (LabNConsulting/working/2.0/afi-safi-vty/c) was
excluded from this merge.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agopartial merge: revert "LabNConsulting/working/2.0/afi-safi-vty/c"
David Lamparter [Fri, 13 Jan 2017 14:10:05 +0000 (15:10 +0100)]
partial merge: revert "LabNConsulting/working/2.0/afi-safi-vty/c"

Unfortunately, the CLI changes need to be redone on master since the CLI
has massively changed there.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd: remove one extra help handler from show bgp mpls commands 70/head
Philippe Guibert [Fri, 13 Jan 2017 13:29:20 +0000 (14:29 +0100)]
bgpd: remove one extra help handler from show bgp mpls commands

This commit fixes the help display of show bgp mpls commands, since
the last change introduced a problem in relation with help handlers.

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

8 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]

8 years agoMerge pull request #63 from qlyoung/fix-vty-buffer
David Lamparter [Fri, 13 Jan 2017 13:33:50 +0000 (14:33 +0100)]
Merge pull request #63 from qlyoung/fix-vty-buffer

lib: limit size of vty buffer to 4096 bytes

8 years agoMerge pull request #69 from opensourcerouting/queue/indent-watchfrr
Donald Sharp [Fri, 13 Jan 2017 13:21:42 +0000 (08:21 -0500)]
Merge pull request #69 from opensourcerouting/queue/indent-watchfrr

watchfrr: indent to Linux CodingStyle

8 years agobgpd: merge vpnvx network [route-map] command
Philippe Guibert [Mon, 9 Jan 2017 18:29:43 +0000 (19:29 +0100)]
bgpd: merge vpnvx network [route-map] command

This commit merges two vty command into one single vty command

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8 years agobgpd: add some show commands for vpnv6
Philippe Guibert [Sun, 8 Jan 2017 17:09:04 +0000 (18:09 +0100)]
bgpd: add some show commands for vpnv6

Some show commands are added for handling vpnv6.
As the commands was present for vpnv4, but not vpnv6, the handler
routine for vty vpnv4 have been extended for vpnv6.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8 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>
8 years agobgpd: add network command for vpnv6 address family
Liu Xiaofeng [Mon, 19 Dec 2016 09:53:38 +0000 (10:53 +0100)]
bgpd: add network command for vpnv6 address family

Add the next commands:

    network X:X::X:X/M rd ASN:nn_or_IP-address:nn tag WORD [route-map WORD]
    no network X:X::X:X/M rd ASN:nn_or_IP-address:nn tag WORD

Also, fix show running-config for vpnv6 network, as well as modiying
bgp_static_set_safi, and take into account matching afi table.

Signed-off-by: Liu Xiaofeng <xiaofeng.liu@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8 years agowatchfrr: indent to Linux CodingStyle 69/head
David Lamparter [Fri, 13 Jan 2017 13:10:00 +0000 (14:10 +0100)]
watchfrr: indent to Linux CodingStyle

before this patch, watchfrr was using an inconsistent style that matched
neither GNU nor Linux kernel nor BSD style.  Reindent to Linux kernel
style, which should be pretty close to pimd & ldpd.

indent (2.2.11) options used:
 -nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4
 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -nprs -npsl -sai
 -saf -saw -ncs -nsc -sob -nfca -cp33 -ss -ts8 -il1

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agofrr: Remove HAVE_LIBM from the system
Donald Sharp [Fri, 13 Jan 2017 13:02:50 +0000 (08:02 -0500)]
frr: Remove HAVE_LIBM from the system

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agofrr: Remove HAVE_IPV6 from code base
Donald Sharp [Fri, 13 Jan 2017 12:57:57 +0000 (07:57 -0500)]
frr: Remove HAVE_IPV6 from code base

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agotests: fix mis-fixed format string 67/head
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]

8 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

8 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]

8 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>
8 years agoapply rename to readme.md
Quentin Young [Thu, 12 Jan 2017 18:10:48 +0000 (13:10 -0500)]
apply rename to readme.md

8 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)

8 years agoMerge pull request #66 from pguibert6WIND/frr_6wind_afisafi_iana_1
Donald Sharp [Thu, 12 Jan 2017 17:53:00 +0000 (12:53 -0500)]
Merge pull request #66 from pguibert6WIND/frr_6wind_afisafi_iana_1

Quagga: AFI/SAFI mappings IANA to/from internal values

8 years agobgpd: convert 'show_ip_bgp_vpnv4' to afi/safi form (Issue #61) 65/head
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)

8 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>
8 years agoQuagga: AFI/SAFI mappings IANA to/from internal values 66/head
vivek [Wed, 15 Jun 2016 17:25:35 +0000 (10:25 -0700)]
Quagga: AFI/SAFI mappings IANA to/from internal values

Introduce internal and IANA defintions for AFI/SAFI and mapping
functions and modify code to use these. This refactoring will
facilitate adding support for other AFI/SAFI whose IANA values
won't be suitable for internal data structure definitions (e.g.,
they are not contiguous).
The commit adds some fixes related to afi/safi testing with 'make check
' command.

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-11416
Reviewed By: CCR-3594 (mpls branch)
Testing Done: Not tested now, tested earlier on mpls branch

8 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>
8 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>
8 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>
8 years agoMerge remote-tracking branch 'origin/develop'
Donald Sharp [Wed, 11 Jan 2017 13:25:17 +0000 (08:25 -0500)]
Merge remote-tracking branch 'origin/develop'

8 years agolib: limit size of vty buffer to 4096 bytes 63/head
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>
8 years agoMerge pull request #58 from opensourcerouting/libxml-check
Donald Sharp [Mon, 9 Jan 2017 15:45:49 +0000 (10:45 -0500)]
Merge pull request #58 from opensourcerouting/libxml-check

build: check if the LibXML perl module is available

8 years agobuild: check if the LibXML perl module is available 58/head
Renato Westphal [Mon, 9 Jan 2017 14:35:57 +0000 (12:35 -0200)]
build: check if the LibXML perl module is available

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 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

8 years agoMerge pull request #55 from donaldsharp/monotonic
Olivier Dugeon [Mon, 9 Jan 2017 14:26:16 +0000 (15:26 +0100)]
Merge pull request #55 from donaldsharp/monotonic

Monotonic

8 years agoMerge pull request #56 from qlyoung/if-metric
Olivier Dugeon [Mon, 9 Jan 2017 14:25:40 +0000 (15:25 +0100)]
Merge pull request #56 from qlyoung/if-metric

lib: make interface metric a uint32_t

8 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

8 years agoredhat: update .gitignore
Quentin Young [Mon, 9 Jan 2017 02:36:53 +0000 (02:36 +0000)]
redhat: update .gitignore

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: make interface metric a uint32_t 56/head
Quentin Young [Mon, 9 Jan 2017 01:35:41 +0000 (01:35 +0000)]
lib: make interface metric a uint32_t

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: Remove knowledge of HAVE_CLOCK_MONTONIC 55/head
Donald Sharp [Sun, 8 Jan 2017 00:23:50 +0000 (19:23 -0500)]
bgpd: Remove knowledge of HAVE_CLOCK_MONTONIC

thread.c fails to build properly on systems that do
not have a CLOCK_MONOTONIC.  Therefore there is
no need for bgp to have knowledge of it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove knowledge of HAVE_CLOCK_MONOTONIC
Donald Sharp [Sun, 8 Jan 2017 00:21:21 +0000 (19:21 -0500)]
pimd: Remove knowledge of HAVE_CLOCK_MONOTONIC

thread.c fails to build if we do not have CLOCK_MONOTONIC
no need to have pim have any knowledge of it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #54 from LabNConsulting/working/master/afi-safi-vty/a
Donald Sharp [Sat, 7 Jan 2017 22:14:27 +0000 (17:14 -0500)]
Merge pull request #54 from LabNConsulting/working/master/afi-safi-vty/a

Working/master/afi safi vty/a

8 years agobgpd: fixup safi as afi confusion in show update-groups 54/head
Lou Berger [Sat, 7 Jan 2017 18:41:33 +0000 (13:41 -0500)]
bgpd: fixup safi as afi confusion in show update-groups

8 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)

8 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

8 years agoMerge pull request #10 from qlyoung/fix-proto_redistnum
Donald Sharp [Sat, 7 Jan 2017 00:46:41 +0000 (19:46 -0500)]
Merge pull request #10 from qlyoung/fix-proto_redistnum

all: use ->text when parsing protocol argument

8 years agoMerge branch 'master' into fix-proto_redistnum 10/head
Quentin Young [Sat, 7 Jan 2017 00:44:46 +0000 (19:44 -0500)]
Merge branch 'master' into fix-proto_redistnum

8 years agoMerge pull request #35 from qlyoung/fix-zebra-rf
Donald Sharp [Sat, 7 Jan 2017 00:42:09 +0000 (19:42 -0500)]
Merge pull request #35 from qlyoung/fix-zebra-rf

zebra: check route flags when deciding whether to update existing route

8 years agoMerge pull request #32 from qlyoung/fix-cli-nits2
Donald Sharp [Sat, 7 Jan 2017 00:38:28 +0000 (19:38 -0500)]
Merge pull request #32 from qlyoung/fix-cli-nits2

bgpd, ospfd, zebra: remove duplicate cli installs

8 years agoMerge pull request #30 from qlyoung/fix-cli-nits
Donald Sharp [Sat, 7 Jan 2017 00:37:28 +0000 (19:37 -0500)]
Merge pull request #30 from qlyoung/fix-cli-nits

vtysh: add `logical-router ...` to extract.pl ignore list

8 years agoMerge pull request #27 from qlyoung/fix-derefs2
Donald Sharp [Sat, 7 Jan 2017 00:36:59 +0000 (19:36 -0500)]
Merge pull request #27 from qlyoung/fix-derefs2

bgpd, lib: fix a few scan-build catches

8 years agoMerge pull request #24 from qlyoung/fix-uninitialized-jump
Donald Sharp [Sat, 7 Jan 2017 00:34:09 +0000 (19:34 -0500)]
Merge pull request #24 from qlyoung/fix-uninitialized-jump

lib: Initialize ->allowrepeat

8 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

8 years agoisisd: clean up own LSPs correctly on update 53/head
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>
8 years agoMerge pull request #40 from opensourcerouting/ldpd-ordered-output
Donald Sharp [Fri, 6 Jan 2017 19:01:23 +0000 (14:01 -0500)]
Merge pull request #40 from opensourcerouting/ldpd-ordered-output

ldpd ordered output - fixes issue#18

8 years agoMerge pull request #39 from opensourcerouting/renato-assorted-fixes
Donald Sharp [Fri, 6 Jan 2017 19:00:29 +0000 (14:00 -0500)]
Merge pull request #39 from opensourcerouting/renato-assorted-fixes

Renato's assorted patches

8 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Fri, 6 Jan 2017 17:48:32 +0000 (12:48 -0500)]
Merge remote-tracking branch 'origin/stable/2.0'

8 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

8 years agozebra: Allow tag values greater than 2 billion on arm 51/head
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>
8 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>
8 years agoconfigure.ac: rename red hat spec from quagga.spec to frr.spec 50/head
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>
8 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>
8 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>
8 years agoMerge pull request #49 from pguibert6WIND/frr_6wind_mpbgpgracefulrestart_2
Donald Sharp [Fri, 6 Jan 2017 15:22:11 +0000 (10:22 -0500)]
Merge pull request #49 from pguibert6WIND/frr_6wind_mpbgpgracefulrestart_2

Graceful Restart Route Preservation

8 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Fri, 6 Jan 2017 14:58:21 +0000 (09:58 -0500)]
Merge remote-tracking branch 'origin/stable/2.0'

8 years agobgpd: configure preserve forwarding state from vty 49/head
Julien Courtat [Tue, 17 May 2016 14:26:22 +0000 (16:26 +0200)]
bgpd: configure preserve forwarding state from vty

Preserve forwarding state bit can be set in OPEN message with the use of
new vty commands
bgp graceful-restart preserve-fw-state
no bgp graceful-restart preserve-fw-state

This must be set before activating the connection to a peer, since it is
for forging graceful restart capability of OPEN messages.

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
8 years agobgpd: enable send of Graceful Restart Preserve State F bit
Julien Courtat [Fri, 20 May 2016 10:10:07 +0000 (12:10 +0200)]
bgpd: enable send of Graceful Restart Preserve State F bit

Enhance struct bgp to add a new flag BGP_FLAG_GR_PRESERVE_FWD, which
allow to set the Preserve State F bit of Graceful Restart capability in
OPEN messages.

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
8 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)

8 years agoospfd: Stop attempt to read beyond end of argv 47/head
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>
8 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>
8 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

8 years agoisisd: don't generate LSPs with LSP-ID zero on is-type change 45/head
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>
8 years agoMerge pull request #43 from pguibert6WIND/frr_6wind_mpbgpgracefulrestart_1
Donald Sharp [Thu, 5 Jan 2017 12:58:32 +0000 (07:58 -0500)]
Merge pull request #43 from pguibert6WIND/frr_6wind_mpbgpgracefulrestart_1

 VPNv4 Enhancement of Graceful Restart

8 years agoRationalize Link Parameters flags
Olivier Dugeon [Tue, 20 Dec 2016 14:02:34 +0000 (15:02 +0100)]
Rationalize Link Parameters flags

 * lib/if.h: Remove LP_TE as Link Parameters is set if different from 0
See IS_LINK_PARAMS_SET macro and use LP_TE_METRIC to determine if TE metric
is set or not
 * lib/if.c: replace LP_TE by LP_TE_METRIC in default LP status
 * zebra/interface.c: replace LP_TE by LP_TE_METRIC and check if TE metric
is equal to standard metric or not
 * ospfd/ospf_te.c: replace LP_TE by LP_TE_METRIC
 * isisd/isis_te.c: replace LP_TE by LP_TE_METRIC

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
8 years agobgpd: support End-Of-Rib of VPNv4 address family 43/head
Julien Courtat [Fri, 17 Jun 2016 13:31:09 +0000 (15:31 +0200)]
bgpd: support End-Of-Rib of VPNv4 address family

After graceful restart procedure, when BGP speaker has finished to send
its VPNv4 routes to the restarting peer, it also sends End-Of-Rib
message for afi=AFI_IPv4 safi=SAFI_MPLS_VPN.

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
8 years agobgpd: graceful restart for vpnv4 address family
Julien Courtat [Wed, 25 May 2016 15:28:31 +0000 (17:28 +0200)]
bgpd: graceful restart for vpnv4 address family

This patch enable the support of graceful restart for routes sets with
vpnv4 address family format. In this specific case, data model is
slightly different and some additional processing must be done when
accessing bgp tables and nodes.
The clearing stale algorithm takes into account the specificity where
the 2 node level for MPLS has to be reached.

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8 years agolib: remove SAFI_RESERVED_3 and move SAFI_MPLS to that value
Philippe Guibert [Wed, 21 Dec 2016 07:21:02 +0000 (08:21 +0100)]
lib: remove SAFI_RESERVED_3 and move SAFI_MPLS to that value

Because SAFI_RESERVED_3 value is no more used, the SAFI_MPLS value is
lowered to that value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8 years agolib: add SAFI_RESERVED_4 value
Philippe Guibert [Wed, 21 Dec 2016 07:16:06 +0000 (08:16 +0100)]
lib: add SAFI_RESERVED_4 value

This value is used to limit certain feature to the safi values until
that reserved value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8 years agobgpd: set Graceful Restart R bit for vpnv4 address family
Julien Courtat [Fri, 20 May 2016 10:08:28 +0000 (12:08 +0200)]
bgpd: set Graceful Restart R bit for vpnv4 address family

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
8 years agodebian: Convert Quagga -> Frr 41/head
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>
8 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>
8 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>
8 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>
8 years agoldpd: use red-black trees to store 'adj' elements 40/head
Renato Westphal [Wed, 14 Dec 2016 19:39:28 +0000 (17:39 -0200)]
ldpd: use red-black trees to store 'adj' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: use red-black trees to store 'l2vpn_pw' elements
Renato Westphal [Wed, 14 Dec 2016 15:53:07 +0000 (13:53 -0200)]
ldpd: use red-black trees to store 'l2vpn_pw' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: use red-black trees to store 'l2vpn_if' elements
Renato Westphal [Wed, 14 Dec 2016 14:34:57 +0000 (12:34 -0200)]
ldpd: use red-black trees to store 'l2vpn_if' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: use red-black trees to store 'l2vpn' elements
Renato Westphal [Wed, 14 Dec 2016 12:42:45 +0000 (10:42 -0200)]
ldpd: use red-black trees to store 'l2vpn' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: use red-black trees to store 'nbr_params' elements
Renato Westphal [Wed, 14 Dec 2016 11:14:52 +0000 (09:14 -0200)]
ldpd: use red-black trees to store 'nbr_params' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: use red-black trees to store 'tnbr' elements
Renato Westphal [Tue, 13 Dec 2016 18:19:15 +0000 (16:19 -0200)]
ldpd: use red-black trees to store 'tnbr' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: use red-black trees to store 'iface' elements
Renato Westphal [Tue, 13 Dec 2016 17:29:35 +0000 (15:29 -0200)]
ldpd: use red-black trees to store 'iface' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: use red-black trees to store 'lde_map' elements
Renato Westphal [Sat, 3 Dec 2016 23:14:44 +0000 (21:14 -0200)]
ldpd: use red-black trees to store 'lde_map' elements

Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
    outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).

The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agobuild/ldpd: auto-generate ldp_vty_cmds.c from ldp_vty.xml 39/head
Renato Westphal [Tue, 20 Dec 2016 01:29:49 +0000 (23:29 -0200)]
build/ldpd: auto-generate ldp_vty_cmds.c from ldp_vty.xml

Having ldp_vty_cmds.c around as part of the git repository was being
a major source of confusion. Since this file is auto-generated from
ldp_vty.xml, remove it from this git repository and make it be generated
on demand by adding a make target for it.

This patch adds another dependency to build Quagga, namely the LibXML
Perl module, which can be installed with this command:
$ sudo cpan XML::LibXML

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agotools: teach xml2cli.pl the "[]" notation for optional arguments
Renato Westphal [Mon, 19 Dec 2016 20:30:59 +0000 (18:30 -0200)]
tools: teach xml2cli.pl the "[]" notation for optional arguments

Requested by Daniel Walton.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoospf6d: fix broken indentation in "show ipv6 ospf6 neighbor"
Renato Westphal [Mon, 19 Dec 2016 16:43:25 +0000 (14:43 -0200)]
ospf6d: fix broken indentation in "show ipv6 ospf6 neighbor"

In the State/IfState column, we were reserving only 6 characters to
print the state of each neighbor, but this is not enough for cases like
"Loading" (7 characters) and "ExChange" (8 characters). Increase the
width of this field to 8 to fix the broken indendation.

ospf6d's output before this patch:
ubuntu# show ipv6 ospf6 neighbor
Neighbor ID     Pri    DeadTime  State/IfState         Duration I/F[State]
2.2.2.2           1    00:00:35 ExChange/DR              00:01:15 rt1-eth0[BDR]
3.3.3.3           1    00:00:35 Loading/DR              00:01:15 rt1-eth1[BDR]
4.4.4.4           1    00:00:35   Full/DR              00:01:15 rt1-eth2[BDR]
5.5.5.5           1    00:00:35   None/DR              00:01:10 rt1-eth3[BDR]
6.6.6.6           1    00:00:35   Down/DR              00:01:15 rt1-eth4[BDR]
7.7.7.7           1    00:00:35 Attempt/DR              00:01:15 rt1-eth5[BDR]
8.8.8.8           1    00:00:35   Init/DR              00:01:10 rt1-eth6[BDR]
9.9.9.9           1    00:00:35 Twoway/DR              00:01:14 rt1-eth7[BDR]
10.10.10.10       1    00:00:35 ExStart/DR              00:01:10 rt1-eth8[BDR]

ospf6d's output with this patch:
ubuntu# show ipv6 ospf6 neighbor
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
2.2.2.2           1    00:00:36 ExChange/DR              00:00:44 rt1-eth0[BDR]
3.3.3.3           1    00:00:36  Loading/DR              00:00:39 rt1-eth1[BDR]
4.4.4.4           1    00:00:35     Full/DR              00:00:39 rt1-eth2[BDR]
5.5.5.5           1    00:00:36     None/DR              00:00:44 rt1-eth3[BDR]
6.6.6.6           1    00:00:36     Down/DR              00:00:39 rt1-eth4[BDR]
7.7.7.7           1    00:00:36  Attempt/DR              00:00:39 rt1-eth5[BDR]
8.8.8.8           1    00:00:36     Init/DR              00:00:39 rt1-eth6[BDR]
9.9.9.9           1    00:00:35   Twoway/DR              00:00:40 rt1-eth7[BDR]
10.10.10.10       1    00:00:36  ExStart/DR              00:00:39 rt1-eth8[BDR]

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: add missing privilege dropping on error path
Renato Westphal [Mon, 19 Dec 2016 16:07:28 +0000 (14:07 -0200)]
ldpd: add missing privilege dropping on error path

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