summaryrefslogtreecommitdiffstats
path: root/routing
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-12-14 15:51:51 +0100
committerMarek Gradzki <mgradzki@cisco.com>2016-12-14 17:17:57 +0000
commit618d9fb357be27b06d27608fa1fc4aecb557c548 (patch)
tree3deb517316fe1705164964215892e56f64738232 /routing
parentc5e153510d4ca0c36bce6e97a72631e41fdcc60a (diff)
HONEYCOMB-315 - Quickfix to prevent JNI crash in routing
Prevents JNI crash cause by unspecified int array in routing api request Reported as JVpp bug in VPP-559 Change-Id: I5da88e40080f96df2321c5d6ede5965283233c3e Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'routing')
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java5
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java1
2 files changed, 6 insertions, 0 deletions
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
index 63ee5a13e..5bf87f732 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
@@ -133,6 +133,11 @@ public interface RouteRequestProducer extends ByteDataTranslator, AddressTransla
request.classifyTableIndex = classifyTableIndex;
request.isClassify = classifyTableSet;
+ // not used, prevents crash
+ // TODO - remove after VPP-559
+ request.nextHopOutLabelStack = new int[0];
+
+
return request;
}
}
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java
index a13364db8..976481256 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java
@@ -113,6 +113,7 @@ public interface RoutingRequestTestHelper extends ByteDataTranslator, FutureProd
request.isLocal = toByte(isLocal);
request.isUnreach = toByte(isUnreach);
request.isProhibit = toByte(isProhibit);
+ request.nextHopOutLabelStack = new int[0];
return request;
}