Change dhcp plugin to send ClientID allowing container to have multiple CNI
interfaces using dhcp ipam. Vendor latest dhcp4server, dhcp4client, dhcp4 Added additional tests for new functionality in dhcp2_test.go Wrap d2g dhcp4client calls with our own which add clientID to packet.
This commit is contained in:
5
vendor/github.com/d2g/dhcp4/packet.go
generated
vendored
5
vendor/github.com/d2g/dhcp4/packet.go
generated
vendored
@ -127,10 +127,11 @@ func ReplyPacket(req Packet, mt MessageType, serverId, yIAddr net.IP, leaseDurat
|
||||
p.SetYIAddr(yIAddr)
|
||||
p.SetGIAddr(req.GIAddr())
|
||||
p.SetCHAddr(req.CHAddr())
|
||||
p.SetSecs(req.Secs())
|
||||
p.AddOption(OptionDHCPMessageType, []byte{byte(mt)})
|
||||
p.AddOption(OptionServerIdentifier, []byte(serverId))
|
||||
p.AddOption(OptionIPAddressLeaseTime, OptionsLeaseTime(leaseDuration))
|
||||
if leaseDuration > 0 {
|
||||
p.AddOption(OptionIPAddressLeaseTime, OptionsLeaseTime(leaseDuration))
|
||||
}
|
||||
for _, o := range options {
|
||||
p.AddOption(o.Code, o.Value)
|
||||
}
|
||||
|
Reference in New Issue
Block a user