Fixing issue in auth starting procedure
Change-Id: Ib1b4ed895ca7b62df5231aaa3ea4d03ca9c55f69
diff --git a/internal/bbsim/devices/onu.go b/internal/bbsim/devices/onu.go
index a915962..ab3c6c2 100644
--- a/internal/bbsim/devices/onu.go
+++ b/internal/bbsim/devices/onu.go
@@ -349,8 +349,16 @@
log.Errorf("Can't go to gem_port_added: %v", err)
}
} else if o.InternalState.Is("eapol_flow_received") {
- if err := o.InternalState.Event("start_auth"); err != nil {
- log.Errorf("Can't go to auth_started: %v", err)
+ if o.Auth == true {
+ if err := o.InternalState.Event("start_auth"); err != nil {
+ log.Warnf("Can't go to auth_started: %v", err)
+ }
+ } else {
+ onuLogger.WithFields(log.Fields{
+ "IntfId": o.PonPortID,
+ "OnuId": o.ID,
+ "SerialNumber": o.Sn(),
+ }).Warn("Not starting authentication as Auth bit is not set in CLI parameters")
}
}
}