-
Notifications
You must be signed in to change notification settings - Fork 791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dhcp ipam: support customizing dhcp options from CNI args #670
dhcp ipam: support customizing dhcp options from CNI args #670
Conversation
Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
Almost every first retry of DHCP will fail due to interface is not up. Add a fast retry to reduce unnecessary latency. Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
First byte of client ID is type, instead of value. See this from RFC2132: Code Len Type Client-Identifier +-----+-----+-----+-----+-----+--- | 61 | n | t1 | i1 | i2 | ... +-----+-----+-----+-----+-----+--- Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
/lgtm |
looks good |
clientID := containerID + "/" + netName + "/" + ifName | ||
// defined in RFC 2132, length size can not be larger than 1 octet. So we truncate 254 to make everyone happy. | ||
if len(clientID) > 254 { | ||
clientID = clientID[0:254] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, containerID
and ifName
are enough to be composed as clientID
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually not changed to ensure backward compatibility, since I'm not sure if anyone is using this default config in somewhere of their config...
Signed-off-by: SilverBut <SilverBut@users.noreply.github.com>
/lgtm |
Make some DHCP options sent to the server can be set from parsing CNI_ARGS.
This closes #435 and #660.