]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
7 years agoAdded config option for valgrind executable 449/head
Daniel Walton [Mon, 8 May 2017 13:28:07 +0000 (13:28 +0000)]
Added config option for valgrind executable

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoAdd valgrind_enable option to /etc/frr/debian.conf
Daniel Walton [Wed, 3 May 2017 13:18:20 +0000 (13:18 +0000)]
Add valgrind_enable option to /etc/frr/debian.conf

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This allows you to start all daemons via valgrind so you can catch
memory leaks, etc.

8 years agoMerge remote-tracking branch 'origin/stable/3.0'
Donald Sharp [Tue, 2 May 2017 19:52:09 +0000 (15:52 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'

8 years agoupdate doc of ubuntu 12.04
Hung-Wei Chiu [Thu, 27 Apr 2017 15:30:56 +0000 (23:30 +0800)]
update doc of ubuntu 12.04

1. modify the prefix to /usr (which is hard-code in /etc/init.d/frr)
2. install init.d related files.

8 years agoUpdate 14.04 docs to support init.d service
Hung-Wei Chiu [Thu, 27 Apr 2017 15:14:23 +0000 (23:14 +0800)]
Update 14.04 docs to support init.d service

1. Configure the prefix to /usr  (frr script hard-code those path in /etc/init.d/frr)
2. Install the service file to /etc/init.d

8 years agoMerge pull request #440 from donaldsharp/afi_safi3
Jafar Al-Gharaibeh [Tue, 2 May 2017 19:20:30 +0000 (14:20 -0500)]
Merge pull request #440 from donaldsharp/afi_safi3

Afi safi3

8 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Tue, 2 May 2017 19:11:46 +0000 (15:11 -0400)]
Merge remote-tracking branch 'origin/stable/2.0'

8 years agoMerge pull request #439 from Jafaral/pim_rpgrp-fix
Donald Sharp [Tue, 2 May 2017 18:31:55 +0000 (14:31 -0400)]
Merge pull request #439 from Jafaral/pim_rpgrp-fix

Fix: reverse logic of when to pass the supplied group address

8 years agoMerge pull request #438 from hwchiu/fix_nhrpd_privs
Donald Sharp [Tue, 2 May 2017 18:20:43 +0000 (14:20 -0400)]
Merge pull request #438 from hwchiu/fix_nhrpd_privs

Fix the error when execute nhrpd

8 years agopimd: Fix cli uplift mistakes 440/head
Donald Sharp [Tue, 2 May 2017 17:55:02 +0000 (13:55 -0400)]
pimd: Fix cli uplift mistakes

When we uplifted the cli from old -> new, I did not properly
handle the switch from <1-3> to (1-3) for number ranges.

Also fix some minor variable renaming that happened?

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoospfd: Fix a variant of the ospf redistribute command
Donald Sharp [Tue, 2 May 2017 13:47:16 +0000 (09:47 -0400)]
ospfd: Fix a variant of the ospf redistribute command

Fix 'redistribute (ospf|table) ....' command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoFix: reverse logic of when to pass the supplied group address 439/head
Jafar Al-Gharaibeh [Tue, 2 May 2017 17:15:06 +0000 (12:15 -0500)]
Fix: reverse logic of when to pass the supplied group address

   This was causing a crash when no group address was passed
   because a garbage pointer valuse was used. It also was ignoring
   the group address when passing one.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
8 years agoMerge pull request #429 from hwchiu/fix_clang_sa
Donald Sharp [Tue, 2 May 2017 15:45:42 +0000 (11:45 -0400)]
Merge pull request #429 from hwchiu/fix_clang_sa

Fix some warnings by clang static analyzer

8 years agoMerge pull request #412 from dwalton76/draft-ietf-idr-bgp-prefix-sid-05
Russ White [Tue, 2 May 2017 15:43:50 +0000 (11:43 -0400)]
Merge pull request #412 from dwalton76/draft-ietf-idr-bgp-prefix-sid-05

Update to draft-ietf-idr-bgp-prefix-sid-05

8 years agoMerge pull request #410 from dslicenc/rdnbrd-vrr
Martin Winter [Tue, 2 May 2017 15:42:38 +0000 (08:42 -0700)]
Merge pull request #410 from dslicenc/rdnbrd-vrr

zebra: fix attempt to install a second rib from imported table entries

8 years agoFix the wrong user/group for nhrpd. 438/head
Hung-Weic Chiu [Tue, 2 May 2017 15:42:31 +0000 (15:42 +0000)]
Fix the wrong user/group for nhrpd.

- Modify the defince from quagga to frr

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
8 years agoMerge pull request #377 from qlyoung/frr-pthreads
Russ White [Tue, 2 May 2017 15:26:20 +0000 (11:26 -0400)]
Merge pull request #377 from qlyoung/frr-pthreads

lib: MT-safe thread.c + add pthread manager

8 years agoMerge pull request #426 from donaldsharp/afi_safi2
Renato Westphal [Tue, 2 May 2017 15:09:18 +0000 (12:09 -0300)]
Merge pull request #426 from donaldsharp/afi_safi2

Afi safi2

8 years agoRevert "Fix the "Use-after-free" of clang SA." 429/head
Hung-Weic Chiu [Tue, 2 May 2017 00:28:41 +0000 (00:28 +0000)]
Revert "Fix the "Use-after-free" of clang SA."

- This's the wrong way to fix this problem.
- Since the "TAILQ_FIRST()" always return diferent pointer as we call "TAILQ_REMOVE()", the clang static analyzer can't detect this behavior.
- Ignore this warning and keep files identical to its original one.

This reverts commit 5d6cc38ca36538583ff4c464c46a7c6de08608b6.

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
8 years agoMerge pull request #431 from opensourcerouting/fix-iface-renames
Donald Sharp [Mon, 1 May 2017 18:17:42 +0000 (14:17 -0400)]
Merge pull request #431 from opensourcerouting/fix-iface-renames

Fix interface renames

8 years agoMerge pull request #432 from opensourcerouting/ldpd-link-detect
Donald Sharp [Mon, 1 May 2017 18:17:14 +0000 (14:17 -0400)]
Merge pull request #432 from opensourcerouting/ldpd-link-detect

ldpd: respect link-detect configuration

8 years agoldpd: respect link-detect configuration 432/head
Renato Westphal [Sun, 30 Apr 2017 23:16:15 +0000 (20:16 -0300)]
ldpd: respect link-detect configuration

We shouldn't check the operational status of an interface in ldpd if
it's configured with "no link-detect" in zebra. That's what all the
other routing daemons do.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: fixes to handle interface renames properly 431/head
Renato Westphal [Sun, 30 Apr 2017 13:26:57 +0000 (10:26 -0300)]
ldpd: fixes to handle interface renames properly

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agozebra: fix detection of interface renames
Renato Westphal [Sun, 30 Apr 2017 13:26:06 +0000 (10:26 -0300)]
zebra: fix detection of interface renames

Restore the original logic in netlink_link_change() which works like this:
* once an interface event is detected, lookup the associated interface
  by its name;
* call the set_ifindex() function;
* set_ifindex() will lookup the interface again but now by its ifindex. If
  the lookups by name and ifindex yield to different results, then the
  interface was renamed and set_ifindex() will take care of that.

In the future, zns->if_table will be split into two different data
structures to allow faster lookups by both name and ifindex.

Fixes Issue #397.

Regression introduced by commit 12f6fb9.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agolib: allow nonblocking thread_fetch() 377/head
Quentin Young [Fri, 28 Apr 2017 22:45:59 +0000 (22:45 +0000)]
lib: allow nonblocking thread_fetch()

This change adds three fields to thread_master and associated code to
use them. The fields are:

 * long selectpoll_timeout

This is a millisecond value that, if nonzero, will override the
internally calculated timeout for select()/poll(). -1 indicates
nonblocking while a positive value indicates the desired timeout in
milliseconds.

 * bool spin

This indicates whether a call to thread_fetch() should result in a loop
until work is available. By default this is set to true, in order to
keep the default behavior. In this case a return value of NULL indicates
that a fatal signal was received in select() or poll(). If it is set to
false, thread_fetch() will return immediately. NULL is then an
acceptable return value if there is no work to be done.

 * bool handle_signals

This indicates whether or not the pthread that owns the thread master
is responsible for handling signals (since this is an MT-unsafe
operation, it is best to have just the root thread do it). It is set to
true by default. Non-root pthreads should set this to false.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoMerge pull request #406 from chiragshah6/pim_dev_3_0
Jafar Al-Gharaibeh [Sun, 30 Apr 2017 22:59:51 +0000 (17:59 -0500)]
Merge pull request #406 from chiragshah6/pim_dev_3_0

Pim dev 3 0

8 years agoMerge pull request #428 from qlyoung/fix-isis-mt
Renato Westphal [Sun, 30 Apr 2017 13:24:05 +0000 (10:24 -0300)]
Merge pull request #428 from qlyoung/fix-isis-mt

isisd: fix uninitialized pointer

8 years agoMerge pull request #430 from opensourcerouting/zebra-vrfdel-fix
Donald Sharp [Sun, 30 Apr 2017 12:57:12 +0000 (08:57 -0400)]
Merge pull request #430 from opensourcerouting/zebra-vrfdel-fix

zebra: fix infinite loop when deleting non-default vrf

8 years agozebra: fix infinite loop when deleting non-default vrf 430/head
Renato Westphal [Sat, 29 Apr 2017 17:15:11 +0000 (14:15 -0300)]
zebra: fix infinite loop when deleting non-default vrf

How to reproduce the bug:
% ip link add vrf-red type vrf table 10
% ip link set dev vrf-red up
% ip rule add oif vrf-red table 10
% ip rule add iif vrf-red table 10
% ip link add name lo1 type dummy
% ip link set dev lo1 up
% ip link set dev lo1 master vrf-red
% ip link del dev vrf-red
(zebra gets stuck in an infinite loop inside work_queue_run())

Regression introduced by commit 5a8dfcd8.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoFix the "Uninitialized argument value" of clang SA.
Hung-Weic Chiu [Sat, 29 Apr 2017 15:34:18 +0000 (15:34 +0000)]
Fix the "Uninitialized argument value" of clang SA.

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
8 years agoFix the "Dead assignment" of clang SA.
Hung-Weic Chiu [Sat, 29 Apr 2017 15:25:32 +0000 (15:25 +0000)]
Fix the "Dead assignment" of clang SA.

- Remove duplicated assignemt.
- Remove unused initialized.

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
8 years agoFix the "Use-after-free" of clang SA.
Hung-Weic Chiu [Sat, 29 Apr 2017 15:02:31 +0000 (15:02 +0000)]
Fix the "Use-after-free" of clang SA.

- Set the pointer to NULL after free it, otherwise the pointer will be accessed again. (since not null)

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
8 years agoFix the memory leak
Hung-Weic Chiu [Sat, 29 Apr 2017 14:20:15 +0000 (14:20 +0000)]
Fix the memory leak

- free the memory for all cases.

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
8 years agoisisd: fix uninitialized pointer 428/head
Quentin Young [Fri, 28 Apr 2017 23:30:59 +0000 (23:30 +0000)]
isisd: fix uninitialized pointer

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: add pthread manager
Quentin Young [Sun, 16 Apr 2017 03:14:36 +0000 (03:14 +0000)]
lib: add pthread manager

Adds infrastructure for keeping track of pthreads.

The general idea is to maintain a daemon-wide table of all pthreads,
running or not. A pthread is associated with its own thread master that
can be used with existing thread.c code, which provides user-space
timers, an event loop, non-blocking I/O callbacks and other facilities.

Each frr_pthread has a unique identifier that can be used to fetch it
from the table. This is to allow naming threads using a macro, for
example:

 #define WRITE_THREAD 0
 #define READ_THREAD  1
 #define WORK_THREAD  2

The idea here is to be relatively flexible with regard to how daemons
manage their collection of pthreads; the implementation could get away
with just some #define'd constants, or keep a dynamically allocated data
structure that provides organization, searching, prioritizing, etc.

Overall this interface should provide a way to maintain the familiar
thread.c userspace threading model while progressively introducing
pthreads.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: additional thread.c MT-safety work
Quentin Young [Mon, 17 Apr 2017 18:33:58 +0000 (18:33 +0000)]
lib: additional thread.c MT-safety work

Fixes a few insufficient critical sections. Adds back locking for
thread_cancel(), since while thread_cancel() is only safe to call from
the pthread which owns the thread master due to races involving
thread_fetch() modifying thread master's ready queue, we still need
mutual exclusion here for all of the other public thread.c functions to
maintain their MT-safety.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: make thread.c pthread-safe
Quentin Young [Fri, 3 Mar 2017 19:01:49 +0000 (19:01 +0000)]
lib: make thread.c pthread-safe

This change introduces synchronization mechanisms to thread.c in order
to allow safe concurrent use.

Thread.c should now be threadstafe with respect to:
* struct thread
* struct thread_master

Calls into thread.c for operations upon data of this type should not
require external synchronization.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoMerge pull request #427 from opensourcerouting/zebra-ifdel-fix
Donald Sharp [Fri, 28 Apr 2017 19:56:10 +0000 (15:56 -0400)]
Merge pull request #427 from opensourcerouting/zebra-ifdel-fix

lib: fix segfault on exit caused by interface removal

8 years agolib: fix segfault on exit caused by interface removal 427/head
Renato Westphal [Wed, 26 Apr 2017 14:17:38 +0000 (11:17 -0300)]
lib: fix segfault on exit caused by interface removal

Add missing bits to properly unlink interface in the if_unlink_per_ns()
function.

In the long term we should convert if_table to use a more convenient
data structure like a red-black tree instead of a routing table.

Fixes issue #398.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agobgpd: Fix some crashes due to NULL pointer 426/head
Donald Sharp [Fri, 28 Apr 2017 17:50:09 +0000 (13:50 -0400)]
bgpd: Fix some crashes due to NULL pointer

If you specified A.B.C.D, the code would still try to
read A.B.C.D/M and not find it and pass in a NULL pointer
which crashed the code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #417 from donaldsharp/stable_2_0_fixes_into_stable_3_0
Donald Sharp [Fri, 28 Apr 2017 15:42:21 +0000 (11:42 -0400)]
Merge pull request #417 from donaldsharp/stable_2_0_fixes_into_stable_3_0

Stable 2.0 fixes into stable 3.0

8 years agoMerge branch 'stable/3.0' into pim_dev_3_0 406/head
Jafar Al-Gharaibeh [Fri, 28 Apr 2017 15:38:05 +0000 (10:38 -0500)]
Merge branch 'stable/3.0' into pim_dev_3_0

8 years agoMerge pull request #381 from donaldsharp/pimmerino
Jafar Al-Gharaibeh [Fri, 28 Apr 2017 15:13:39 +0000 (10:13 -0500)]
Merge pull request #381 from donaldsharp/pimmerino

Pimmerino

8 years agoMerge pull request #419 from hwchiu/update-the-docs-of-ubuntu
Donald Sharp [Fri, 28 Apr 2017 15:10:47 +0000 (11:10 -0400)]
Merge pull request #419 from hwchiu/update-the-docs-of-ubuntu

Update the docs of ubuntu 12.04/14.04

8 years agoospf6d: Fix parse_type_spec
Donald Sharp [Fri, 28 Apr 2017 02:04:56 +0000 (22:04 -0400)]
ospf6d: Fix parse_type_spec

The function parse_type_spec was always looking in argv[0] of
for figuring out the type of the command.  Since the type location
could change, use the passed in idx_lsa.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoospf6d: Fix some issues with 'show ipv6 ospf6 data..'
Donald Sharp [Fri, 28 Apr 2017 01:51:26 +0000 (21:51 -0400)]
ospf6d: Fix some issues with 'show ipv6 ospf6 data..'

1) linkstate-id was made optional in one case
2) The ipv4 address was being looked at in the wrong spot

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agovtysh: Add back in some missing ospf6 commands
Donald Sharp [Fri, 28 Apr 2017 00:19:36 +0000 (20:19 -0400)]
vtysh: Add back in some missing ospf6 commands

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Allow old vpnv4 commands to compile
Donald Sharp [Thu, 27 Apr 2017 20:08:36 +0000 (16:08 -0400)]
bgpd: Allow old vpnv4 commands to compile

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix 'show .. bgp ... neighbors ' command
Donald Sharp [Thu, 27 Apr 2017 17:13:30 +0000 (13:13 -0400)]
bgpd: Fix 'show .. bgp ... neighbors ' command

