]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
7 years agozebra: Do not allow delete of route from kernel in non-startup case 1240/head
Donald Sharp [Mon, 25 Sep 2017 16:28:39 +0000 (12:28 -0400)]
zebra: Do not allow delete of route from kernel in non-startup case

This is a continuation of 915902cb82cfd.  Basically the netlink
read of messages up from the kernel is now noticing the proper
owner of the route.  As such when rib_delete was being called
as part of the upcall from the kernel we were not noticing that
we were the originator and not diss-allowing the rib_delete
from happening.  This restores this behavior that we were getting
pre-915902cb82cfd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1227 from qlyoung/pim-cli-npd
Jafar Al-Gharaibeh [Sun, 24 Sep 2017 03:17:38 +0000 (22:17 -0500)]
Merge pull request #1227 from qlyoung/pim-cli-npd

pimd: fix some null pointer derefs in cli

7 years agoMerge pull request #1231 from opensourcerouting/isis-fixes
Donald Sharp [Sat, 23 Sep 2017 20:47:38 +0000 (16:47 -0400)]
Merge pull request #1231 from opensourcerouting/isis-fixes

Isisd: assorted fixes

7 years agoisisd: ensure fragments get always linked 1231/head
Christian Franke [Sat, 23 Sep 2017 18:01:43 +0000 (20:01 +0200)]
isisd: ensure fragments get always linked

When we receive or generate new versions of fragments which are
curently pending for age out, we need to ensure that they are correctly
linked to their lsp0.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: cleanup unused variables
Christian Franke [Sat, 23 Sep 2017 17:32:12 +0000 (19:32 +0200)]
isisd: cleanup unused variables

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: always trigger spf run asynchronously
Christian Franke [Sat, 23 Sep 2017 17:28:48 +0000 (19:28 +0200)]
isisd: always trigger spf run asynchronously

isis_spf_schedule gets called in states where an immediate spf run
will lead to crashes, e.g. from lsp_destroy. Delay the spf execution
until the event calling isis_spf_schedule has run to completion to
avoid this.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: use only one IP of neighbor as nexthop
Christian Franke [Sat, 23 Sep 2017 17:27:29 +0000 (19:27 +0200)]
isisd: use only one IP of neighbor as nexthop

There is no point in building a multipath route via one neighbor
if there is only one link to the neighbor, but the neighbor has
multiple IPs on that link. So only create one nexthop per link.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoMerge pull request #1222 from opensourcerouting/isis-spf-improvements
Donald Sharp [Sat, 23 Sep 2017 12:06:57 +0000 (08:06 -0400)]
Merge pull request #1222 from opensourcerouting/isis-spf-improvements

isisd: spf improvements

7 years agoMerge pull request #1215 from opensourcerouting/zapi_nexthops
Donald Sharp [Fri, 22 Sep 2017 21:50:06 +0000 (17:50 -0400)]
Merge pull request #1215 from opensourcerouting/zapi_nexthops

*: fix segfault when sending more than MULTIPATH_NUM nexthops

7 years agoMerge pull request #1226 from opensourcerouting/isis-fix-fragment-overflow
Donald Sharp [Fri, 22 Sep 2017 21:44:29 +0000 (17:44 -0400)]
Merge pull request #1226 from opensourcerouting/isis-fix-fragment-overflow

isisd: Don't corrupt generated LSPs if information exceeds capacity

7 years agopimd: fix some null pointer derefs in cli 1227/head
Quentin Young [Fri, 22 Sep 2017 21:15:33 +0000 (17:15 -0400)]
pimd: fix some null pointer derefs in cli

If pim/igmp is not enabled on an interface, the ->info pointer will be
null. Need to check that before dereferencing it.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoisisd: Don't corrupt generated LSPs if information exceeds capacity 1226/head
Christian Franke [Fri, 22 Sep 2017 20:17:20 +0000 (22:17 +0200)]
isisd: Don't corrupt generated LSPs if information exceeds capacity

