fix DHCP client and finish tests

This commit is contained in:
soypat
2025-06-20 13:51:10 -03:00
parent 2133966a16
commit 48f1fa9103
3 changed files with 22 additions and 8 deletions
+2 -2
View File
@@ -246,8 +246,8 @@ func (c *Client) setHeader(frm Frame) {
frm.SetXID(c.currentXID)
frm.SetHardware(1, 6, 0)
frm.SetSecs(1)
if c.state == StateBound {
// copy(frm.CIAddr()[:], c.offer[:])
if c.state == StateRequesting || c.state == StateSelecting || c.state == StateBound || c.state == StateRenewing {
copy(frm.CIAddr()[:], c.offer[:])
}
copy(frm.SIAddr()[:], c.svip[:])
copy(frm.YIAddr()[:], c.offer[:])