dhcp4d: always set broadcast flag for DHCPOFFERs
We always broadcast them, so we should signal that.
This commit is contained in:
parent
37bf17e1b7
commit
301d4c0d00
@ -153,12 +153,14 @@ func (h *Handler) ServeDHCP(p dhcp4.Packet, msgType dhcp4.MessageType, options d
|
||||
return nil // no free leases
|
||||
}
|
||||
|
||||
return dhcp4.ReplyPacket(p,
|
||||
pkt := dhcp4.ReplyPacket(p,
|
||||
dhcp4.Offer,
|
||||
h.serverIP,
|
||||
dhcp4.IPAdd(h.start, free),
|
||||
h.leasePeriod,
|
||||
h.options.SelectOrderOrAll(options[dhcp4.OptionParameterRequestList]))
|
||||
pkt.SetBroadcast(true)
|
||||
return pkt
|
||||
|
||||
case dhcp4.Request:
|
||||
if server, ok := options[dhcp4.OptionServerIdentifier]; ok && !net.IP(server).Equal(h.serverIP) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user