Standard IS-IS only supports up to 256 fragments per router. Recognize
when the information we want to advertise exceeds 256 fragments and
print a warning in this case instead of overflowing the fragment counter
and overwriting existing LSP fragments.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: SPF doesn't need to maintain children 1222/head
Christian Franke [Fri, 22 Sep 2017 19:20:26 +0000 (21:20 +0200)]
isisd: SPF doesn't need to maintain children

SPF maintains a datastructure which is never actually read. I think
we can spend CPU more sensibly.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: use skiplist to implement ordered list for SPF
Christian Franke [Fri, 22 Sep 2017 19:20:03 +0000 (21:20 +0200)]
isisd: use skiplist to implement ordered list for SPF

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agotests: verify isis_vertex_queue correctness
Christian Franke [Fri, 22 Sep 2017 18:51:40 +0000 (20:51 +0200)]
tests: verify isis_vertex_queue correctness

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoMerge pull request #1157 from donaldsharp/recursive_blackhole
Jafar Al-Gharaibeh [Thu, 21 Sep 2017 16:16:35 +0000 (11:16 -0500)]
Merge pull request #1157 from donaldsharp/recursive_blackhole

Recursive blackhole resolution

7 years ago*: fix segfault when sending more than MULTIPATH_NUM nexthops 1215/head
Renato Westphal [Thu, 21 Sep 2017 12:49:31 +0000 (09:49 -0300)]
*: fix segfault when sending more than MULTIPATH_NUM nexthops

This is a fallout from PR #1022 (zapi consolidation). In the early days,
the client daemons would allocate enough memory to send all nexthops
to zebra.  Then zebra would add all nexthops to the RIB and respect
MULTIPATH_NUM only when installing the routes in the kernel. Now things
are different and the client daemons can send at most MULTIPATH_NUM
nexthops to zebra, and failure to respect that will result in a buffer
overflow. The MULTIPATH_NUM limit in the new zebra API is a small price
we pay to avoid allocating memory for each route sent to zebra.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: Free leaked zclient data structures on shutdown
Donald Sharp [Wed, 20 Sep 2017 16:52:38 +0000 (12:52 -0400)]
zebra: Free leaked zclient data structures on shutdown

On shutdown we were deleting the linked list that
kept the zclient connections, but we were not
freeing the data pointed at by the link list.

This modification allows the normal cleanup of the
linked list to cleanup the zclient data structure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoripd: Free leaked memory on shutdown
Donald Sharp [Wed, 20 Sep 2017 16:51:27 +0000 (12:51 -0400)]
ripd: Free leaked memory on shutdown

Usage of the address sanitizer and topotests showed
that rip was leaking obuf on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1153 from nkukard/docs-ip-bgp-master
Donald Sharp [Thu, 21 Sep 2017 12:50:52 +0000 (08:50 -0400)]
Merge pull request #1153 from nkukard/docs-ip-bgp-master

doc: updates for master, cherry-picked from my 3.0 branch

7 years agoMerge pull request #1212 from mkanjari/init-fix
Renato Westphal [Thu, 21 Sep 2017 12:34:46 +0000 (09:34 -0300)]
Merge pull request #1212 from mkanjari/init-fix

bgpd: Intialize all the variables used in argv_find.

7 years agoMerge pull request #1160 from opensourcerouting/admin_distance
Donald Sharp [Thu, 21 Sep 2017 11:55:08 +0000 (07:55 -0400)]
Merge pull request #1160 from opensourcerouting/admin_distance

Admin distance

7 years agobgpd: Intialize all the variables used in argv_find. 1212/head
Mitesh Kanjariya [Wed, 23 Aug 2017 09:09:55 +0000 (02:09 -0700)]
bgpd: Intialize all the variables used in argv_find.

Ticket: CM-17706
Review: CCR-6639
Testing: Manual (test failing in min test for ARM)

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
7 years agoMerge pull request #1204 from donaldsharp/static_uptime
Renato Westphal [Wed, 20 Sep 2017 13:26:47 +0000 (10:26 -0300)]
Merge pull request #1204 from donaldsharp/static_uptime

zebra: Allow static routes to track how long they've been around

