Bug fixes of calculating message length for InfoRequest/Reply
Changes
1. Wrap added InfoReqest processing with try..finally statement
2. InfoRequest serialize bug fix
3. Overide WriteTo() methods of DefaultLispInfoRequest
and DefaultLispReply
Change-Id: Ifc74619508a004f3fa7c940c30a5905d2cd27963
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReplyTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReplyTest.java
index 6b68d54..6ff19a7 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReplyTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReplyTest.java
@@ -72,7 +72,7 @@
.withNonce(1L)
.withKeyId((short) 1)
.withAuthKey(AUTH_KEY)
- .withIsInfoReply(false)
+ .withIsInfoReply(true)
.withMaskLength((byte) 1)
.withEidPrefix(address1)
.withNatLcafAddress(natLcafAddress1).build();
@@ -83,7 +83,7 @@
.withNonce(1L)
.withKeyId((short) 1)
.withAuthKey(AUTH_KEY)
- .withIsInfoReply(false)
+ .withIsInfoReply(true)
.withMaskLength((byte) 1)
.withEidPrefix(address1)
.withNatLcafAddress(natLcafAddress1).build();
@@ -145,7 +145,7 @@
.withPrivateEtrRlocAddress(privateEtrRlocAddress1)
.build();
- assertThat(reply.isInfoReply(), is(false));
+ assertThat(reply.isInfoReply(), is(true));
assertThat(reply.getNonce(), is(1L));
assertThat(reply.getKeyId(), is((short) 1));
assertThat(reply.getMaskLength(), is((byte) 1));