From af72941251c1c1ce6da3fa89a2340c0058a4f75c Mon Sep 17 00:00:00 2001 From: Jian Li Date: Fri, 7 Apr 2017 00:47:56 +0900 Subject: [PATCH] Bugfix: Only reads the replyRecord when map data present bit is set Change-Id: Id4bd28c1bd4f8ad7a6e92f8812cff0f1e66a2048 --- .../lisp/msg/protocols/DefaultLispMapRequest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 43d90f40be..67a49794ff 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 @@ public final class DefaultLispMapRequest extends AbstractLispMessage } // 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)