7 years agoMerge pull request #1192 from dwalton76/igmp-group-failure
Renato Westphal [Wed, 20 Sep 2017 13:06:29 +0000 (10:06 -0300)]
Merge pull request #1192 from dwalton76/igmp-group-failure

lib: CMD_FERR_RETURN should return CMD_WARNING_CONFIG_FAILED

7 years agoMerge pull request #1205 from donaldsharp/show_lcommunity
Renato Westphal [Wed, 20 Sep 2017 13:03:28 +0000 (10:03 -0300)]
Merge pull request #1205 from donaldsharp/show_lcommunity

bgpd: Add large community json support

7 years agoisisd: generate unique circuit ids
Christian Franke [Thu, 14 Sep 2017 13:26:33 +0000 (15:26 +0200)]
isisd: generate unique circuit ids

Circuit IDs need to be unique, otherwise mayhem will ensue.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoMerge pull request #1200 from opensourcerouting/bgpd-ecmp-fix
Donald Sharp [Wed, 20 Sep 2017 11:57:07 +0000 (07:57 -0400)]
Merge pull request #1200 from opensourcerouting/bgpd-ecmp-fix

bgpd: fix sending of ECMP routes with both v4/v6 nexthops to zebra

7 years agoMerge pull request #1202 from LabNConsulting/working/master/patch/rfapi-rd.family
Donald Sharp [Wed, 20 Sep 2017 11:54:19 +0000 (07:54 -0400)]
Merge pull request #1202 from LabNConsulting/working/master/patch/rfapi-rd.family

bgpd: rfapi - fix 'add vnc' command not picking up RD from vrf-policy

7 years agoMerge pull request #1193 from ericpulvino/Sysctl_Recommendations
Jafar Al-Gharaibeh [Tue, 19 Sep 2017 18:49:00 +0000 (13:49 -0500)]
Merge pull request #1193 from ericpulvino/Sysctl_Recommendations

Adding Useful Sysctl Settings recommendations.

7 years agobgpd: fix sending of ECMP routes with both v4/v6 nexthops to zebra 1200/head
Renato Westphal [Tue, 19 Sep 2017 12:33:40 +0000 (09:33 -0300)]
bgpd: fix sending of ECMP routes with both v4/v6 nexthops to zebra

The previous code assumed that all nexthops of an ECMP route were of
the same address-family. This is not always the case.

Reported-by: Don Slice <dslice@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobgpd: Add large community json support 1205/head
Donald Sharp [Tue, 19 Sep 2017 17:57:35 +0000 (13:57 -0400)]
bgpd: Add large community json support

Add the ability to display large commnunity json support

Fixes: 1191
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Allow static routes to track how long they've been around 1204/head
Donald Sharp [Tue, 19 Sep 2017 17:47:16 +0000 (13:47 -0400)]
zebra: Allow static routes to track how long they've been around

Static routes were not keeping track of uptime appopriately and
as such we were not properly displaying uptime.

Fixes: #1196
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1194 from dwalton76/igmp-rejoin-existing-group
Jafar Al-Gharaibeh [Tue, 19 Sep 2017 15:58:47 +0000 (10:58 -0500)]
Merge pull request #1194 from dwalton76/igmp-rejoin-existing-group

pimd: Do not complain if re-joining an IGMP group

7 years agoMerge pull request #1197 from chiragshah6/ospfv3_dev
Jafar Al-Gharaibeh [Tue, 19 Sep 2017 15:58:28 +0000 (10:58 -0500)]
Merge pull request #1197 from chiragshah6/ospfv3_dev

ospf6d: OSPFv3 interface bandwidth handling

7 years agobgpd: rfapi - fix a couple of check that should have been against RD len vs RD type... 1202/head
Lou Berger [Tue, 19 Sep 2017 14:07:31 +0000 (10:07 -0400)]
bgpd: rfapi - fix a couple of check that should have been against RD len vs RD type flag (family)

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoospf6d: OSPFv3 interface bandwidth handling 1197/head
Chirag Shah [Mon, 18 Sep 2017 05:00:37 +0000 (22:00 -0700)]
ospf6d: OSPFv3 interface bandwidth handling

