commit | 55e43a8a9555088e3eb6cbb0a5787237be5809bf | [log] [tgz] |
---|---|---|
author | subhasis777 <subhasis.mo@samsung.com> | Sun Feb 12 07:46:09 2017 +0530 |
committer | subhasis777 <subhasis.mo@samsung.com> | Sun Feb 12 07:46:09 2017 +0530 |
tree | 8190618c3f909750169885cf7fa408d4637a41b5 | |
parent | d44e0ac9331722b26b3ee7b06c00bfcfa29a3051 [diff] |
Bad comparison of signed byte with 240 in org.onosproject.bgpio.types.MpUnReachNlri.read Change-Id: I316610b388cb863755c10bc47a42fb68cf3a967a
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MpReachNlri.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MpReachNlri.java index 12c3c62..8f57e1b 100644 --- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MpReachNlri.java +++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MpReachNlri.java
@@ -207,7 +207,7 @@ routeDistinguisher = RouteDistinguisher.read(tempCb); } while (tempCb.readableBytes() > 0) { - short totNlriLen = tempCb.getByte(tempCb.readerIndex()); + short totNlriLen = tempCb.getUnsignedByte(tempCb.readerIndex()); if (totNlriLen >= BgpFlowSpecNlri.FLOW_SPEC_LEN) { if (tempCb.readableBytes() < 2) { Validation.validateLen(BgpErrorType.UPDATE_MESSAGE_ERROR,
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MpUnReachNlri.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MpUnReachNlri.java index ebeef61..cdd334c 100644 --- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MpUnReachNlri.java +++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MpUnReachNlri.java
@@ -161,7 +161,7 @@ routeDistinguisher = RouteDistinguisher.read(tempCb); } while (tempCb.readableBytes() > 0) { - short totNlriLen = tempCb.getByte(tempCb.readerIndex()); + short totNlriLen = tempCb.getUnsignedByte(tempCb.readerIndex()); if (totNlriLen >= BgpFlowSpecNlri.FLOW_SPEC_LEN) { if (tempCb.readableBytes() < 2) { Validation.validateLen(BgpErrorType.UPDATE_MESSAGE_ERROR,