HONEYCOMB-315 - Quickfix to prevent JNI crash in routing 81/4281/3
authorJan Srnicek <[email protected]>
Wed, 14 Dec 2016 14:51:51 +0000 (15:51 +0100)
committerMarek Gradzki <[email protected]>
Wed, 14 Dec 2016 17:17:57 +0000 (17:17 +0000)
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 <[email protected]>
routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java

index 63ee5a1..5bf87f7 100644 (file)
@@ -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;
     }
 }
index a13364d..9764812 100644 (file)
@@ -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;
     }