onuomci state transition fixes
Change-Id: Id721f24bca76d4e158e65d44bb5ef1141839bd49
diff --git a/core/grpc_service.go b/core/grpc_service.go
index edf7d1b..e18dfa5 100644
--- a/core/grpc_service.go
+++ b/core/grpc_service.go
@@ -240,6 +240,7 @@
// EAPOL flow
if flow.Classifier.EthType == uint32(layers.EthernetTypeEAPOL) {
+ logger.Debug("OLT %d receives EAPOL flow IntfID:%d OnuID:%d EType:%x", s.Olt.ID, flow.AccessIntfId, flow.OnuId, flow.Classifier.EthType)
omcistate := omci.GetOnuOmciState(onu.IntfID, onu.OnuID)
if omcistate != omci.DONE {
logger.Warn("FlowAdd() OMCI state %d is not \"DONE\"", omci.GetOnuOmciState(onu.OnuID, onu.IntfID))
diff --git a/core/mediator.go b/core/mediator.go
index c4cdc21..44e1d20 100644
--- a/core/mediator.go
+++ b/core/mediator.go
@@ -220,7 +220,7 @@
}
if o.Mode == BOTH {
- if current == device.ONU_OMCIACTIVE && next == device.ONU_AUTHENTICATED {
+ if current == device.ONU_OMCIACTIVE {
t := tm.CreateTester("DHCP", o, key, activateDHCPClient, o.dhcpwait)
if err := tm.StartTester(t); err != nil {
logger.Error("Cannot Start DHCP Executer error:%v", err)
diff --git a/device/device_onu.go b/device/device_onu.go
index 0add821..d7a5e8c 100644
--- a/device/device_onu.go
+++ b/device/device_onu.go
@@ -42,10 +42,11 @@
ONU_INACTIVE: "ONU_INACTIVE",
ONU_ACTIVE: "ONU_ACTIVE",
ONU_OMCIACTIVE: "ONU_OMCIACTIVE",
- ONU_FREE: "ONU_FREE",
+ ONU_AUTHENTICATED: "ONU_AUTHENTICATED",
ONU_LOS_RAISED: "ONU_LOS_RAISED",
ONU_OMCI_CHANNEL_LOS_RAISED: "ONU_OMCI_CHANNEL_LOS_RAISED",
ONU_LOS_ON_OLT_PON_LOS: "ONU_LOS_ON_OLT_PON_LOS",
+ ONU_FREE: "ONU_FREE",
}
// Onu structure stores information of ONUs