SEBA-801 DHCP emulation stuck in DISCOVERED state
Fix bug in processing NNI packet
Change-Id: Ia0e118fe2c4e9f40afa144c64a5745b885625b22
diff --git a/core/core_server.go b/core/core_server.go
index 17404e3..ba0727a 100644
--- a/core/core_server.go
+++ b/core/core_server.go
@@ -499,15 +499,7 @@
logger.Debug("WARNING: This packet does not come from NNI ")
continue
}
- onuid := nnipkt.Info.onuid
intfid := nnipkt.Info.intfid
- onu, err := s.GetOnuByID(onuid, intfid)
- if err != nil {
- logger.Error("Failed processing NNI packet: %v", err)
- continue
- }
-
- utils.LoggerWithOnu(onu).Info("Received packet from NNI in grpc Server.")
pkt := nnipkt.Pkt
data = &openolt.Indication_PktInd{PktInd: &openolt.PacketIndication{IntfType: "nni", IntfId: intfid, Pkt: pkt.Data()}}
diff --git a/core/dhcp.go b/core/dhcp.go
index 12b4652..6aa5753 100644
--- a/core/dhcp.go
+++ b/core/dhcp.go
@@ -105,7 +105,7 @@
}
func startDHCPClient(intfid uint32, onuid uint32) error {
- logger.Debug("startDHCPClient")
+ logger.Debug("startDHCPClient intfid:%d onuid:%d", intfid, onuid)
client := dhcpClientInstance{key: clientKey{intfid: intfid, onuid: onuid},
srcaddr: &net.HardwareAddr{0x2e, 0x60, 0x70, 0x13, 0x07, byte(onuid)},
hostname: "voltha",
@@ -125,7 +125,7 @@
return errors.New("Failed to send DHCP Discovery")
}
client.curState = DHCP_SELECTING
- logger.Debug("Sending DHCP Discovery")
+ logger.Debug("Sending DHCP Discovery intfid:%d onuid:%d", intfid, onuid)
resp.clients[clientKey{intfid: intfid, onuid: onuid}] = &client
return nil
}