From: Srini Seetharaman Date: Wed, 19 Jun 2013 23:18:31 +0000 (-0700) Subject: Ensuring that SET_DL_* action with openflowj only uses OFP_ETH_ALEN X-Git-Tag: releasepom-0.1.0~308^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=b2a2bc268af78bd276459193c92313e2bec9679e;hp=-c Ensuring that SET_DL_* action with openflowj only uses OFP_ETH_ALEN bytes, just in case SAL passes more than that. Signed-off-by: Srini Seetharaman --- b2a2bc268af78bd276459193c92313e2bec9679e diff --git a/third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionDataLayer.java b/third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionDataLayer.java index 79edf904f1..f637b21e1e 100644 --- a/third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionDataLayer.java +++ b/third-party/openflowj/src/main/java/org/openflow/protocol/action/OFActionDataLayer.java @@ -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 +}