]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agoMerge pull request #449 from dwalton76/valgrind-enable
Martin Winter [Mon, 8 May 2017 14:32:42 +0000 (16:32 +0200)]
Merge pull request #449 from dwalton76/valgrind-enable

Add valgrind_enable option to /etc/frr/debian.conf

7 years agoAdded config option for valgrind executable
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 agoMerge pull request #476 from qlyoung/abort-select-fd
Russ White [Sun, 7 May 2017 23:49:26 +0000 (19:49 -0400)]
Merge pull request #476 from qlyoung/abort-select-fd

lib: abort if fd >= FD_SETSIZE and using select

7 years agoMerge pull request #409 from donaldsharp/EIGRP
Russ White [Sun, 7 May 2017 23:48:33 +0000 (19:48 -0400)]
Merge pull request #409 from donaldsharp/EIGRP

Eigrp

7 years agolib: abort if fd >= FD_SETSIZE and using select
Quentin Young [Sun, 7 May 2017 04:42:07 +0000 (04:42 +0000)]
lib: abort if fd >= FD_SETSIZE and using select

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #474 from opensourcerouting/isis-mt-additions
Donald Sharp [Sun, 7 May 2017 00:55:15 +0000 (20:55 -0400)]
Merge pull request #474 from opensourcerouting/isis-mt-additions

IS-IS additions

7 years agoeigrpd: Basic Documentation
Donald Sharp [Sat, 6 May 2017 18:12:54 +0000 (14:12 -0400)]
eigrpd: Basic Documentation

Add some basic documentation for the EIGRP protocol.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoisisd: use MT to only advertise usable links
Christian Franke [Sat, 6 May 2017 13:50:50 +0000 (15:50 +0200)]
isisd: use MT to only advertise usable links

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: support unnumbered operation
Christian Franke [Sat, 6 May 2017 13:50:47 +0000 (15:50 +0200)]
isisd: support unnumbered operation

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: show topology information for adjacencies
Christian Franke [Sat, 6 May 2017 13:50:45 +0000 (15:50 +0200)]
isisd: show topology information for adjacencies

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: ensure that MT is only used with wide metrics
Christian Franke [Sat, 6 May 2017 13:50:41 +0000 (15:50 +0200)]
isisd: ensure that MT is only used with wide metrics

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: fix initialization of ES vertizes
Christian Franke [Sat, 6 May 2017 13:50:37 +0000 (15:50 +0200)]
isisd: fix initialization of ES vertizes

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoMerge pull request #472 from qlyoung/rfapi-correct-types
Martin Winter [Sat, 6 May 2017 01:03:45 +0000 (18:03 -0700)]
Merge pull request #472 from qlyoung/rfapi-correct-types

rfapi void * -> struct thread *

7 years agobgpd: use correct type for rfapi thread pointer
Quentin Young [Fri, 5 May 2017 21:08:44 +0000 (21:08 +0000)]
bgpd: use correct type for rfapi thread pointer

Pointer to void always points at the same thing so make it the type of
the thing that it points at

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #466 from dslicenc/aggregate
Lou Berger [Fri, 5 May 2017 19:54:11 +0000 (15:54 -0400)]
Merge pull request #466 from dslicenc/aggregate

bgpd: resolve crash in workqueue processing due to invalid safi

7 years agobgpd: resolve crash in workqueue processing due to invalid safi
Don Slice [Wed, 3 May 2017 13:15:20 +0000 (06:15 -0700)]
bgpd: resolve crash in workqueue processing due to invalid safi

Crash uncovered when workqueue item was pulled with safi set to 7
(SAFI_LABELED_UNICAST) without labled-unicast being configured.
Also fixed minor issue removing aggregate-address command due to bad
index.

