Bugfix: Only reads the replyRecord when map data present bit is set

Change-Id: Id4bd28c1bd4f8ad7a6e92f8812cff0f1e66a2048
(cherry picked from commit af72941251c1c1ce6da3fa89a2340c0058a4f75c)
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/DefaultLispMapRequest.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/DefaultLispMapRequest.java
index 43d90f4..67a4979 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/DefaultLispMapRequest.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/DefaultLispMapRequest.java
@@ -375,7 +375,12 @@
             }
 
             // reply record -> 32 bits
-            int replyRecord = byteBuf.readInt();
+            int replyRecord = 0;
+
+            // only obtains the reply record when map data present bit is set
+            if (mapDataPresent) {
+                replyRecord = byteBuf.readInt();
+            }
 
             return new DefaultRequestBuilder()
                         .withIsAuthoritative(authoritative)