Skip to content
Snippets Groups Projects
Commit 05d17fe4 authored by Sandip Shah's avatar Sandip Shah
Browse files

Setting action length for list of actions

parent 4f5e3187
No related branches found
No related tags found
No related merge requests found
...@@ -733,7 +733,13 @@ public class LinkDiscoveryManager implements IOFMessageListener, ...@@ -733,7 +733,13 @@ public class LinkDiscoveryManager implements IOFMessageListener,
List<OFAction> actions = getDiscoveryActions(iofSwitch, ofpPort); List<OFAction> actions = getDiscoveryActions(iofSwitch, ofpPort);
po.setActions(actions); po.setActions(actions);
po.setActionsLength(getDiscoveryActionsLength(iofSwitch, ofpPort));
short actionLength = 0;
Iterator <OFAction> actionIter = actions.iterator();
while (actionIter.hasNext()) {
actionLength += actionIter.next().getLength();
}
po.setActionsLength(actionLength);
// set data // set data
po.setLengthU(OFPacketOut.MINIMUM_LENGTH + po.getActionsLength() po.setLengthU(OFPacketOut.MINIMUM_LENGTH + po.getActionsLength()
...@@ -751,11 +757,6 @@ public class LinkDiscoveryManager implements IOFMessageListener, ...@@ -751,11 +757,6 @@ public class LinkDiscoveryManager implements IOFMessageListener,
} }
protected short getDiscoveryActionsLength(IOFSwitch iofSwitch,
OFPhysicalPort ofpPort) {
return (short) OFActionOutput.MINIMUM_LENGTH;
}
/** /**
* Send LLDPs to all switch-ports * Send LLDPs to all switch-ports
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment