From 618d9fb357be27b06d27608fa1fc4aecb557c548 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Wed, 14 Dec 2016 15:51:51 +0100 Subject: 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 --- .../java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java | 5 +++++ .../java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java | 1 + 2 files changed, 6 insertions(+) (limited to 'routing') 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; } -- cgit 1.2.3-korg