Ticket: CM-16169
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge remote-tracking branch 'origin/stable/3.0'
Donald Sharp [Thu, 4 May 2017 17:35:25 +0000 (13:35 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'

7 years agoMerge pull request #450 from donaldsharp/afi_safi3
Renato Westphal [Thu, 4 May 2017 17:33:43 +0000 (14:33 -0300)]
Merge pull request #450 from donaldsharp/afi_safi3

Afi safi3

7 years agoMerge pull request #445 from donaldsharp/robot
Renato Westphal [Thu, 4 May 2017 17:28:47 +0000 (14:28 -0300)]
Merge pull request #445 from donaldsharp/robot

Robot

7 years agoospf6d: Allow some route-map commands to work
Donald Sharp [Wed, 3 May 2017 18:39:21 +0000 (14:39 -0400)]
ospf6d: Allow some route-map commands to work

The generic callbacks need to be enabled in order
for some route-map commands to properly work.

I've tried to match up to what is programmed to work
within ospfv3.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospf6d: Fix redistribution debug knowledge
Donald Sharp [Wed, 3 May 2017 18:33:28 +0000 (14:33 -0400)]
ospf6d: Fix redistribution debug knowledge

When redistributing into ospfv3 specify that the
route is add or delete correctly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #451 from opensourcerouting/ospfd-fix-cmdstr
Jafar Al-Gharaibeh [Wed, 3 May 2017 15:04:59 +0000 (10:04 -0500)]
Merge pull request #451 from opensourcerouting/ospfd-fix-cmdstr

ospfd: fix small problem in the redistribute command

7 years agovtysh: Fix _ instead of - usage for labeled_unicast
Donald Sharp [Wed, 3 May 2017 14:24:04 +0000 (10:24 -0400)]
vtysh: Fix _ instead of - usage for labeled_unicast

Signed-off-by: Donald Sharp <sharpd@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.

7 years agobgpd: Fix crashes with '[no] neighbor ... shutdown ..' command
Donald Sharp [Wed, 3 May 2017 13:13:12 +0000 (09:13 -0400)]
bgpd: Fix crashes with '[no] neighbor ... shutdown ..' command

This fixes two crashes:

1) When we enter a 'neighbor shutdown..' command for a peer
group or interface based peer we were not properly looking
up the peer.

2) When we we enter 'no neighbor shutdown..' command for
a peer group or interface based peer we were not properly
lookup up the peer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospfd: fix small problem in the redistribute command
Renato Westphal [Wed, 3 May 2017 13:03:14 +0000 (10:03 -0300)]
ospfd: fix small problem in the redistribute command

The use of {<>} is unnecessary and not correct.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: Fix leaked memory in label manager code
Donald Sharp [Wed, 3 May 2017 12:11:38 +0000 (08:11 -0400)]
zebra: Fix leaked memory in label manager code

When we fail to properly setup we can leak some memory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Fix crash associated with aggregate command
Donald Sharp [Wed, 3 May 2017 02:14:24 +0000 (22:14 -0400)]
bgpd: Fix crash associated with aggregate command

The cli rework created this issue

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: When receiving a route set the label to invalid
Donald Sharp [Wed, 3 May 2017 01:48:46 +0000 (21:48 -0400)]
bgpd: When receiving a route set the label to invalid

When we are receiving a route the attr->extra->label_index
is being set to 0.  This should be BGP_INVALID_LABEL_INDEX
instead since we cannot rely on 0 to be correct for labels.

I believe that there are probably other spots that need this
type of fix, but I will let testing snuggle-bump them out.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Fix 'show bgp ... summary json' to have empty {}
Donald Sharp [Tue, 2 May 2017 14:20:10 +0000 (10:20 -0400)]
bgpd: Fix 'show bgp ... summary json' to have empty {}

When we have no output for a json command we should have
an empty {} displayed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #442 from Jafaral/pim-hello-fix
Donald Sharp [Tue, 2 May 2017 23:49:13 +0000 (19:49 -0400)]
Merge pull request #442 from Jafaral/pim-hello-fix

Fix: Off by one error, correct index for hold timer

7 years agoFix: Off by one error, correct index for hold timer
Jafar Al-Gharaibeh [Tue, 2 May 2017 22:23:34 +0000 (17:23 -0500)]
Fix: Off by one error, correct index for hold timer

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 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'

7 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.

7 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

7 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

7 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'

7 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

7 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

7 years agopimd: Fix cli uplift mistakes
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>
7 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>
7 years agoFix: reverse logic of when to pass the supplied group address
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>
7 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

7 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

7 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

7 years agoFix the wrong user/group for nhrpd.
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>
7 years agoMerge branch 'master' into EIGRP
Donald Sharp [Tue, 2 May 2017 15:38:06 +0000 (11:38 -0400)]
Merge branch 'master' into EIGRP

7 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

7 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

7 years agoRevert "Fix the "Use-after-free" of clang SA."
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>
7 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

7 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

7 years agoldpd: respect link-detect configuration
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>
7 years agoldpd: fixes to handle interface renames properly
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>
7 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>
7 years agolib: allow nonblocking thread_fetch()
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>
7 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

7 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

7 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

7 years agozebra: fix infinite loop when deleting non-default vrf
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>
7 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>
7 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>
7 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>
7 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>
7 years agoisisd: fix uninitialized pointer
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>
7 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>
7 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>
7 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>
7 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

7 years agolib: fix segfault on exit caused by interface removal
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>
7 years agobgpd: Fix some crashes due to NULL pointer
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>
7 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

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

7 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

7 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

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

7 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

7 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

7 years agobgpd: fix "clear bgp" commands
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>
7 years agosnapcraft: Clean up old no longer used configure flags
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>
7 years agoisisd: make spf MT aware
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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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.

7 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