summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
be618d1)
ISSUE: I suggested to make NetUtils.broadcastMacAddr public, but that was no
a good idea as we already have the getter and because that is an arra
therefore vulnerable to modifications.
Change-Id: I098ca828d79ffe1d478c761d8b749ee100dfba5b
Signed-off-by: Alessandro Boch <aboch@cisco.com>
byte[] targetIPByte = targetIP.getAddress();
ARP arp = createARP(ARP.REQUEST, getControllerMAC(), senderIP, targetHardwareAddress, targetIPByte);
byte[] targetIPByte = targetIP.getAddress();
ARP arp = createARP(ARP.REQUEST, getControllerMAC(), senderIP, targetHardwareAddress, targetIPByte);
- byte[] destMACAddress = NetUtils.BroadcastMACAddr;
+ byte[] destMACAddress = NetUtils.getBroadcastMACAddr();
Ethernet ethernet = createEthernet(getControllerMAC(), destMACAddress, arp);
// TODO For now send port-by-port, see how to optimize to
Ethernet ethernet = createEthernet(getControllerMAC(), destMACAddress, arp);
// TODO For now send port-by-port, see how to optimize to
/**
* Constant holding the broadcast MAC address
*/
/**
* Constant holding the broadcast MAC address
*/
- public static final byte[] BroadcastMACAddr = {-1, -1, -1, -1, -1, -1};
+ private static final byte[] BroadcastMACAddr = {-1, -1, -1, -1, -1, -1};
/**
* Converts a 4 bytes array into an integer number
/**
* Converts a 4 bytes array into an integer number
/**
* Returns Broadcast MAC Address
*
/**
* Returns Broadcast MAC Address
*
- * @return the byte array containing broadcaset mac address
+ * @return the byte array containing broadcast mac address
*/
public static byte[] getBroadcastMACAddr() {
return Arrays.copyOf(BroadcastMACAddr, BroadcastMACAddr.length);
*/
public static byte[] getBroadcastMACAddr() {
return Arrays.copyOf(BroadcastMACAddr, BroadcastMACAddr.length);