[VOL-4934] MIC (AES-128) calculation in omci-lib-go does not properly support the Extended Message Set

Change-Id: I0c9bac8260b8cf470e1a446a2426e7dfe707f555
diff --git a/VERSION b/VERSION
index 0b94c5f..141f2e8 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.14.9
+1.15.0
diff --git a/go.mod b/go.mod
index 9708ccb..533c14e 100644
--- a/go.mod
+++ b/go.mod
@@ -23,7 +23,7 @@
 	github.com/olekukonko/tablewriter v0.0.4
 	github.com/opencord/cordctl v0.0.0-20190909161711-01e9c1f04bf4
 	github.com/opencord/device-management-interface v1.4.0
-	github.com/opencord/omci-lib-go/v2 v2.2.1
+	github.com/opencord/omci-lib-go/v2 v2.2.3
 	github.com/opencord/voltha-protos/v5 v5.2.3
 	github.com/pkg/errors v0.8.1 // indirect
 	github.com/sirupsen/logrus v1.4.2
diff --git a/go.sum b/go.sum
index b2aa54e..7960872 100644
--- a/go.sum
+++ b/go.sum
@@ -87,8 +87,8 @@
 github.com/opencord/cordctl v0.0.0-20190909161711-01e9c1f04bf4/go.mod h1:/+3S0pwQUy7HeKnH0KfKp5W6hmh/LdZzuZTNT/m7vA4=
 github.com/opencord/device-management-interface v1.4.0 h1:hutRUn/rfYHZQr0K2i7HpZTMyMyLcGL1XdmbUrWt2kM=
 github.com/opencord/device-management-interface v1.4.0/go.mod h1:G1owSqGBGaqllrwtjxfLTsy9EDsGhdhmqkJM3XOnPD0=
-github.com/opencord/omci-lib-go/v2 v2.2.1 h1:Eai3feaixdQ7ZT8zgqIa94QlJ4tfQCgL0sTM8Q6/rkI=
-github.com/opencord/omci-lib-go/v2 v2.2.1/go.mod h1:o1S/jhDLHNikFU7uG2TR5UOM5KmKlqwLlVncXi0FBYQ=
+github.com/opencord/omci-lib-go/v2 v2.2.3 h1:cE9+67m8HmZmlET57eyQmqOOAJlfvvKrLgiJMiwhSMg=
+github.com/opencord/omci-lib-go/v2 v2.2.3/go.mod h1:o1S/jhDLHNikFU7uG2TR5UOM5KmKlqwLlVncXi0FBYQ=
 github.com/opencord/voltha-protos/v5 v5.2.3 h1:G16GLWL3augy9GQUraePumvin4SdTZc0WZAcCuSW/BU=
 github.com/opencord/voltha-protos/v5 v5.2.3/go.mod h1:ZGcyW79kQKIo7AySo1LRu613E6uiozixrCF0yNB/4x8=
 github.com/pierrec/lz4 v2.4.1+incompatible h1:mFe7ttWaflA46Mhqh+jUfjp2qTbPYxLB2/OyBppH9dg=