if bandwidth is not set from Zebra  use speed as
   bandwidth for ospfv3 route cost.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #1195 from qlyoung/vtysh-warn-not-running
Jafar Al-Gharaibeh [Mon, 18 Sep 2017 20:54:07 +0000 (15:54 -0500)]
Merge pull request #1195 from qlyoung/vtysh-warn-not-running

vtysh: warn on cli targeting non-running daemon

7 years agovtysh: warn on cli targeting non-running daemon 1195/head
Quentin Young [Mon, 18 Sep 2017 16:35:10 +0000 (12:35 -0400)]
vtysh: warn on cli targeting non-running daemon

Presently CLI entered for daemons which are not running is accepted
quietly, which can be confusing for users. This patch warns about it
when possible.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agopimd: Do not complain if re-joining an IGMP group 1194/head
Daniel Walton [Mon, 18 Sep 2017 16:01:21 +0000 (16:01 +0000)]
pimd: Do not complain if re-joining an IGMP group

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
If you cut-n-paste an existing "ip igmp join 233.200.0.0 0.0.0.0"
command under an interface we should not return an error.

7 years agoAdding Useful Sysctl Settings recommendations. 1193/head
Eric Pulvino [Mon, 18 Sep 2017 15:53:29 +0000 (11:53 -0400)]
Adding Useful Sysctl Settings recommendations.

7 years agolib: CMD_FERR_RETURN should return CMD_WARNING_CONFIG_FAILED 1192/head
Daniel Walton [Mon, 18 Sep 2017 15:07:40 +0000 (15:07 +0000)]
lib: CMD_FERR_RETURN should return CMD_WARNING_CONFIG_FAILED

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Testing the patch:

root@cel-redxp-10[frr-dwalton76]# vtysh -c 'conf t' -c ' int vlan2' -c
'ip igmp join 233.200.0.1 10.1.1.1'
Failure joining IGMP group: multicast not enabled on interface vlan2
root@cel-redxp-10[frr-dwalton76]# echo $?
1
root@cel-redxp-10[frr-dwalton76]

7 years agoMerge pull request #1188 from opensourcerouting/foreach_indentation
Quentin Young [Sun, 17 Sep 2017 23:23:16 +0000 (19:23 -0400)]
Merge pull request #1188 from opensourcerouting/foreach_indentation

*: use clang's 'ForEachMacros' format style option

7 years agoMerge pull request #1183 from donaldsharp/ospf6_spf
Renato Westphal [Sun, 17 Sep 2017 00:15:58 +0000 (21:15 -0300)]
Merge pull request #1183 from donaldsharp/ospf6_spf

Ospf6 spf

7 years agoMerge pull request #1187 from qlyoung/fix-evpn-buf-uninit
Renato Westphal [Sat, 16 Sep 2017 23:58:30 +0000 (20:58 -0300)]
Merge pull request #1187 from qlyoung/fix-evpn-buf-uninit

bgpd: fix uninitialized value in show cmd

7 years ago*: use clang's 'ForEachMacros' format style option 1188/head
Renato Westphal [Fri, 15 Sep 2017 15:47:35 +0000 (12:47 -0300)]
*: use clang's 'ForEachMacros' format style option

This fixes the broken indentation of several foreach loops throughout
the code.

From clang's documentation[1]:
  ForEachMacros: A vector of macros that should be interpreted as foreach
  loops instead of as function calls.

[1] http://clang.llvm.org/docs/ClangFormatStyleOptions.html

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobgpd: fix uninitialized value in show cmd 1187/head
Quentin Young [Fri, 15 Sep 2017 16:11:17 +0000 (12:11 -0400)]
bgpd: fix uninitialized value in show cmd

When unsupported EVPN route types are are received / displayed with a
show command we print an uninitialized stack buffer.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #1184 from donaldsharp/bgp_evpn_booey
Philippe Guibert [Fri, 15 Sep 2017 14:55:54 +0000 (16:55 +0200)]
Merge pull request #1184 from donaldsharp/bgp_evpn_booey

bgpd: Do not put on outgoing stream type 5 route 2 times