The 'show ip bgp neighbors swp31s0' command was not
working properly.  This fixes that issue.

This command still has issues that need to be investigated
but for the moment this gets the command working in the
form that is needed.  More rework can come.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Make json output to be camelCase
Donald Sharp [Thu, 27 Apr 2017 15:03:25 +0000 (11:03 -0400)]
bgpd: Make json output to be camelCase

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Modify 'show ... bgp ... summary' to only display pertinent info
Donald Sharp [Thu, 27 Apr 2017 15:00:25 +0000 (11:00 -0400)]
bgpd: Modify 'show ... bgp ... summary' to only display pertinent info

Modify the 'show ... bgp ... summary' command when you are
looking at a afi( with no safi specified ) to only display
output for those safi's that have been configured.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #425 from opensourcerouting/bgpd-clear-fix
Donald Sharp [Fri, 28 Apr 2017 14:47:05 +0000 (10:47 -0400)]
Merge pull request #425 from opensourcerouting/bgpd-clear-fix

bgpd: fix "clear bgp" commands

8 years agoMerge pull request #423 from opensourcerouting/feature/isis-mt
Donald Sharp [Fri, 28 Apr 2017 14:18:33 +0000 (10:18 -0400)]
Merge pull request #423 from opensourcerouting/feature/isis-mt