diff --git a/vendor/github.com/opencord/omci-lib-go/v2/VERSION b/vendor/github.com/opencord/omci-lib-go/v2/VERSION
index c043eea..5859406 100644
--- a/vendor/github.com/opencord/omci-lib-go/v2/VERSION
+++ b/vendor/github.com/opencord/omci-lib-go/v2/VERSION
@@ -1 +1 @@
-2.2.1
+2.2.3
diff --git a/vendor/github.com/opencord/omci-lib-go/v2/generated/onu-g.go b/vendor/github.com/opencord/omci-lib-go/v2/generated/onu-g.go
index cf259ae..55633f6 100644
--- a/vendor/github.com/opencord/omci-lib-go/v2/generated/onu-g.go
+++ b/vendor/github.com/opencord/omci-lib-go/v2/generated/onu-g.go
@@ -194,15 +194,33 @@
 			5:  ByteField(OnuG_Deprecated, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, true, 5),
 			6:  ByteField(OnuG_BatteryBackup, EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
 			7:  ByteField(OnuG_AdministrativeState, EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
-			8:  ByteField(OnuG_OperationalState, EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			8:  ByteField(OnuG_OperationalState, EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read), true, true, false, 8),
 			9:  ByteField(OnuG_OnuSurvivalTime, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
-			10: MultiByteField(OnuG_LogicalOnuId, OctetsAttributeType, 0x0040, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 10),
-			11: MultiByteField(OnuG_LogicalPassword, OctetsAttributeType, 0x0020, 12, toOctets("AAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 11),
+			10: MultiByteField(OnuG_LogicalOnuId, OctetsAttributeType, 0x0040, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), true, true, false, 10),
+			11: MultiByteField(OnuG_LogicalPassword, OctetsAttributeType, 0x0020, 12, toOctets("AAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), true, true, false, 11),
 			12: ByteField(OnuG_CredentialsStatus, EnumerationAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
 			13: Uint16Field(OnuG_ExtendedTcLayerOptions, BitFieldAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
 		},
 		Access:  CreatedByOnu,
 		Support: UnknownSupport,
+		Alarms: AlarmMap{
+			0:  "Equipment alarm",
+			1:  "Powering alarm",
+			2:  "Battery missing",
+			3:  "Battery failure",
+			4:  "Battery low",
+			5:  "Physical intrusion",
+			6:  "ONU self-test failure",
+			7:  "Dying gasp",
+			8:  "Temperature yellow",
+			9:  "Temperature red",
+			10: "Voltage yellow",
+			11: "Voltage red",
+			12: "ONU manual power off",
+			13: "Inv-Image",
+			14: "PSE overload yellow",
+			15: "PSE overload red",
+		},
 	}
 }
 
diff --git a/vendor/github.com/opencord/omci-lib-go/v2/generated/version.go b/vendor/github.com/opencord/omci-lib-go/v2/generated/version.go
index 185e191..df6ae99 100644
--- a/vendor/github.com/opencord/omci-lib-go/v2/generated/version.go
+++ b/vendor/github.com/opencord/omci-lib-go/v2/generated/version.go
@@ -46,8 +46,8 @@
 	Versions = append(Versions,
 		VersionInfo{
 			Name:       "parser",
-			Version:    "0.16.0",
-			CreateTime: 1643293483.072271,
+			Version:    "0.16.1",
+			CreateTime: 1674166144.2428687,
 			ItuDocName: "T-REC-G.988-202003-I!Amd3!MSW-E.docx",
 			SHA256:     "084f5265bc090ca882fe45f6844d1ce368c218e52c77795060b7643240885469",
 		})
@@ -55,8 +55,8 @@
 	Versions = append(Versions,
 		VersionInfo{
 			Name:       "pre-parser",
-			Version:    "0.15.12",
-			CreateTime: 1628800053.665055,
+			Version:    "0.16.1",
+			CreateTime: 1674166096.8488169,
 			ItuDocName: "T-REC-G.988-202003-I!Amd3!MSW-E.docx",
 			SHA256:     "084f5265bc090ca882fe45f6844d1ce368c218e52c77795060b7643240885469",
 		})
@@ -64,8 +64,8 @@
 	Versions = append(Versions,
 		VersionInfo{
 			Name:       "code-generator",
-			Version:    "0.16.0",
-			CreateTime: 1643293492.5641377,
+			Version:    "0.16.1",
+			CreateTime: 1674166174.5876794,
 			ItuDocName: "T-REC-G.988-202003-I!Amd3!MSW-E.docx",
 			SHA256:     "084f5265bc090ca882fe45f6844d1ce368c218e52c77795060b7643240885469",
 		})
diff --git a/vendor/github.com/opencord/omci-lib-go/v2/omci.go b/vendor/github.com/opencord/omci-lib-go/v2/omci.go
index f778382..f14c781 100644
--- a/vendor/github.com/opencord/omci-lib-go/v2/omci.go
+++ b/vendor/github.com/opencord/omci-lib-go/v2/omci.go
@@ -198,18 +198,23 @@
 }
 
 func calculateMicAes128(data []byte) (uint32, error) {
-	// See if upstream or downstream
+	// See if upstream or downstream. OMCI header should have been validated before this call
 	var downstreamCDir = [...]byte{0x01}
 	var upstreamCDir = [...]byte{0x02}
 
 	tid := binary.BigEndian.Uint16(data[0:2])
+
+	var length = 44
+	if DeviceIdent(data[3]) == ExtendedIdent {
+		length = 10 + int(binary.BigEndian.Uint16(data[8:10]))
+	}
 	var sum []byte
 	var err error
 
 	if (data[2]&me.AK) == me.AK || tid == 0 {
-		sum, err = aes.Sum(append(upstreamCDir[:], data[:44]...), omciIK, 4)
+		sum, err = aes.Sum(append(upstreamCDir[:], data[:length]...), omciIK, 4)
 	} else {
-		sum, err = aes.Sum(append(downstreamCDir[:], data[:44]...), omciIK, 4)
+		sum, err = aes.Sum(append(downstreamCDir[:], data[:length]...), omciIK, 4)
 	}
 	if err != nil {
 		return 0, err
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 9b5e3e5..7591826 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -76,7 +76,7 @@
 github.com/opencord/cordctl/pkg/format
 # github.com/opencord/device-management-interface v1.4.0
 github.com/opencord/device-management-interface/go/dmi
-# github.com/opencord/omci-lib-go/v2 v2.2.1
+# github.com/opencord/omci-lib-go/v2 v2.2.3
 github.com/opencord/omci-lib-go/v2
 github.com/opencord/omci-lib-go/v2/generated
 # github.com/opencord/voltha-protos/v5 v5.2.3