Bug 1947 - fixed IndexOutOfBounds exception on MultipartReplyMessage deserialization 09/11309/1
authorMichal Polkorab <michal.polkorab@pantheon.sk>
Thu, 18 Sep 2014 09:15:25 +0000 (11:15 +0200)
committerMichal Polkorab <michal.polkorab@pantheon.sk>
Thu, 18 Sep 2014 09:15:31 +0000 (11:15 +0200)
Change-Id: I8306c731cf58d004c89fdf3e1dd336adaaacef5e
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
extension/openflowjava-extension-nicira/src/main/java/org/opendaylight/openflowjava/nx/codec/action/OutputRegCodec.java

index fd20da0742283834249ea518c649c2da0662bbfc..813cd99a54f9564f5b871353594ceda0d453658d 100644 (file)
@@ -29,6 +29,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev1
 public class OutputRegCodec extends AbstractActionCodec {
     public static final int LENGTH = 24;
     public static final byte SUBTYPE = 15; // NXAST_OUTPUT_REG
+    public static final byte PADDING_IN_OUTPUT_REG_ACTION = 6;
     public static final NiciraActionSerializerKey SERIALIZER_KEY = 
             new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, NxmNxOutputReg.class);
     public static final NiciraActionDeserializerKey DESERIALIZER_KEY = 
@@ -51,6 +52,7 @@ public class OutputRegCodec extends AbstractActionCodec {
         builder.setNBits(message.readUnsignedShort());
         builder.setSrc(message.readUnsignedInt());
         builder.setMaxLen(message.readUnsignedShort());
+        message.skipBytes(PADDING_IN_OUTPUT_REG_ACTION);
         OfjAugNxActionBuilder augNxActionBuilder = new OfjAugNxActionBuilder();
         augNxActionBuilder.setActionOutputReg(builder.build());
         actionBuilder.addAugmentation(ExperimenterIdAction.class,