IS-IS multi topology

8 years agoMerge pull request #424 from opensourcerouting/snap-fix-distfile
Donald Sharp [Fri, 28 Apr 2017 14:02:03 +0000 (10:02 -0400)]
Merge pull request #424 from opensourcerouting/snap-fix-distfile

More snapcraft cleanups

8 years agobgpd: fix "clear bgp" commands 425/head
Renato Westphal [Fri, 28 Apr 2017 13:22:28 +0000 (10:22 -0300)]
bgpd: fix "clear bgp" commands

The use of VTY_DECLVAR_CONTEXT(bgp, bgp) here is wrong as we are not
inside the "router bgp" configuration node. This was making the clear
commands always fail with a "Current configuration object was deleted
by another process" error, which doesn't make any sense.

Also, the bgp_clear() function will already check for us if the given
peer-group or neighbor exists or not, there's no need to duplicate this
logic here.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agosnapcraft: Clean up old no longer used configure flags 424/head
Martin Winter [Fri, 28 Apr 2017 10:11:51 +0000 (03:11 -0700)]
snapcraft: Clean up old no longer used configure flags

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agoisisd: make spf MT aware 423/head
Christian Franke [Thu, 27 Apr 2017 11:56:47 +0000 (13:56 +0200)]
isisd: make spf MT aware

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: announce and parse MT IP reachabilities
Christian Franke [Thu, 27 Apr 2017 11:56:45 +0000 (13:56 +0200)]
isisd: announce and parse MT IP reachabilities

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: announce and parse MT IS reachabilities
Christian Franke [Thu, 27 Apr 2017 11:56:43 +0000 (13:56 +0200)]
isisd: announce and parse MT IS reachabilities

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: track intersecting set of supported MTs for each adj
Christian Franke [Thu, 27 Apr 2017 11:56:41 +0000 (13:56 +0200)]
isisd: track intersecting set of supported MTs for each adj

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: announce MT capabilities in IIH and LSP
Christian Franke [Thu, 27 Apr 2017 11:56:38 +0000 (13:56 +0200)]
isisd: announce MT capabilities in IIH and LSP

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: add MT configuration
Christian Franke [Thu, 27 Apr 2017 11:56:35 +0000 (13:56 +0200)]
isisd: add MT configuration

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: implement draft-ietf-isis-ext-eth and support p2p over LAN on BSD
Christian Franke [Thu, 27 Apr 2017 10:56:11 +0000 (12:56 +0200)]
isisd: implement draft-ietf-isis-ext-eth and support p2p over LAN on BSD

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: do some cleanup on the spf implementation
Christian Franke [Thu, 27 Apr 2017 10:54:21 +0000 (12:54 +0200)]
isisd: do some cleanup on the spf implementation

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: function lsp_te_tlv_fit is never used
Christian Franke [Thu, 27 Apr 2017 10:42:56 +0000 (12:42 +0200)]
isisd: function lsp_te_tlv_fit is never used

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agosnapcraft: Add support for extra version information
Martin Winter [Fri, 28 Apr 2017 06:41:04 +0000 (23:41 -0700)]
snapcraft: Add support for extra version information

