Change-Id:I91cd687f3177829862b6aac4a8bce8bd53f7baa5
Signed-off-by: Madhu Venugopal <vmadhu@cisco.com>
* Deriving the Total Length here
*/
int payloadLength = 0;
* Deriving the Total Length here
*/
int payloadLength = 0;
- try {
- payloadLength = payload.serialize().length;
- } catch (PacketException e) {
- logger.error("", e);
+ if (payload != null) {
+ try {
+ payloadLength = payload.serialize().length;
+ } catch (PacketException e) {
+ logger.error("", e);
+ }
}
this.setTotalLength((short) (this.getHeaderLen() + payloadLength));
}
this.setTotalLength((short) (this.getHeaderLen() + payloadLength));
@Override
public byte[] getNodeMAC(Node node) {
@Override
public byte[] getNodeMAC(Node node) {
- MacAddress mac = (MacAddress) nodeProps.get(MacAddress.name);
+ MacAddress mac = (MacAddress) this.getNodeProp(node,
+ MacAddress.name);
return (mac != null) ? mac.getMacAddress() : null;
}
return (mac != null) ? mac.getMacAddress() : null;
}