From: Alessandro Boch Date: Fri, 10 Jan 2014 04:22:52 +0000 (-0800) Subject: ArpHandler to ignore ip packet sent to default GW X-Git-Tag: jenkins-controller-bulk-release-prepare-only-2-1~101^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=ad32425a1ee129ddfb9d78574fd0ea5045f4f9dd ArpHandler to ignore ip packet sent to default GW - If the host pings the default gw, when ArpHandler receives the ICMP packet it does not realize it is sent to the controller, and it triggers the discovery for an host with that IP through arp request - This patch is for ArpHandler to detect the if IP packet is sent to the controller and stop the processing if that is the case. We may consider to have ArpHandler reply if packet is ICMP echo req. Change-Id: I87e14916564bc0039718882d087c431df7554317 Signed-off-by: Alessandro Boch --- 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 8c91c71533..8ae038c30f 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 @@ -461,6 +461,11 @@ public class ArpHandler implements IHostFinder, IListenDataPacket, ICacheUpdateA log.debug("Can't find subnet matching {}, drop packet", dIP); return; } + // If packet is sent to the default gw (us), ignore it for now + if (subnet.getNetworkAddress().equals(dIP)) { + log.trace("Ignore IP packet destined to default gw"); + return; + } // see if we know about the host // Hosttracker hosts db key implementation