Commit Graph

9014 Commits

Author SHA1 Message Date
Donald Sharp
1ca60f2c3e zebra: Do not allow same rib_dest_t be queued multiple times to meta queue
If we have already scheduled a node to be on the meta_queue, there is no
need to schedule it up again.

On startup we are calling rib_update() multiple times per connected route.
Due to the multiple ways we can get callbacks for adding a connected route
I decided it was best to just improve meta_queue performance as opposed
to trying to figure out all the different ways across all the platforms
that we can decide that a connected route has changed.  This appears
to solve the issue with a very large # of interfaces coming up
at the same time on startup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-25 08:10:24 -04:00
Jafar Al-Gharaibeh
c84ed8700e Merge pull request #1227 from qlyoung/pim-cli-npd
pimd: fix some null pointer derefs in cli
2017-09-23 22:17:38 -05:00
Donald Sharp
a97c617c2b Merge pull request #1231 from opensourcerouting/isis-fixes
Isisd: assorted fixes
2017-09-23 16:47:38 -04:00
Christian Franke
0b8b6cab57 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>
2017-09-23 20:41:22 +02:00
Christian Franke
05278b9378 isisd: cleanup unused variables
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-09-23 19:33:56 +02:00
Christian Franke
3dca3c8c48 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>
2017-09-23 19:33:56 +02:00
Christian Franke
74361f41d9 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>
2017-09-23 19:33:00 +02:00
Donald Sharp
1cec39e765 Merge pull request #1222 from opensourcerouting/isis-spf-improvements
isisd: spf improvements
2017-09-23 08:06:57 -04:00
Donald Sharp
59eeed532e Merge pull request #1215 from opensourcerouting/zapi_nexthops
*: fix segfault when sending more than MULTIPATH_NUM nexthops
2017-09-22 17:50:06 -04:00
Donald Sharp
cb6704629d Merge pull request #1226 from opensourcerouting/isis-fix-fragment-overflow
isisd: Don't corrupt generated LSPs if information exceeds capacity
2017-09-22 17:44:29 -04:00
Quentin Young
21b3e44eb4
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>
2017-09-22 17:27:20 -04:00
Christian Franke
789c4dfc0b 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>
2017-09-22 22:17:20 +02:00
Christian Franke
d78b5f4176 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>
2017-09-22 21:20:26 +02:00
Christian Franke
bded4060fa isisd: use skiplist to implement ordered list for SPF
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-09-22 21:20:03 +02:00
Christian Franke
5d30de83e1 tests: verify isis_vertex_queue correctness
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-09-22 21:19:34 +02:00
Jafar Al-Gharaibeh
b1cebe20cd Merge pull request #1157 from donaldsharp/recursive_blackhole
Recursive blackhole resolution
2017-09-21 11:16:35 -05:00
Renato Westphal
a74e593b35 *: 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>
2017-09-21 11:21:09 -03:00
Donald Sharp
972019ae02 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>
2017-09-21 09:40:58 -04:00
Donald Sharp
00c9a53ddc 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>
2017-09-21 09:40:46 -04:00
Donald Sharp
f637575a9b Merge pull request #1153 from nkukard/docs-ip-bgp-master
doc: updates for master, cherry-picked from my 3.0 branch
2017-09-21 08:50:52 -04:00
Renato Westphal
484aafd43f Merge pull request #1212 from mkanjari/init-fix
bgpd: Intialize all the variables used in argv_find.
2017-09-21 09:34:46 -03:00
Donald Sharp
60c2286880 Merge pull request #1160 from opensourcerouting/admin_distance
Admin distance
2017-09-21 07:55:08 -04:00
Mitesh Kanjariya
8367c32764 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>
2017-09-20 14:56:23 -07:00
Renato Westphal
9650716a11 Merge pull request #1204 from donaldsharp/static_uptime
zebra: Allow static routes to track how long they've been around
2017-09-20 10:26:47 -03:00
Renato Westphal
b74d103e11 Merge pull request #1192 from dwalton76/igmp-group-failure
lib: CMD_FERR_RETURN should return CMD_WARNING_CONFIG_FAILED
2017-09-20 10:06:29 -03:00
Renato Westphal
11a2925408 Merge pull request #1205 from donaldsharp/show_lcommunity
bgpd: Add large community json support
2017-09-20 10:03:28 -03:00
Christian Franke
068c822229 isisd: generate unique circuit ids
Circuit IDs need to be unique, otherwise mayhem will ensue.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-09-20 07:59:09 -04:00
Donald Sharp
bb39652368 Merge pull request #1200 from opensourcerouting/bgpd-ecmp-fix
bgpd: fix sending of ECMP routes with both v4/v6 nexthops to zebra
2017-09-20 07:57:07 -04:00
Donald Sharp
a691ffc998 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
2017-09-20 07:54:19 -04:00
Jafar Al-Gharaibeh
74fae3ffde Merge pull request #1193 from ericpulvino/Sysctl_Recommendations
Adding Useful Sysctl Settings recommendations.
2017-09-19 13:49:00 -05:00
Renato Westphal
d0d695f4f7 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>
2017-09-19 15:14:07 -03:00
Donald Sharp
b96879c0d1 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>
2017-09-19 13:57:35 -04:00
Donald Sharp
d1ca0f1d5b 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>
2017-09-19 13:47:16 -04:00
Jafar Al-Gharaibeh
6a989fc134 Merge pull request #1194 from dwalton76/igmp-rejoin-existing-group
pimd: Do not complain if re-joining an IGMP group
2017-09-19 10:58:47 -05:00
Jafar Al-Gharaibeh
5287239750 Merge pull request #1197 from chiragshah6/ospfv3_dev
ospf6d: OSPFv3 interface bandwidth handling
2017-09-19 10:58:28 -05:00
Lou Berger
d2d080f52e 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>
2017-09-19 10:07:31 -04:00
Chirag Shah
27ae9bcd9d 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>
2017-09-18 15:59:38 -07:00
Jafar Al-Gharaibeh
3fabacd286 Merge pull request #1195 from qlyoung/vtysh-warn-not-running
vtysh: warn on cli targeting non-running daemon
2017-09-18 15:54:07 -05:00
Quentin Young
cde69cc294
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>
2017-09-18 12:35:10 -04:00
Daniel Walton
53d829f5d4 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.
2017-09-18 16:01:21 +00:00
Eric Pulvino
1ec4697626 Adding Useful Sysctl Settings recommendations. 2017-09-18 11:53:29 -04:00
Daniel Walton
7eb09438dd 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]
2017-09-18 15:07:40 +00:00
Quentin Young
a7dd519b58 Merge pull request #1188 from opensourcerouting/foreach_indentation
*: use clang's 'ForEachMacros' format style option
2017-09-17 19:23:16 -04:00
Renato Westphal
af34a65a62 Merge pull request #1183 from donaldsharp/ospf6_spf
Ospf6 spf
2017-09-16 21:15:58 -03:00
Renato Westphal
5e9c9f7484 Merge pull request #1187 from qlyoung/fix-evpn-buf-uninit
bgpd: fix uninitialized value in show cmd
2017-09-16 20:58:30 -03:00
Renato Westphal
a2addae8fe *: 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>
2017-09-15 14:53:46 -03:00
Quentin Young
f9aa3e5549
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>
2017-09-15 12:24:51 -04:00
Philippe Guibert
64ed2a6108 Merge pull request #1184 from donaldsharp/bgp_evpn_booey
bgpd: Do not put on outgoing stream type 5 route 2 times
2017-09-15 16:55:54 +02:00
Donald Sharp
8b45348e8e 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.
2017-09-15 09:49:26 -04:00
Donald Sharp
2026b8afac ospf6d: Fix the cli parsing
We were not properly positioning get_argv command.

Fixes: #1182
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-14 16:03:37 -04:00