- frr.version snap command will now show the contents of
  extra_version_info.txt in addition to the zebra --version output

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agosnapcraft: Fix missing files in "make dist" target
Martin Winter [Fri, 28 Apr 2017 06:26:20 +0000 (23:26 -0700)]
snapcraft: Fix missing files in "make dist" target

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agoupdate doc of ubuntu 12.04 419/head
Hung-Wei Chiu [Thu, 27 Apr 2017 15:30:56 +0000 (23:30 +0800)]
update doc of ubuntu 12.04

1. modify the prefix to /usr (which is hard-code in /etc/init.d/frr)
2. install init.d related files.

8 years agoUpdate 14.04 docs to support init.d service
Hung-Wei Chiu [Thu, 27 Apr 2017 15:14:23 +0000 (23:14 +0800)]
Update 14.04 docs to support init.d service

1. Configure the prefix to /usr  (frr script hard-code those path in /etc/init.d/frr)
2. Install the service file to /etc/init.d

8 years agoMerge pull request #416 from opensourcerouting/ldpd-coverity-fix
Donald Sharp [Thu, 27 Apr 2017 13:41:07 +0000 (09:41 -0400)]
Merge pull request #416 from opensourcerouting/ldpd-coverity-fix

ldpd: fix issues detected by Coverity Scan