7 years agobgpd: Do not put on outgoing stream type 5 route 2 times 1184/head
Donald Sharp [Fri, 15 Sep 2017 13:49:26 +0000 (09:49 -0400)]
bgpd: Do not put on outgoing stream type 5 route 2 times

With the change to allow bgp_evpn.c to support 2,3 and 5 evpn routes
the output of the route type is being done by bgp_evpn_encode_prefix
instead of the individual route encoder functions.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
7 years agoospf6d: Fix the cli parsing 1183/head
Donald Sharp [Thu, 14 Sep 2017 20:02:18 +0000 (16:02 -0400)]
ospf6d: Fix the cli parsing

We were not properly positioning get_argv command.

Fixes: #1182
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospf6d: Note when we calculated spf
Donald Sharp [Thu, 14 Sep 2017 19:57:54 +0000 (15:57 -0400)]
ospf6d: Note when we calculated spf

Fixes: #1181
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1178 from donaldsharp/pim_obfuscation
Jafar Al-Gharaibeh [Thu, 14 Sep 2017 16:37:29 +0000 (11:37 -0500)]
Merge pull request #1178 from donaldsharp/pim_obfuscation

Pim debugging and ferr start usage

7 years agoMerge pull request #1175 from donaldsharp/pim_sg_rpt_bullshit
Jafar Al-Gharaibeh [Thu, 14 Sep 2017 16:34:47 +0000 (11:34 -0500)]
Merge pull request #1175 from donaldsharp/pim_sg_rpt_bullshit

pimd: More S,G RPT prune state missinformation

7 years agopimd: Allow igmp join messages to return more detailed errors 1178/head
Donald Sharp [Thu, 14 Sep 2017 15:15:52 +0000 (11:15 -0400)]
pimd: Allow igmp join messages to return more detailed errors

Start the conversion of pim configuration commands to use
the ferr side channel to allow more detailed information
to be returned to cli commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add new 'debug pim nht rp' command
Donald Sharp [Thu, 14 Sep 2017 14:28:04 +0000 (10:28 -0400)]
pimd: Add new 'debug pim nht rp' command

All the rp debugs were a mish-mash of TRACE or ZEBRA,
but the reality they were all focused on handling NHT
issues associated with the RP's.  So let's create
a new debug 'debug pim nht rp' if you are having
issues with RP's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: More S,G RPT prune state missinformation 1175/head
Donald Sharp [Wed, 13 Sep 2017 23:43:39 +0000 (19:43 -0400)]
pimd: More S,G RPT prune state missinformation

If you read the extra fine print of the PIM RFC
it asks you to stop the PP Timer and the
Expiry Timer when you are certain S,G RPT states.

This commit puts this into practice and it also
deletes the S,G ifchannel if necessary.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
7 years agoMerge pull request #1162 from opensourcerouting/clean_exit
Russ White [Wed, 13 Sep 2017 20:27:47 +0000 (16:27 -0400)]
Merge pull request #1162 from opensourcerouting/clean_exit

*: make all daemons call frr_fini() on exit

7 years agoMerge pull request #1110 from qlyoung/mtsafe-log
Russ White [Wed, 13 Sep 2017 20:21:56 +0000 (16:21 -0400)]
Merge pull request #1110 from qlyoung/mtsafe-log

lib: mt-safe log.c

7 years agoMerge pull request #1163 from donaldsharp/deduplicate_nexthops
Russ White [Wed, 13 Sep 2017 20:18:41 +0000 (16:18 -0400)]
Merge pull request #1163 from donaldsharp/deduplicate_nexthops

zebra: deduplicate nexthops

7 years agoMerge pull request #1170 from donaldsharp/ospf6d_crashasplat
Russ White [Wed, 13 Sep 2017 20:11:08 +0000 (16:11 -0400)]
Merge pull request #1170 from donaldsharp/ospf6d_crashasplat

ospf6d: Fix crash in prefix-list handling

7 years agoMerge pull request #1171 from qlyoung/max-cli-tokens
Russ White [Wed, 13 Sep 2017 20:09:36 +0000 (16:09 -0400)]
Merge pull request #1171 from qlyoung/max-cli-tokens

