Bug 6071: Fix fast path Map-Notify auth data 16/52016/1
authorLorand Jakab <lojakab@cisco.com>
Fri, 17 Feb 2017 21:33:55 +0000 (23:33 +0200)
committerLorand Jakab <lojakab@cisco.com>
Fri, 17 Feb 2017 21:33:55 +0000 (23:33 +0200)
Change-Id: I40884696576be4b311930312e8e09148f15810bb
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/authentication/LispMACAuthentication.java

index 0e6d45c96007fc5c0b8450de9b9bd909d9cf4e8a..f1cc5199ced81f21393040556fa6474108b69bb1 100644 (file)
@@ -78,7 +78,9 @@ public class LispMACAuthentication implements ILispAuthentication {
         if (buffer.hasArray()) {
             bufferAsArray = buffer.array();
         } else {
+            buffer.position(0);
             bufferAsArray = new byte[buffer.limit()];
+            buffer.get(bufferAsArray);
         }
 
         return getAuthenticationData(bufferAsArray, key);