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 { ...@@ -155,6 +155,9 @@ public class ReactiveForwarding {
155 "default is false") 155 "default is false")
156 private boolean matchIcmpFields = false; 156 private boolean matchIcmpFields = false;
157 157
158 + @Property(name = "ignoreIPv4Multicast", boolValue = false,
159 + label = "Ignore (do not forward) IPv4 multicast packets; default is false")
160 + private boolean ignoreIpv4McastPackets = false;
158 161
159 @Activate 162 @Activate
160 public void activate(ComponentContext context) { 163 public void activate(ComponentContext context) {
...@@ -319,6 +322,14 @@ public class ReactiveForwarding { ...@@ -319,6 +322,14 @@ public class ReactiveForwarding {
319 log.info("Configured. Flow Priority is configured to {}", 322 log.info("Configured. Flow Priority is configured to {}",
320 flowPriority); 323 flowPriority);
321 } 324 }
325 +
326 + boolean ignoreIpv4McastPacketsEnabled =
327 + isPropertyEnabled(properties, "ignoreIpv4McastPackets");
328 + if (ignoreIpv4McastPackets != ignoreIpv4McastPacketsEnabled) {
329 + ignoreIpv4McastPackets = ignoreIpv4McastPacketsEnabled;
330 + log.info("Configured. Ignore IPv4 multicast packets is {}",
331 + ignoreIpv4McastPackets ? "enabled" : "disabled");
332 + }
322 } 333 }
323 334
324 /** 335 /**
...@@ -400,6 +411,13 @@ public class ReactiveForwarding { ...@@ -400,6 +411,13 @@ public class ReactiveForwarding {
400 return; 411 return;
401 } 412 }
402 413
414 + // Do not process IPv4 multicast packets, let mfwd handle them
415 + if (ignoreIpv4McastPackets && ethPkt.getEtherType() == Ethernet.TYPE_IPV4) {
416 + if (id.mac().isMulticast()) {
417 + return;
418 + }
419 + }
420 +
403 // Do we know who this is for? If not, flood and bail. 421 // Do we know who this is for? If not, flood and bail.
404 Host dst = hostService.getHost(id); 422 Host dst = hostService.getHost(id);
405 if (dst == null) { 423 if (dst == null) {
......
...@@ -223,6 +223,14 @@ public class ProxyArp { ...@@ -223,6 +223,14 @@ public class ProxyArp {
223 if (!ipv6NeighborDiscovery && (ethPkt.getEtherType() == TYPE_IPV6)) { 223 if (!ipv6NeighborDiscovery && (ethPkt.getEtherType() == TYPE_IPV6)) {
224 return; 224 return;
225 } 225 }
226 +
227 + // Do not ARP for multicast packets. Let mfwd handle them.
228 + if (ethPkt.getEtherType() == Ethernet.TYPE_IPV4) {
229 + if (ethPkt.getDestinationMAC().isMulticast()) {
230 + return;
231 + }
232 + }
233 +
226 //handle the arp packet. 234 //handle the arp packet.
227 proxyArpService.handlePacket(context); 235 proxyArpService.handlePacket(context);
228 } 236 }
......