[VOL-2778] Restart Auth and DHCP
Change-Id: I56bb900374b9be3cb5c668092acbeed55b69226b
diff --git a/internal/bbsim/devices/onu.go b/internal/bbsim/devices/onu.go
index 458678a..80308da 100644
--- a/internal/bbsim/devices/onu.go
+++ b/internal/bbsim/devices/onu.go
@@ -182,8 +182,7 @@
// Once the ONU is enabled start listening for packets
for _, s := range o.Services {
- s.Initialize()
- go s.HandlePackets(o.PonPort.Olt.OpenoltStream)
+ s.Initialize(o.PonPort.Olt.OpenoltStream)
}
},
"enter_disabled": func(event *fsm.Event) {
@@ -320,7 +319,7 @@
msg, _ := message.Data.(OnuPacketMessage)
- log.WithFields(log.Fields{
+ onuLogger.WithFields(log.Fields{
"IntfId": msg.IntfId,
"OnuId": msg.OnuId,
"pktType": msg.Type,
@@ -340,6 +339,13 @@
service.PacketCh <- msg
+ onuLogger.WithFields(log.Fields{
+ "IntfId": msg.IntfId,
+ "OnuId": msg.OnuId,
+ "pktType": msg.Type,
+ "ServiceName": service.Name,
+ }).Info("OnuPacketOut Sent on Service Packet channel")
+
case OnuPacketIn:
// NOTE we only receive BBR packets here.
// Eapol.HandleNextPacket can handle both BBSim and BBr cases so the call is the same
@@ -647,7 +653,7 @@
o.storePortNumber(uint32(msg.Flow.PortNo))
for _, s := range o.Services {
- s.HandleAuth(o.PonPort.Olt.OpenoltStream)
+ s.HandleAuth()
}
} else if msg.Flow.Classifier.EthType == uint32(layers.EthernetTypeIPv4) &&
msg.Flow.Classifier.SrcPort == uint32(68) &&
@@ -655,7 +661,7 @@
(msg.Flow.Classifier.OPbits == 0 || msg.Flow.Classifier.OPbits == 255) {
for _, s := range o.Services {
- s.HandleDhcp(o.PonPort.Olt.OpenoltStream, int(msg.Flow.Classifier.OVid))
+ s.HandleDhcp(int(msg.Flow.Classifier.OVid))
}
}
}