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:
18
vendor/github.com/d2g/dhcp4client/generatexid.go
generated
vendored
Normal file
18
vendor/github.com/d2g/dhcp4client/generatexid.go
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
package dhcp4client
|
||||
|
||||
import (
|
||||
cryptorand "crypto/rand"
|
||||
mathrand "math/rand"
|
||||
)
|
||||
|
||||
func CryptoGenerateXID(b []byte) {
|
||||
if _, err := cryptorand.Read(b); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func MathGenerateXID(b []byte) {
|
||||
if _, err := mathrand.Read(b); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user