8 years agoUpdate Building_FRR_on_Ubuntu1604.md 417/head
Hung-Wei Chiu [Thu, 27 Apr 2017 03:22:15 +0000 (11:22 +0800)]
Update Building_FRR_on_Ubuntu1604.md

Fix typo

8 years agoUpdate Building_FRR_on_Ubuntu1604.md
Hung-Wei Chiu [Thu, 27 Apr 2017 03:10:36 +0000 (11:10 +0800)]
Update Building_FRR_on_Ubuntu1604.md

1.  Modify the configure prefix (since there some hard coded path in **/usr/lib/frr/fr**
2.  Install the systemd service config

8 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Thu, 27 Apr 2017 13:12:46 +0000 (09:12 -0400)]
Merge remote-tracking branch 'origin/stable/2.0'

8 years agoMerge pull request #415 from hwchiu/fix_ubuntu16.04
Donald Sharp [Thu, 27 Apr 2017 12:31:16 +0000 (08:31 -0400)]
Merge pull request #415 from hwchiu/fix_ubuntu16.04

Update Building_FRR_on_Ubuntu1604 to make it support systemd

8 years agoMerge pull request #413 from dwalton76/address-family-argv-argc-stable-30
Renato Westphal [Thu, 27 Apr 2017 12:21:20 +0000 (09:21 -0300)]
Merge pull request #413 from dwalton76/address-family-argv-argc-stable-30

