commit | 03205d29abf795d203aec26dfe58d704df7511ce | [log] [tgz] |
---|---|---|
author | Shashikanth VH <shashikanth.vh@huawei.com> | Fri Feb 19 22:48:08 2016 +0530 |
committer | Gerrit Code Review <gerrit@onlab.us> | Fri Feb 19 18:43:05 2016 +0000 |
tree | 62d27a19a72382ab4fbd9c4fb42d720987c03375 | |
parent | 580bdeb64fa978cb718220e5dc606c1aff372dd0 [diff] [blame] |
BGP flow spec system test update message parsing issues fix. Change-Id: Ic2d615e1f449e93d937802ce3f9f33e468d42423
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpFsActionTrafficMarking.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpFsActionTrafficMarking.java index 6aee0f4..dbc399c 100755 --- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpFsActionTrafficMarking.java +++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpFsActionTrafficMarking.java
@@ -30,6 +30,7 @@ public static final short TYPE = Constants.BGP_FLOWSPEC_ACTION_TRAFFIC_MARKING; private byte[] dscpValue; + public static final byte DSCP_LEN = 6; /** * Constructor to initialize the value. @@ -82,9 +83,8 @@ */ public static BgpFsActionTrafficMarking read(ChannelBuffer cb) throws BgpParseException { byte[] dscpValue; - ChannelBuffer tempCb = cb.copy(); - dscpValue = tempCb.readBytes(tempCb.readableBytes()).array(); + dscpValue = cb.readBytes(DSCP_LEN).array(); return new BgpFsActionTrafficMarking(dscpValue); }