X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Farphandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Farphandler%2Finternal%2FArpHandler.java;h=26a86c53a4694ff45ca4fbdf2ff7dbc1a2721dcb;hb=06aa5ce746e29a3760688b2ef2817f50bec5ea7a;hp=3730a71f1e05db48ca74031424feaf54a26f3317;hpb=c62c3615c0812460a8880f7ff0a1d3f6be548952;p=controller.git diff --git a/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/ArpHandler.java b/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/ArpHandler.java index 3730a71f1e..26a86c53a4 100644 --- a/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/ArpHandler.java +++ b/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/ArpHandler.java @@ -156,9 +156,11 @@ public class ArpHandler implements IHostFinder, IListenDataPacket { * This is to avoid continuous flooding */ if (Arrays.equals(sourceMAC, getControllerMAC())) { - logger.debug( + if (logger.isDebugEnabled()) { + logger.debug( "Receive the self originated packet (srcMAC {}) --> DROP", HexEncode.bytesToHexString(sourceMAC)); + } return; } @@ -167,18 +169,16 @@ public class ArpHandler implements IHostFinder, IListenDataPacket { subnet = switchManager.getSubnetByNetworkAddress(sourceIP); } if (subnet == null) { - logger.debug("can't find subnet matching {}, drop packet", sourceIP - .toString()); + logger.debug("can't find subnet matching {}, drop packet",sourceIP); return; } - logger.debug("Found {} matching {}", subnet.toString(), sourceIP - .toString()); + logger.debug("Found {} matching {}", subnet, sourceIP); /* * Make sure that the host is a legitimate member of this subnet */ if (!subnet.hasNodeConnector(p)) { logger.debug("{} showing up on {} does not belong to {}", - new Object[] { sourceIP.toString(), p, subnet.toString() }); + new Object[] { sourceIP, p, subnet }); return; } @@ -364,18 +364,17 @@ public class ArpHandler implements IHostFinder, IListenDataPacket { } public void find(InetAddress networkAddress) { - logger.debug("Received find IP {}", networkAddress.toString()); + logger.debug("Received find IP {}", networkAddress); Subnet subnet = null; if (switchManager != null) { subnet = switchManager.getSubnetByNetworkAddress(networkAddress); } if (subnet == null) { - logger.debug("can't find subnet matching IP {}", networkAddress - .toString()); + logger.debug("can't find subnet matching IP {}", networkAddress); return; } - logger.debug("found subnet {}", subnet.toString()); + logger.debug("found subnet {}", subnet); // send a broadcast ARP Request to this interface sendBcastARPRequest(networkAddress, subnet); @@ -394,7 +393,7 @@ public class ArpHandler implements IHostFinder, IListenDataPacket { } if (subnet == null) { logger.debug("can't find subnet matching {}", host - .getNetworkAddress().toString()); + .getNetworkAddress()); return; } sendUcastARPRequest(host, subnet); @@ -419,11 +418,10 @@ public class ArpHandler implements IHostFinder, IListenDataPacket { subnet = switchManager.getSubnetByNetworkAddress(dIP); } if (subnet == null) { - logger.debug("can't find subnet matching {}, drop packet", dIP - .toString()); + logger.debug("can't find subnet matching {}, drop packet", dIP); return; } - logger.debug("Found {} matching {}", subnet.toString(), dIP.toString()); + logger.debug("Found {} matching {}", subnet, dIP); /* * unknown destination host, initiate ARP request */