Updating DHCP flow checks according to VOL-3212
Change-Id: Ia4ef31c8dfb196be29a76a099698c4cbf73debe4
diff --git a/internal/bbsim/devices/services.go b/internal/bbsim/devices/services.go
index 4b82e98..95661c8 100644
--- a/internal/bbsim/devices/services.go
+++ b/internal/bbsim/devices/services.go
@@ -39,9 +39,9 @@
var dhcpWaitTime = 60 * time.Second
type ServiceIf interface {
- HandlePackets() // start listening on the PacketCh
- HandleAuth() // Sends the EapoStart packet
- HandleDhcp(cTag int) // Sends the DHCPDiscover packet
+ HandlePackets() // start listening on the PacketCh
+ HandleAuth() // Sends the EapoStart packet
+ HandleDhcp(pbit uint8, cTag int) // Sends the DHCPDiscover packet
Initialize(stream bbsimTypes.Stream)
Disable()
@@ -292,9 +292,9 @@
}
// HandleDhcp is used to start DHCP for a particular Service when the corresponding flow is received
-func (s *Service) HandleDhcp(cTag int) {
+func (s *Service) HandleDhcp(pbit uint8, cTag int) {
- if s.CTag != cTag {
+ if s.CTag != cTag || (s.UsPonCTagPriority != pbit && pbit != 255) {
serviceLogger.WithFields(log.Fields{
"OnuId": s.Onu.ID,
"IntfId": s.Onu.PonPortID,