lib, doc: increase maximum cli tokens

7 years agoMerge pull request #1169 from donaldsharp/eas_crud
Lou Berger [Wed, 13 Sep 2017 17:19:23 +0000 (13:19 -0400)]
Merge pull request #1169 from donaldsharp/eas_crud

bgpd: Fix warning introduced by PR #1133

7 years agoMerge pull request #1173 from qlyoung/dedup-struct-ecomm
Lou Berger [Wed, 13 Sep 2017 17:16:41 +0000 (13:16 -0400)]
Merge pull request #1173 from qlyoung/dedup-struct-ecomm

bgpd: deduplicate struct definition

7 years agoMerge pull request #1158 from opensourcerouting/ldpd-label-allocation
Donald Sharp [Wed, 13 Sep 2017 16:24:14 +0000 (12:24 -0400)]
Merge pull request #1158 from opensourcerouting/ldpd-label-allocation

ldpd label allocation

7 years agobgpd: deduplicate struct definition 1173/head
Quentin Young [Wed, 13 Sep 2017 15:18:51 +0000 (11:18 -0400)]
bgpd: deduplicate struct definition

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agolib, doc: increase maximum cli tokens 1171/head
Quentin Young [Wed, 13 Sep 2017 14:39:13 +0000 (10:39 -0400)]
lib, doc: increase maximum cli tokens

When matching user input against a CLI graph, we keep a stack of tokens
matched. Stack size was limited to 64, making the effective number of
tokens that could be entered on a line 64. This is too limiting in some
circumstances, so bump it to 256 (and document it).

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #1161 from dslicenc/bgp-vrf-nexthop
Renato Westphal [Wed, 13 Sep 2017 13:46:34 +0000 (10:46 -0300)]
Merge pull request #1161 from dslicenc/bgp-vrf-nexthop

bgpd: fix show ip bgp vrf <vrf> nexthop

7 years agoospf6d: Fix crash in prefix-list handling 1170/head
Donald Sharp [Wed, 13 Sep 2017 13:46:28 +0000 (09:46 -0400)]
ospf6d: Fix crash in prefix-list handling

Commit 427f8e61bb711b51 introduced prefix list callbacks
to handle when a prefix list is changed.  Unfortunately
if you have ospf6 running but not configured it crashes.

Modify ospf6d to not crash when we are not properly configured
yet for prefix-lists handling.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Fix warning introduced by PR #1133 1169/head
Donald Sharp [Wed, 13 Sep 2017 13:14:46 +0000 (09:14 -0400)]
bgpd: Fix warning introduced by PR #1133

I am merely fixing the compiler warning.  I do not
understand what the as value should be for output
to the end user or where it should be retrieved
from.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1133 from opensourcerouting/shift-sign
Daniel Walton [Tue, 12 Sep 2017 21:48:03 +0000 (17:48 -0400)]
Merge pull request #1133 from opensourcerouting/shift-sign

*: fix be32 reading / 24-bit left shift

7 years agozebra: Allow 'show ip route...' to display uptime for all routes 1163/head
Donald Sharp [Tue, 12 Sep 2017 18:58:10 +0000 (14:58 -0400)]
zebra: Allow 'show ip route...' to display uptime for all routes

Display uptime for all route types instead of just for RIP,
OSPFv2, ISIS, NHRP, TABLE? and BGP routes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Modify 'show ip route ...' to show duplicated nexthops
Donald Sharp [Tue, 12 Sep 2017 18:52:20 +0000 (14:52 -0400)]
zebra: Modify 'show ip route ...' to show duplicated nexthops

Add the ability for person issuing 'show ip route...' commands
to see if we've suppressed adding a nexthop to the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: smallify loglock 1110/head
Quentin Young [Tue, 12 Sep 2017 18:49:06 +0000 (14:49 -0400)]
lib: smallify loglock

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agolib: mt-safe log.c
Quentin Young [Tue, 5 Sep 2017 21:40:31 +0000 (17:40 -0400)]
lib: mt-safe log.c

