Committed by
Gerrit Code Review
support mcast based filtering objective CORD-673,review comments addressed for patch-3
Change-Id: Id18e51826fe2355b1a7fcdba46af94b8577dac60
Showing
1 changed file
with
8 additions
and
2 deletions
... | @@ -250,7 +250,8 @@ public class SoftRouterPipeline extends AbstractHandlerBehaviour implements Pipe | ... | @@ -250,7 +250,8 @@ public class SoftRouterPipeline extends AbstractHandlerBehaviour implements Pipe |
250 | // convert filtering conditions for switch-intfs into flowrules | 250 | // convert filtering conditions for switch-intfs into flowrules |
251 | FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); | 251 | FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); |
252 | for (Criterion c : filt.conditions()) { | 252 | for (Criterion c : filt.conditions()) { |
253 | - if (c.type() == Criterion.Type.ETH_DST) { | 253 | + if (c.type() == Criterion.Type.ETH_DST || |
254 | + c.type() == Criterion.Type.ETH_DST_MASKED) { | ||
254 | e = (EthCriterion) c; | 255 | e = (EthCriterion) c; |
255 | } else if (c.type() == Criterion.Type.VLAN_VID) { | 256 | } else if (c.type() == Criterion.Type.VLAN_VID) { |
256 | v = (VlanIdCriterion) c; | 257 | v = (VlanIdCriterion) c; |
... | @@ -267,7 +268,12 @@ public class SoftRouterPipeline extends AbstractHandlerBehaviour implements Pipe | ... | @@ -267,7 +268,12 @@ public class SoftRouterPipeline extends AbstractHandlerBehaviour implements Pipe |
267 | TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder(); | 268 | TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder(); |
268 | selector.matchInPort(p.port()); | 269 | selector.matchInPort(p.port()); |
269 | 270 | ||
270 | - selector.matchEthDst(e.mac()); | 271 | + //Multicast MAC |
272 | + if (e.mask() != null) { | ||
273 | + selector.matchEthDstMasked(e.mac(), e.mask()); | ||
274 | + } else { | ||
275 | + selector.matchEthDst(e.mac()); | ||
276 | + } | ||
271 | selector.matchVlanId(v.vlanId()); | 277 | selector.matchVlanId(v.vlanId()); |
272 | selector.matchEthType(Ethernet.TYPE_IPV4); | 278 | selector.matchEthType(Ethernet.TYPE_IPV4); |
273 | if (!v.vlanId().equals(VlanId.NONE)) { | 279 | if (!v.vlanId().equals(VlanId.NONE)) { | ... | ... |
-
Please register or login to post a comment