Fixed pom.xml issues and build issues. Corrected checkstyle issues
Change-Id: I90744f53e40f417ffe7ae62ffe138eea7a489bc0
diff --git a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/types/NetworkLsa.java b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/types/NetworkLsa.java
index 07465b2..8dbe3a3 100644
--- a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/types/NetworkLsa.java
+++ b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/types/NetworkLsa.java
@@ -136,7 +136,7 @@
byte[] lsaMessage = null;
byte[] lsaHeader = getLsaHeaderAsByteArray();
- byte[] lsaBody = getLSABodyAsByteArray();
+ byte[] lsaBody = getLsaBodyAsByteArray();
lsaMessage = Bytes.concat(lsaHeader, lsaBody);
return lsaMessage;
@@ -148,7 +148,7 @@
* @return LSA body as byte array
* @throws OspfParseException might throws exception while parsing packet
*/
- public byte[] getLSABodyAsByteArray() throws OspfParseException {
+ public byte[] getLsaBodyAsByteArray() throws OspfParseException {
List<Byte> bodyLst = new ArrayList<>();
try {
diff --git a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/package-info.java b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/package-info.java
index 592020d..e7e0e8e 100644
--- a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/package-info.java
+++ b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/package-info.java
@@ -1,20 +1,20 @@
-/*
- * Copyright 2016 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Implementation of the different types of OSPF Packets.
- */
-package org.onosproject.ospf.protocol.ospfpacket;
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Implementation of the different types of OSPF Packets.
+ */
+package org.onosproject.ospf.protocol.ospfpacket;
diff --git a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/types/LsRequest.java b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/types/LsRequest.java
index 636d1b6..f1940df 100644
--- a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/types/LsRequest.java
+++ b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/types/LsRequest.java
@@ -13,36 +13,184 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.ospf.protocol.util;
+package org.onosproject.ospf.protocol.ospfpacket.types;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.primitives.Bytes;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.onlab.packet.Ip4Address;
+import org.onosproject.ospf.exceptions.OspfParseException;
+import org.onosproject.ospf.protocol.ospfpacket.OspfPacketHeader;
+import org.onosproject.ospf.protocol.ospfpacket.subtype.LsRequestPacket;
+import org.onosproject.ospf.protocol.util.OspfPacketType;
+import org.onosproject.ospf.protocol.util.OspfUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.List;
/**
- * Representation of different OSPF packet types.
+ * Representation of an OSPF Link State Request packet.
+ * Link State Request packets are OSPF packet type 3. After exchanging
+ * database description packets with a neighboring router, a router may
+ * find that parts of its link-state database are out-of-date. The
+ * Link State Request packet is used to request the pieces of the
+ * neighbor's database that are more up-to-date.
*/
-public enum OspfPacketType {
+public class LsRequest extends OspfPacketHeader {
+ /*
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Version # | 3 | Packet length |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Router ID |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Area ID |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Checksum | AuType |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Authentication |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Authentication |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | LS type |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Link State ID |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Advertising Router |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | ... |
- HELLO(1),
- DD(2),
- LSREQUEST(3),
- LSUPDATE(4),
- LSAACK(5);
-
- private int value;
+ LsRequest Message Format
+ REFERENCE : RFC 2328
+ */
+ private static final Logger log = LoggerFactory.getLogger(LsRequest.class);
+ private List<LsRequestPacket> linkStateRequests = new ArrayList<>();
/**
- * Creates instance of OSPF packet types.
- *
- * @param value
+ * Creates an instance of link state request packet.
*/
- OspfPacketType(int value) {
- this.value = value;
+ public LsRequest() {
}
/**
- * Gets the value.
+ * Creates an instance of link state request packet.
*
- * @return value
+ * @param ospfHeader OSPF header instance.
*/
- public int value() {
- return value;
+ public LsRequest(OspfPacketHeader ospfHeader) {
+ populateHeader(ospfHeader);
+ }
+
+ /**
+ * Adds link state request.
+ *
+ * @param lsRequestPacket ls request packet instance
+ */
+ public void addLinkStateRequests(LsRequestPacket lsRequestPacket) {
+ if (!linkStateRequests.contains(lsRequestPacket)) {
+ linkStateRequests.add(lsRequestPacket);
+ }
+ }
+
+ /**
+ * Gets link state request packet instance.
+ *
+ * @return link state request packet instance
+ */
+ public List<LsRequestPacket> getLinkStateRequests() {
+ return linkStateRequests;
+ }
+
+ @Override
+ public OspfPacketType ospfMessageType() {
+ return OspfPacketType.LSREQUEST;
+ }
+
+ @Override
+ public void readFrom(ChannelBuffer channelBuffer) throws OspfParseException {
+
+ while (channelBuffer.readableBytes() >= OspfUtil.LSREQUEST_LENGTH) {
+ LsRequestPacket lsRequestPacket = new LsRequestPacket();
+ lsRequestPacket.setLsType(channelBuffer.readInt());
+ byte[] tempByteArray = new byte[OspfUtil.FOUR_BYTES];
+ channelBuffer.readBytes(tempByteArray, 0, OspfUtil.FOUR_BYTES);
+ lsRequestPacket.setLinkStateId(Ip4Address.valueOf(tempByteArray).toString());
+ tempByteArray = new byte[OspfUtil.FOUR_BYTES];
+ channelBuffer.readBytes(tempByteArray, 0, OspfUtil.FOUR_BYTES);
+ lsRequestPacket.setOwnRouterId(Ip4Address.valueOf(tempByteArray).toString());
+
+ this.addLinkStateRequests(lsRequestPacket);
+ }
+ }
+
+ @Override
+ public byte[] asBytes() {
+ byte[] lsrMessage = null;
+ byte[] lsrHeader = getLsrHeaderAsByteArray();
+ byte[] lsrBody = getLsrBodyAsByteArray();
+ lsrMessage = Bytes.concat(lsrHeader, lsrBody);
+
+ return lsrMessage;
+ }
+
+ /**
+ * Gets LS request packet header as byte array.
+ *
+ * @return LS request packet header as byte array
+ */
+ public byte[] getLsrHeaderAsByteArray() {
+ List<Byte> headerLst = new ArrayList<>();
+
+ try {
+ headerLst.add((byte) this.ospfVersion());
+ headerLst.add((byte) this.ospfType());
+ headerLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.ospfPacLength())));
+ headerLst.addAll(Bytes.asList(this.routerId().toOctets()));
+ headerLst.addAll(Bytes.asList(this.areaId().toOctets()));
+ headerLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.checksum())));
+ headerLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.authType())));
+ //Authentication is 0 always. Total 8 bytes consist of zero
+ byte[] auth = new byte[OspfUtil.EIGHT_BYTES];
+ headerLst.addAll(Bytes.asList(auth));
+ } catch (Exception e) {
+ log.debug("Error::getLsrBodyAsByteArray {}", e.getMessage());
+ return Bytes.toArray(headerLst);
+ }
+
+ return Bytes.toArray(headerLst);
+ }
+
+ /**
+ * Gets LS request packet body as byte array.
+ *
+ * @return LS request packet body as byte array
+ */
+ public byte[] getLsrBodyAsByteArray() {
+ List<Byte> bodyLst = new ArrayList<>();
+
+ try {
+ for (LsRequestPacket lsrPacket : linkStateRequests) {
+ bodyLst.addAll(Bytes.asList(OspfUtil.convertToFourBytes(lsrPacket.lsType())));
+ bodyLst.addAll(Bytes.asList(InetAddress.getByName(lsrPacket.linkStateId()).getAddress()));
+ bodyLst.addAll(Bytes.asList(InetAddress.getByName(lsrPacket.ownRouterId()).getAddress()));
+ }
+ } catch (Exception e) {
+ log.debug("Error::getLsrBodyAsByteArray {}", e.getMessage());
+ return Bytes.toArray(bodyLst);
+ }
+
+ return Bytes.toArray(bodyLst);
+ }
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(getClass())
+ .omitNullValues()
+ .add("linkStateRequests", linkStateRequests)
+ .toString();
}
}
\ No newline at end of file
diff --git a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/types/LsUpdate.java b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/types/LsUpdate.java
index e9c80e2..41ab3da 100644
--- a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/types/LsUpdate.java
+++ b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/types/LsUpdate.java
@@ -181,9 +181,9 @@
addLsa(asbrSummaryLsa);
break;
case OspfParameters.SUMMARY:
- SummaryLsa summaryLSA = new SummaryLsa(header);
- summaryLSA.readFrom(channelBuffer.readBytes(lsaLength - OspfUtil.LSA_HEADER_LENGTH));
- addLsa(summaryLSA);
+ SummaryLsa summaryLsa = new SummaryLsa(header);
+ summaryLsa.readFrom(channelBuffer.readBytes(lsaLength - OspfUtil.LSA_HEADER_LENGTH));
+ addLsa(summaryLsa);
break;
case OspfParameters.EXTERNAL_LSA:
ExternalLsa externalLsa = new ExternalLsa(header);
diff --git a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/linksubtype/UnreservedBandwidthTest.java b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/linksubtype/UnreservedBandwidthTest.java
index 0357ea1..cc21712 100644
--- a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/linksubtype/UnreservedBandwidthTest.java
+++ b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/linksubtype/UnreservedBandwidthTest.java
@@ -97,7 +97,7 @@
* Tests getLinkSubTypeTlvBodyAsByteArray() method.
*/
@Test
- public void testGetLinkSubTypeTLVBodyAsByteArray() throws Exception {
+ public void testGetLinkSubTypeTlvBodyAsByteArray() throws Exception {
result = unreservedBandwidth.getLinkSubTypeTlvBodyAsByteArray();
assertThat(result, is(notNullValue()));
}
diff --git a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/tlvtypes/RouterTlvTest.java b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/tlvtypes/RouterTlvTest.java
index 9a3d10e..e946ec0 100644
--- a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/tlvtypes/RouterTlvTest.java
+++ b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/tlvtypes/RouterTlvTest.java
@@ -112,7 +112,7 @@
* Tests getTlvBodyAsByteArray() method.
*/
@Test(expected = Exception.class)
- public void testGetTLVBodyAsByteArray() throws Exception {
+ public void testGetTlvBodyAsByteArray() throws Exception {
result = rtlv.getTlvBodyAsByteArray();
assertThat(result, is(notNullValue()));
}
@@ -124,4 +124,4 @@
public void testToString() throws Exception {
assertThat(rtlv.toString(), is(notNullValue()));
}
-}
+}
\ No newline at end of file
diff --git a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/types/NetworkLsaTest.java b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/types/NetworkLsaTest.java
index ecbd449..d2f1a2c 100644
--- a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/types/NetworkLsaTest.java
+++ b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/types/NetworkLsaTest.java
@@ -164,7 +164,7 @@
networkLsa.addAttachedRouter(Ip4Address.valueOf("1.1.1.1"));
networkLsa.addAttachedRouter(Ip4Address.valueOf("2.2.2.2"));
networkLsa.addAttachedRouter(Ip4Address.valueOf("3.3.3.3"));
- result1 = networkLsa.getLSABodyAsByteArray();
+ result1 = networkLsa.getLsaBodyAsByteArray();
assertThat(result1, is(notNullValue()));
}
@@ -177,7 +177,7 @@
networkLsa.addAttachedRouter(Ip4Address.valueOf("1.1.1.1"));
networkLsa.addAttachedRouter(Ip4Address.valueOf("2.2.2.2"));
networkLsa.addAttachedRouter(Ip4Address.valueOf("3.3.3.3"));
- result1 = networkLsa.getLSABodyAsByteArray();
+ result1 = networkLsa.getLsaBodyAsByteArray();
assertThat(result1, is(notNullValue()));
}
diff --git a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/OspfMessageReaderTest.java b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/OspfMessageReaderTest.java
index 8b1d089..8d11f11 100644
--- a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/OspfMessageReaderTest.java
+++ b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/OspfMessageReaderTest.java
@@ -43,9 +43,9 @@
-86, 8, -64, -88, -86, 8};
private final byte[] packet4 = {1, 1, 1, 1, 2, 4, 1, 36, -64, -88, -86, 3, 0,
0, 0, 1, 54, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
- 2, 2, 1, -64, -88, -86, 3, -64, -88, -86, 3, -128, 0
- , 0, 1, 58, -100, 0, 48, 2, 0, 0, 2, -64, -88, -86
- , 0, -1, -1, -1, 0, 3, 0, 0, 10, -64, -88, -86, 0,
+ 2, 2, 1, -64, -88, -86, 3, -64, -88, -86, 3, -128, 0,
+ 0, 1, 58, -100, 0, 48, 2, 0, 0, 2, -64, -88, -86,
+ 0, -1, -1, -1, 0, 3, 0, 0, 10, -64, -88, -86, 0,
-1, -1, -1, 0, 3, 0, 0, 10, 0, 3, 2, 5, 80, -44,
16, 0, -64, -88, -86, 2, -128, 0, 0, 1, 42, 73, 0,
36, -1, -1, -1, -1, -128, 0, 0, 20, 0, 0, 0, 0, 0,
@@ -55,8 +55,8 @@
3, 2, 5, -64, -126, 120, 0, -64, -88, -86, 2, -128, 0,
0, 1, -45, 25, 0, 36, -1, -1, -1, 0, -128, 0, 0, 20,
0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 5, -64, -88, 0, 0,
- -64, -88, -86, 2, -128, 0, 0, 1, 55, 8, 0, 36, -1, -1
- , -1, 0, -128, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ -64, -88, -86, 2, -128, 0, 0, 1, 55, 8, 0, 36, -1, -1,
+ -1, 0, -128, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3, 2, 5, -64, -88, 1, 0, -64, -88, -86, 2, -128, 0, 0,
1, 44, 18, 0, 36, -1, -1, -1, 0, -128, 0, 0, 20, 0, 0,
0, 0, 0, 0, 0, 0, 0, 3, 2, 5, -64, -88, -84, 0, -64,
@@ -101,4 +101,4 @@
assertThat(ospfMessageReader, is(notNullValue()));
}
-}
+}
\ No newline at end of file
diff --git a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/types/LsAcknowledgeTest.java b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/types/LsAcknowledgeTest.java
index dd5af91..efbcce7 100644
--- a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/types/LsAcknowledgeTest.java
+++ b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/types/LsAcknowledgeTest.java
@@ -95,17 +95,6 @@
assertThat(lsAck, is(notNullValue()));
}
-
- /**
- * Tests ospfMessageType() getter method.
- */
- @Test
- public void testGetOSPFMessageType() throws Exception {
- ospfPacketType = lsAck.ospfMessageType();
- assertThat(ospfPacketType, is(notNullValue()));
- assertThat(ospfPacketType, is(OspfPacketType.LSAACK));
- }
-
/**
* Tests ospfMessageType() getter method.
*/
diff --git a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/types/LsUpdateTest.java b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/types/LsUpdateTest.java
index 8d48099..9607bc1 100644
--- a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/types/LsUpdateTest.java
+++ b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/types/LsUpdateTest.java
@@ -102,7 +102,7 @@
private SummaryLsa ospflsa2;
private AsbrSummaryLsa ospflsa3;
private ExternalLsa ospflsa4;
- private Vector<OspfLsa> listLSA = new Vector();
+ private Vector<OspfLsa> listLsa = new Vector();
private List lsa;
private int result;
private OspfPacketType ospfMessageType;
@@ -151,7 +151,7 @@
ospflsa2 = null;
ospflsa3 = null;
ospflsa4 = null;
- listLSA.clear();
+ listLsa.clear();
lsa = null;
ospfMessageType = null;
ospfPacketHeader = null;
@@ -325,13 +325,13 @@
byte[] lsUpdatePacket = {0, 0, 0, 7, 0, 2, 2,
1, -64, -88, -86, 3, -64, -88, -86, 3, -128, 0, 0, 1, 58,
-100, 0, 48, 2, 0, 0, 2, -64, -88, -86, 0, -1, -1, -1, 0,
- 3, 0, 0, 10, -64, -88, -86, 0, -1, -1, -1, 0, 3, 0, 0, 10
- , 0, 3, 2, 5, 80, -44, 16, 0, -64, -88, -86, 2, -128, 0, 0
- , 1, 42, 73, 0, 36, -1, -1, -1, -1, -128, 0, 0, 20, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 3, 2, 5, -108, 121, -85, 0, -64, -88
- , -86, 2, -128, 0, 0, 1, 52, -91, 0, 36, -1, -1, -1, 0,
- -128, 0, 0, 20, -64, -88, -86, 1, 0, 0, 0, 0, 0, 3, 2, 5
- , -64, -126, 120, 0, -64, -88, -86, 2, -128, 0, 0, 1, -45,
+ 3, 0, 0, 10, -64, -88, -86, 0, -1, -1, -1, 0, 3, 0, 0, 10,
+ 0, 3, 2, 5, 80, -44, 16, 0, -64, -88, -86, 2, -128, 0, 0,
+ 1, 42, 73, 0, 36, -1, -1, -1, -1, -128, 0, 0, 20, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3, 2, 5, -108, 121, -85, 0, -64, -88,
+ -86, 2, -128, 0, 0, 1, 52, -91, 0, 36, -1, -1, -1, 0,
+ -128, 0, 0, 20, -64, -88, -86, 1, 0, 0, 0, 0, 0, 3, 2, 5,
+ -64, -126, 120, 0, -64, -88, -86, 2, -128, 0, 0, 1, -45,
25, 0, 36, -1, -1, -1, 0, -128, 0, 0, 20, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 2, 5, -64, -88, 0, 0, -64, -88, -86, 2,
-128, 0, 0, 1, 55, 8, 0, 36, -1, -1, -1, 0, -128, 0, 0,
diff --git a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/util/OspfUtilTest.java b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/util/OspfUtilTest.java
index 750a08d..ccc64f3 100644
--- a/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/util/OspfUtilTest.java
+++ b/protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/util/OspfUtilTest.java
@@ -295,8 +295,8 @@
48, 0, 0, 0, 2, 1, 1, 1, 1, 10, 10, 10, 7, 1, 0, 0, 10, 10, 10, 10, 0, -1, -1, -1,
0, 3, 0, 0, 10, 0, 10, 66, 10, 1, 0, 0, 1, 7, 7, 7, 7, -128, 0, 0, 1, -64, 79, 0,
116, 0, 1, 0, 4, 0, 0, 0, 0, 0, 2, 0, 84, 0, 1, 0, 1, 1, 0, 0, 0, 0, 2, 0, 4, 10,
- 10, 10, 0, 0, 5, 0, 4, 0, 0, 0, 0, 0, 6, 0, 4, 73, -104, -106, -128, 0, 7, 0, 4, 73
- , -104, -106, -128, 0, 8, 0, 32, 73, -104, -106, -128, 73, -104, -106, -128, 73, -104, -106,
+ 10, 10, 0, 0, 5, 0, 4, 0, 0, 0, 0, 0, 6, 0, 4, 73, -104, -106, -128, 0, 7, 0, 4, 73,
+ -104, -106, -128, 0, 8, 0, 32, 73, -104, -106, -128, 73, -104, -106, -128, 73, -104, -106,
-128, 73, -104, -106, -128, 73, -104, -106, -128, 73, -104, -106, -128, 73, -104, -106, -128,
73, -104, -106, -128, 0, 9, 0, 4, 0, 0, 0, 0};
channelBuffer = ChannelBuffers.copiedBuffer(header);