Tentative thread-safety support for zlog. Functions designed to be
called from signal handlers are not mt-safe.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #1165 from dwalton76/bgpd-vrf-redistribute-static
Renato Westphal [Tue, 12 Sep 2017 18:07:20 +0000 (15:07 -0300)]
Merge pull request #1165 from dwalton76/bgpd-vrf-redistribute-static

zebra: api.vrf_id should be re->vrf_id

7 years agozebra: api.vrf_id should be re->vrf_id 1165/head
Daniel Walton [Tue, 12 Sep 2017 18:03:07 +0000 (11:03 -0700)]
zebra: api.vrf_id should be re->vrf_id

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
This fixes route redistribution for VRFs

7 years agoMerge pull request #1156 from donaldsharp/cleaner
Renato Westphal [Tue, 12 Sep 2017 15:42:55 +0000 (12:42 -0300)]
Merge pull request #1156 from donaldsharp/cleaner

Some minor cleanups around zebra code

7 years ago*: make all daemons call frr_fini() on exit 1162/head
Renato Westphal [Tue, 12 Sep 2017 02:05:16 +0000 (23:05 -0300)]
*: make all daemons call frr_fini() on exit

This allow us to find real leaks more easily with tools like valgrind.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobgpd: fix show ip bgp vrf <vrf> nexthop 1161/head
Don Slice [Thu, 7 Sep 2017 19:43:27 +0000 (19:43 +0000)]
bgpd: fix show ip bgp vrf <vrf> nexthop

Problem with not finding the correct bgp instance when doing the command
"show ip bgp vrf <vrf> nexthop" resolved by setting up the arg values
correctly.  Manual testing fine.  bgp-smoke had no new failures.

Ticket: CM-17454
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-6664
7 years agoldpd: guard the label allocation debug messages 1158/head
Renato Westphal [Tue, 12 Sep 2017 12:52:20 +0000 (09:52 -0300)]
ldpd: guard the label allocation debug messages

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: deduplicate nexthops
David Lamparter [Tue, 30 May 2017 14:14:42 +0000 (16:14 +0200)]
zebra: deduplicate nexthops

There exists situations where it is possible to have duplicate
nexthops passed from a higher level protocol into zebra.

This code notices this duplication of nexthops and marks
the duplicates as DUPLICATE so we don't attempt to install
it into the kernel.

This is important on *BSD as I understand it because passing
duplicate nexthops will cause the route to be rejected.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: fix administrative distance issues 1160/head
Renato Westphal [Tue, 12 Sep 2017 01:51:40 +0000 (22:51 -0300)]
zebra: fix administrative distance issues

* Reuse route_distance() on rib_add_multipath() and on rib_add();
* Set the admin distance of LDP and BGP MPLS LSPs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: Fix up default admin distance for some route types
Donald Sharp [Mon, 26 Jun 2017 14:44:50 +0000 (10:44 -0400)]
zebra: Fix up default admin distance for some route types

Set the default admin distance for some route types
more appropriately.  The route_distance function
would return 0 for array items not configured, which
is not the right thing to do.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix broken label allocation
Renato Westphal [Tue, 12 Sep 2017 12:46:31 +0000 (09:46 -0300)]
ldpd: fix broken label allocation

Once ldpd allocated label 48 for a given FEC, all subsequent requests
for a new label would return the same value (48). The problem is that
we were left shifting an uint32_t value up to 64 times, losing important
information.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobgpd: Fix bgp display of blackhole nexthops 1157/head
Donald Sharp [Tue, 12 Sep 2017 12:24:27 +0000 (08:24 -0400)]
bgpd: Fix bgp display of blackhole nexthops

Allow BGP to tell the user that a particular nexthop
is a blackhole nexthop.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Allow recursive nexthop resolution to consider blackholes
Donald Sharp [Tue, 12 Sep 2017 12:18:39 +0000 (08:18 -0400)]
zebra: Allow recursive nexthop resolution to consider blackholes

When we get a route install for a route that needs to be recursively
resolved allow the blackhole to be considered and used if it is
available.

This allows bgp to install a route that will be blackholed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Allow recursively resolved blackhole routes to be installed
Donald Sharp [Tue, 12 Sep 2017 12:14:50 +0000 (08:14 -0400)]
zebra: Allow recursively resolved blackhole routes to be installed

