support mcast based filtering objective CORD-673,review comments addressed for patch-3

Change-Id: Id18e51826fe2355b1a7fcdba46af94b8577dac60
This commit is contained in:
gaurav 2016-05-09 23:17:05 +05:30 committed by Gerrit Code Review
parent 80244e5424
commit adc9004725

View File

@ -250,7 +250,8 @@ public class SoftRouterPipeline extends AbstractHandlerBehaviour implements Pipe
// convert filtering conditions for switch-intfs into flowrules // convert filtering conditions for switch-intfs into flowrules
FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); FlowRuleOperations.Builder ops = FlowRuleOperations.builder();
for (Criterion c : filt.conditions()) { 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; e = (EthCriterion) c;
} else if (c.type() == Criterion.Type.VLAN_VID) { } else if (c.type() == Criterion.Type.VLAN_VID) {
v = (VlanIdCriterion) c; v = (VlanIdCriterion) c;
@ -267,7 +268,12 @@ public class SoftRouterPipeline extends AbstractHandlerBehaviour implements Pipe
TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder(); TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();
selector.matchInPort(p.port()); 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.matchVlanId(v.vlanId());
selector.matchEthType(Ethernet.TYPE_IPV4); selector.matchEthType(Ethernet.TYPE_IPV4);
if (!v.vlanId().equals(VlanId.NONE)) { if (!v.vlanId().equals(VlanId.NONE)) {