support mcast based filtering objective CORD-673,review comments addressed for patch-3
Change-Id: Id18e51826fe2355b1a7fcdba46af94b8577dac60
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java
index 3d615d7..2f67395 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java
@@ -250,7 +250,8 @@
// convert filtering conditions for switch-intfs into flowrules
FlowRuleOperations.Builder ops = FlowRuleOperations.builder();
for (Criterion c : filt.conditions()) {
- if (c.type() == Criterion.Type.ETH_DST) {
+ if (c.type() == Criterion.Type.ETH_DST ||
+ c.type() == Criterion.Type.ETH_DST_MASKED) {
e = (EthCriterion) c;
} else if (c.type() == Criterion.Type.VLAN_VID) {
v = (VlanIdCriterion) c;
@@ -267,7 +268,12 @@
TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();
selector.matchInPort(p.port());
- selector.matchEthDst(e.mac());
+ //Multicast MAC
+ if (e.mask() != null) {
+ selector.matchEthDstMasked(e.mac(), e.mask());
+ } else {
+ selector.matchEthDst(e.mac());
+ }
selector.matchVlanId(v.vlanId());
selector.matchEthType(Ethernet.TYPE_IPV4);
if (!v.vlanId().equals(VlanId.NONE)) {