So the current code for a blackhole route assumed that you
would never want a recursively resolved blackhole to work.
Suppose you have this setup:

1) ip route 192.0.2.1/32 Null0
2) BGP installed with a route-map that rewrites the
   nexthop to 192.0.2.1.

Zebra will end up with a recursive nexthop that resolves
to the blackhole.

The original rib install function assumed that we would never
want the ability to recursively resolve a blackhole route.
Instead just handle the blackhole as part of the nexthop_num = 1
case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fix rib_update_table 1156/head
Donald Sharp [Mon, 11 Sep 2017 17:29:24 +0000 (13:29 -0400)]
zebra: Fix rib_update_table

We should only be operating RIB_UPDATE_IF_CHANGE on
types that zebra has control of.  We assume that
the calling routing protocol is going to take care
of their own route changes based upon the interface
state change.

Also try to re-organize the code a tiny bit to allow
it to fit better within a tabed world.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fixup indentation
Donald Sharp [Mon, 11 Sep 2017 17:13:17 +0000 (13:13 -0400)]
zebra: Fixup indentation

RNODE_FOREACH_RE... function calls were not properly being
indented when we switched over to the new format.  Let's fix
this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Small performance improvement for garbage collection
Donald Sharp [Mon, 11 Sep 2017 15:12:03 +0000 (11:12 -0400)]
zebra: Small performance improvement for garbage collection

There is no need to retrieve the zvrf *unless* we are doing
debugs.  So move the retrieval under the debug statement.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agodoc: Cleaned up BGP showing of information section 1153/head
Nigel Kukard [Sat, 9 Sep 2017 10:27:16 +0000 (10:27 +0000)]
doc: Cleaned up BGP showing of information section

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agodoc: English language cleanup
Nigel Kukard [Sat, 9 Sep 2017 10:15:26 +0000 (10:15 +0000)]
doc: English language cleanup

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agodoc: Moved AS regular expressions to BGP regular expressions
Nigel Kukard [Sat, 9 Sep 2017 10:09:27 +0000 (10:09 +0000)]
doc: Moved AS regular expressions to BGP regular expressions

Regular expressions are used throughout in bgp commands, it
should not be in a section under as paths which cannot be
easily found.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agodoc: Clarified the use of show bgp ipv4/ipv6 for communities
Nigel Kukard [Sat, 9 Sep 2017 09:51:09 +0000 (09:51 +0000)]
doc: Clarified the use of show bgp ipv4/ipv6 for communities

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agoMerge pull request #1154 from donaldsharp/bgp_aspath
David Lamparter [Mon, 11 Sep 2017 09:05:08 +0000 (11:05 +0200)]
Merge pull request #1154 from donaldsharp/bgp_aspath

bgpd: Fix AS_PATH size calculation for long paths

7 years agoMerge pull request #1142 from nkukard/lc-docs-master
David Lamparter [Mon, 11 Sep 2017 09:03:20 +0000 (11:03 +0200)]
Merge pull request #1142 from nkukard/lc-docs-master

docs: Added large-community documentation

7 years agoMerge pull request #1084 from donaldsharp/zebra_frame
David Lamparter [Mon, 11 Sep 2017 09:01:39 +0000 (11:01 +0200)]
Merge pull request #1084 from donaldsharp/zebra_frame

zebra: Fix vty_frame usage in zebra

7 years agoMerge pull request #1149 from qlyoung/fix-thread-master-name-leak
David Lamparter [Mon, 11 Sep 2017 08:47:04 +0000 (10:47 +0200)]
Merge pull request #1149 from qlyoung/fix-thread-master-name-leak

lib: free thread master name

7 years ago*: fix be32 reading / 24-bit left shift 1133/head
David Lamparter [Thu, 7 Sep 2017 13:58:18 +0000 (15:58 +0200)]
*: fix be32 reading / 24-bit left shift

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: free thread master name 1149/head
Quentin Young [Fri, 8 Sep 2017 20:39:53 +0000 (16:39 -0400)]
lib: free thread master name

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>