added the extended checks in mkUniPortNum function
Change-Id: Iaf077e4ba9e52da3f845417e195bda4feab0d27e
diff --git a/VERSION b/VERSION
index 9fe9ff9..a8907c0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-7.0.1
+7.0.2
diff --git a/pkg/platform/platform.go b/pkg/platform/platform.go
index 470d4a9..db0d551 100644
--- a/pkg/platform/platform.go
+++ b/pkg/platform/platform.go
@@ -105,9 +105,17 @@
//MkUniPortNum returns new UNIportNum based on intfID, inuID and uniID
func MkUniPortNum(ctx context.Context, intfID, onuID, uniID uint32) uint32 {
- var limit = int(onuID)
+ var limit = int(intfID)
+ if limit > MaxPonsPerOlt {
+ logger.Warn(ctx, "Warning: exceeded the MAX pons per OLT")
+ }
+ limit = int(onuID)
if limit > MaxOnusPerPon {
- logger.Warn(ctx, "exceeded-the-max-onus-per-pon")
+ logger.Warn(ctx, "Warning: exceeded the MAX ONUS per PON")
+ }
+ limit = int(uniID)
+ if limit > MaxUnisPerOnu {
+ logger.Warn(ctx, "Warning: exceeded the MAX UNIS per ONU")
}
return (intfID << (bitsForUniID + bitsForONUID)) | (onuID << bitsForUniID) | uniID
}