Ensuring that SET_DL_* action with openflowj only uses OFP_ETH_ALEN 06/506/1
authorSrini Seetharaman <srini.seetharaman@gmail.com>
Wed, 19 Jun 2013 23:18:31 +0000 (16:18 -0700)
committerSrini Seetharaman <srini.seetharaman@gmail.com>
Wed, 19 Jun 2013 23:18:31 +0000 (16:18 -0700)
bytes, just in case SAL passes more than that.

Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionDataLayer.java

index 79edf90..f637b21 100644 (file)
@@ -44,7 +44,7 @@ public abstract class OFActionDataLayer extends OFAction {
     @Override
     public void writeTo(ByteBuffer data) {
         super.writeTo(data);
-        data.put(this.dataLayerAddress);
+        data.put(this.dataLayerAddress, 0, OFPhysicalPort.OFP_ETH_ALEN);
         data.putInt(0);
         data.putShort((short) 0);
     }
@@ -74,4 +74,4 @@ public abstract class OFActionDataLayer extends OFAction {
         }
         return true;
     }
-}
\ No newline at end of file
+}