- if (node.getType().equals(Node.NodeIDType.OPENFLOW)) {
- byte[] gmac = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- long dpid = (Long) node.getID();
-
- for (short i = 0; i < 6; i++) {
- gmac[5 - i] = (byte) dpid;
- dpid >>= 8;
- }
- return gmac;
- }
- return null;
+ MacAddress mac = (MacAddress) nodeProps.get(MacAddress.name);
+ return (mac != null) ? mac.getMacAddress() : null;