VOL-2459 Move to matching on multicast-IP address after moving to BAL 3.2.3.2
Change-Id: I7a5c7acc6e44b2b707b14ec100366258a40f0175
diff --git a/VERSION b/VERSION
index b001d23..3a660ff 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.3.12
+2.3.13
diff --git a/internal/pkg/core/openolt_flowmgr.go b/internal/pkg/core/openolt_flowmgr.go
index c6bad46..e29eb0e 100644
--- a/internal/pkg/core/openolt_flowmgr.go
+++ b/internal/pkg/core/openolt_flowmgr.go
@@ -1913,16 +1913,23 @@
if err != nil {
return olterrors.NewErrNotFound("multicast-in-port", log.Fields{"classifier": classifierInfo}, err).Log()
}
- //replace ipDst with ethDst
- if ipv4Dst, ok := classifierInfo[Ipv4Dst]; ok &&
- flows.IsMulticastIp(ipv4Dst.(uint32)) {
- // replace ipv4_dst classifier with eth_dst
- multicastMac := flows.ConvertToMulticastMacBytes(ipv4Dst.(uint32))
- delete(classifierInfo, Ipv4Dst)
- delete(classifierInfo, EthType)
- classifierInfo[EthDst] = multicastMac
- log.Debugw("multicast-ip-to-mac-conversion-success", log.Fields{"ip:": ipv4Dst.(uint32), "mac:": multicastMac})
+ //this variable acts like a switch. When it is set, multicast flows are classified by eth_dst.
+ //otherwise, classification is based on ipv4_dst by default.
+ //the variable can be configurable in the future; it can be read from a configuration path in the kv store.
+ mcastFlowClassificationByEthDst := false
+
+ if mcastFlowClassificationByEthDst {
+ //replace ipDst with ethDst
+ if ipv4Dst, ok := classifierInfo[Ipv4Dst]; ok &&
+ flows.IsMulticastIp(ipv4Dst.(uint32)) {
+ // replace ipv4_dst classifier with eth_dst
+ multicastMac := flows.ConvertToMulticastMacBytes(ipv4Dst.(uint32))
+ delete(classifierInfo, Ipv4Dst)
+ classifierInfo[EthDst] = multicastMac
+ log.Debugw("multicast-ip-to-mac-conversion-success", log.Fields{"ip:": ipv4Dst.(uint32), "mac:": multicastMac})
+ }
}
+ delete(classifierInfo, EthType)
onuID := NoneOnuID
uniID := NoneUniID