Problem with DEFUNSH in vtysh, issue #358

8 years agoldpd: fix issues detected by Coverity Scan 416/head
Renato Westphal [Thu, 27 Apr 2017 11:56:15 +0000 (08:56 -0300)]
ldpd: fix issues detected by Coverity Scan

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoUpdate Building_FRR_on_Ubuntu1604.md 415/head
Hung-Wei Chiu [Thu, 27 Apr 2017 03:22:15 +0000 (11:22 +0800)]
Update Building_FRR_on_Ubuntu1604.md

Fix typo

8 years agoUpdate Building_FRR_on_Ubuntu1604.md
Hung-Wei Chiu [Thu, 27 Apr 2017 03:10:36 +0000 (11:10 +0800)]
Update Building_FRR_on_Ubuntu1604.md

1.  Modify the configure prefix (since there some hard coded path in **/usr/lib/frr/fr**
2.  Install the systemd service config

8 years agoMerge pull request #384 from donaldsharp/dr2
Martin Winter [Wed, 26 Apr 2017 23:24:48 +0000 (16:24 -0700)]
Merge pull request #384 from donaldsharp/dr2

Add source of route as protocol string in ip route pushed into kernel

8 years agoProblem with DEFUNSH in vtysh, issue #358 413/head
Daniel Walton [Wed, 26 Apr 2017 22:39:10 +0000 (22:39 +0000)]
Problem with DEFUNSH in vtysh, issue #358

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoUpdate to draft-ietf-idr-bgp-prefix-sid-05 412/head
Daniel Walton [Wed, 26 Apr 2017 21:45:32 +0000 (21:45 +0000)]
Update to draft-ietf-idr-bgp-prefix-sid-05

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
The initial implementation was against draft-keyupate-idr-bgp-prefix-sid-02
This updates our label-index implementation up to draft-ietf-idr-bgp-prefix-sid-05
- changed BGP_ATTR_LABEL_INDEX to BGP_ATTR_PREFIX_SID
- since there are multiple TLVs in BGP_ATTR_PREFIX_SID you can no longer
  rely on that flag to know if there is a label-index for the path. I
changed bgp_attr_extra_new() to init the label_index to
BGP_INVALID_LABEL_INDEX
- put some placeholder code in for the other two TLVs (IPv6 and
  Originator SRGB)

8 years agoMerge pull request #343 from donaldsharp/mpls2
Renato Westphal [Wed, 26 Apr 2017 20:57:04 +0000 (17:57 -0300)]
Merge pull request #343 from donaldsharp/mpls2

Mpls

8 years agoMerge remote-tracking branch 'origin/master' into mpls2 343/head
Donald Sharp [Wed, 26 Apr 2017 18:18:22 +0000 (14:18 -0400)]
Merge remote-tracking branch 'origin/master' into mpls2

8 years agoBGP_ATTR_LABEL_INDEX fixes
Daniel Walton [Wed, 26 Apr 2017 15:53:35 +0000 (15:53 +0000)]
BGP_ATTR_LABEL_INDEX fixes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
- cleaned up the "show bgp ipv4 labeled-unicast x.x.x.x" output

- fixed some json keys to use camelCase

- bgp_attr_label_index() was clearing BGP_ATTR_LABEL_INDEX because it
  was comparing mp_update->afi against SAFI_LABELED_UNICAST instead of
  mp_update->safi

- added BGP_ATTR_LABEL_INDEX to attr_str

8 years agobgpd: Do not force nh_afi to be AFI_IP for 'ipv4 labeled-unicast'
Daniel Walton [Tue, 25 Apr 2017 21:53:28 +0000 (21:53 +0000)]
bgpd: Do not force nh_afi to be AFI_IP for 'ipv4 labeled-unicast'

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoMerge pull request #393 from opensourcerouting/ldpd-minor-fixes
Donald Sharp [Wed, 26 Apr 2017 14:38:28 +0000 (10:38 -0400)]
Merge pull request #393 from opensourcerouting/ldpd-minor-fixes

ldpd: minor fixes

8 years agozebra: fix attempt to install a second rib from imported table entries 410/head
Don Slice [Fri, 21 Apr 2017 18:18:42 +0000 (11:18 -0700)]
zebra: fix attempt to install a second rib from imported table entries

Problem reported by a customer with prefix imported by rdnbrd not being
successfully installed in the quagga rib.  Determined that this was due
to VRR resolving the same arp entry, causing two entries to be installed
in table 10.  When these were imported into the quagga rib, they came in
as two different rib entries from the same table/instance, which is not
permitted and caused them to be deleted.

Added logic to zebra_add_import_table_entry to do the same actions as
rib_add and delete the older rib entry if a new rib entry is received
which matches.

Manual testing successful and automated tests for redistribute neighbor
have the same passes and failures as the base.

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

8 years agoldpd: fix bug when changing the transport address 393/head
Renato Westphal [Sat, 22 Apr 2017 15:03:14 +0000 (12:03 -0300)]
ldpd: fix bug when changing the transport address

When the transport address is changed, all interfaces and targeted
neighbors are temporary disabled in the ldpe process until new sockets
bound to the new transport address are received from the parent.

This patch fixes a problem in which adjacencies weren't being removed
after the associated targeted neighbors were disabled. This was causing
ldpd not to set some MD5 sockoptions for new neighbors are thus preventing
MD5-protected sessions to come up after a change in the transport-address.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: allow targeted neighbors over any interface
Renato Westphal [Sat, 22 Apr 2017 13:55:27 +0000 (10:55 -0300)]
ldpd: allow targeted neighbors over any interface

It's doesn't make sense to enforce that a targeted-hello is received
on an LDP-enabled interface. It should be possible, for example, to use
LDP only to signal pseudowires and other another protocol (e.g. RSVP-TE)
to create end-to-end LSPs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: schedule the sending of label messages when necessary
Renato Westphal [Sat, 22 Apr 2017 01:10:42 +0000 (22:10 -0300)]
ldpd: schedule the sending of label messages when necessary

Once we send a Label Withdraw, we can't send a Label Mapping for the
same FEC until we receive a Label Release from the peer. This is due to
some limitations in the LDP algorithms described in Appendix A. ("LDP
Label Distribution Procedures") of RFC 5036.

To workaround this issue, make it possible to schedule the sending of
a Label Mapping as soon as a Label Release is received for the same FEC.

The easiest way to test this patch is by typing the "label local advertise
explicit-null" command. ldpd will withdraw all null labels using a
Wildcard FEC and then send new Label Mappings as soon the corresponding
Label Releases are received.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: improve ldp_zebra_read_route()
Renato Westphal [Fri, 21 Apr 2017 22:39:11 +0000 (19:39 -0300)]
ldpd: improve ldp_zebra_read_route()

Log deleted routes and simplify the code a bit.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: be more conservative with labels
Renato Westphal [Fri, 21 Apr 2017 18:41:14 +0000 (15:41 -0300)]
ldpd: be more conservative with labels

On unstable networks, routes can be lost and relearned very often. If
we deallocate the input label every time a route is lost and allocate
a new one when the route is relearned, a lot of changes are made in vain.

This patch introduces a logic in which labels are preserved for at least
five minutes before being deallocated by the LIB garbage collector. This
is consistent with what other implementations do.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: accept notifications during the session establishment process
Renato Westphal [Wed, 19 Apr 2017 22:31:19 +0000 (19:31 -0300)]
ldpd: accept notifications during the session establishment process

If we don't do this, we'll never trigger the backoff exponential timer
since it's impossible to distinguish between Initialization NAK's and
general errors.

Also:
* Implement some missing bits from RFC 5036;
* remove superfluous log message in session_shutdown()
  (send_notification() logs that we're sending a fatal notification).

Regression introduced by commit 8819fc3.

Fixes the following ANVL LDP regressions: 6.19 and 6.21.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: fix small style issues
Renato Westphal [Wed, 19 Apr 2017 21:14:20 +0000 (18:14 -0300)]
ldpd: fix small style issues

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: minor changes in the output of some show commands
Renato Westphal [Wed, 19 Apr 2017 20:12:35 +0000 (17:12 -0300)]
ldpd: minor changes in the output of some show commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: use synchronous channels for sending log messages
Renato Westphal [Wed, 19 Apr 2017 19:59:50 +0000 (16:59 -0300)]
ldpd: use synchronous channels for sending log messages

This is necessary to guarantee that all log messages sent from the child
processes are received in the parent process right away.

Without this patch, when a child process calls fatal() or fatalx(),
the log messages don't make it to the parent because the child doesn't
have a chance to flush its buffers before exiting.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: remove unnecessary checks if a signal was caught
Renato Westphal [Wed, 19 Apr 2017 18:28:43 +0000 (15:28 -0300)]
ldpd: remove unnecessary checks if a signal was caught

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: fix segfault after failed initialization
Renato Westphal [Wed, 19 Apr 2017 18:15:56 +0000 (15:15 -0300)]
ldpd: fix segfault after failed initialization

When ldpd fails to start for some reason, like failing to create a pid
file, the child processes call their shutdown functions without being
completely initialized. This patch adds some protections to prevent a
segmentation fault on such circumstances.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: simplify initialization of the child processes
Renato Westphal [Wed, 19 Apr 2017 01:03:35 +0000 (22:03 -0300)]
ldpd: simplify initialization of the child processes

In order to have separate ASLR/cookies per process, ldpd calls exec()
in the child processes after fork() (this is also known as the fork+exec
model).

This is an important security feature but it makes the initialization
of the child processes a bit more complicated as they're not a copy of
the parent anymore, so all parameters given via command line are lost.

To solve this problem, we were creating an argv array by hand with all
necessary parameters and providing it to the exec() syscall. This works
but it's a very ugly solution. This patch introduces a different approach
to solve the problem: send an IMSG_INIT message to the child processes
with all parameters they need in order to initialize properly. This
makes adding additional initialization parameters much more convenient
and less error prone.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoMerge remote-tracking branch 'origin/master' into mpls2
Donald Sharp [Wed, 26 Apr 2017 11:50:02 +0000 (07:50 -0400)]
Merge remote-tracking branch 'origin/master' into mpls2