Rusty Eddy
Committed by Gerrit Code Review

Stop proxyarp from handling mcast packets and a configuration item to

stop fwd from handling mcast packets.  FWD & ProxyArp checks the IPv4
mac address to determine if the packet is multicast.

Change-Id: Ibf1c207635badea2f3d2a824e8574f352bfbab16
......@@ -155,6 +155,9 @@ public class ReactiveForwarding {
"default is false")
private boolean matchIcmpFields = false;
@Property(name = "ignoreIPv4Multicast", boolValue = false,
label = "Ignore (do not forward) IPv4 multicast packets; default is false")
private boolean ignoreIpv4McastPackets = false;
@Activate
public void activate(ComponentContext context) {
......@@ -319,6 +322,14 @@ public class ReactiveForwarding {
log.info("Configured. Flow Priority is configured to {}",
flowPriority);
}
boolean ignoreIpv4McastPacketsEnabled =
isPropertyEnabled(properties, "ignoreIpv4McastPackets");
if (ignoreIpv4McastPackets != ignoreIpv4McastPacketsEnabled) {
ignoreIpv4McastPackets = ignoreIpv4McastPacketsEnabled;
log.info("Configured. Ignore IPv4 multicast packets is {}",
ignoreIpv4McastPackets ? "enabled" : "disabled");
}
}
/**
......@@ -400,6 +411,13 @@ public class ReactiveForwarding {
return;
}
// Do not process IPv4 multicast packets, let mfwd handle them
if (ignoreIpv4McastPackets && ethPkt.getEtherType() == Ethernet.TYPE_IPV4) {
if (id.mac().isMulticast()) {
return;
}
}
// Do we know who this is for? If not, flood and bail.
Host dst = hostService.getHost(id);
if (dst == null) {
......
......@@ -223,6 +223,14 @@ public class ProxyArp {
if (!ipv6NeighborDiscovery && (ethPkt.getEtherType() == TYPE_IPV6)) {
return;
}
// Do not ARP for multicast packets. Let mfwd handle them.
if (ethPkt.getEtherType() == Ethernet.TYPE_IPV4) {
if (ethPkt.getDestinationMAC().isMulticast()) {
return;
}
}
//handle the arp packet.
proxyArpService.handlePacket(context);
}
......