mirror of
https://github.com/danderson/netboot.git
synced 2025-12-16 23:11:26 +01:00
Implicitly add DHCP option 53 when marshalling.
This commit is contained in:
parent
af2fc8892a
commit
621a0c28e5
@ -161,7 +161,11 @@ func (p *Packet) Marshal() ([]byte, error) {
|
|||||||
ret.Write([]byte(p.HardwareAddr))
|
ret.Write([]byte(p.HardwareAddr))
|
||||||
ret.Write([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
|
ret.Write([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
|
||||||
|
|
||||||
opts := p.Options
|
opts := make(Options, len(p.Options)+1)
|
||||||
|
for k, v := range p.Options {
|
||||||
|
opts[k] = v
|
||||||
|
}
|
||||||
|
opts[53] = []byte{byte(p.Type)}
|
||||||
var err error
|
var err error
|
||||||
if optsInSname {
|
if optsInSname {
|
||||||
opts, err = opts.marshalLimited(ret, 64, true)
|
opts, err = opts.marshalLimited(ret, 64, true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user