commit | ef0f7231468657e23fc1e83508db026dd2577ae9 | [log] [tgz] |
---|---|---|
author | Jian Li <pyguni@gmail.com> | Tue Nov 15 19:55:46 2016 +0900 |
committer | Jian Li <pyguni@gmail.com> | Thu Nov 17 16:55:35 2016 +0000 |
tree | d3a5e9ade7e7f57bbc7822058ceab63f2eec9aea | |
parent | 382243012ac88b3682e1267d34d8567e48596bc2 [diff] [blame] |
Bugfix: Parse the LCAF address by referring to length field value Change-Id: Ia43521f531ad03f609219048f0fb1485118cd181
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispListLcafAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispListLcafAddress.java index 170737c..eb86b65 100644 --- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispListLcafAddress.java +++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispListLcafAddress.java
@@ -186,6 +186,7 @@ @Override public void writeTo(ByteBuf byteBuf, LispListLcafAddress address) throws LispWriterException { + int lcafIndex = byteBuf.writerIndex(); LispLcafAddress.serializeCommon(byteBuf, address); LispIpv4Address.Ipv4AddressWriter v4Writer = new LispIpv4Address.Ipv4AddressWriter(); @@ -201,6 +202,8 @@ // IPv6 address byteBuf.writeShort(ipv6.getAfi().getIanaCode()); v6Writer.writeTo(byteBuf, (LispIpv6Address) ipv6); + + LispLcafAddress.updateLength(lcafIndex, byteBuf); } } }