mirror of
https://github.com/danderson/netboot.git
synced 2025-08-07 07:07:17 +02:00
dhcp4: allow duplication of option 56 (Debug message).
Turns out real DHCP servers can duplicate this message.
This commit is contained in:
parent
7a39e0e685
commit
8dfa75434e
@ -93,7 +93,10 @@ func (o Options) Unmarshal(bs []byte) error {
|
||||
// is going to be an error, until I get a bug report about
|
||||
// something that actually does it.
|
||||
if _, ok := o[opt]; ok {
|
||||
return fmt.Errorf("packet has duplicate option %d (please file a bug with a pcap!)", opt)
|
||||
// Okay fine option 56 can be duped.
|
||||
if opt != 56 {
|
||||
return fmt.Errorf("packet has duplicate option %d (please file a bug with a pcap!)", opt)
|
||||
}
|
||||
}
|
||||
if len(bs) < 2 {
|
||||
return fmt.Errorf("option %d has no length byte", opt)
|
||||
|
Loading…
Reference in New Issue
Block a user