Skip to content

DHCP: Handle option 108 correctly when receiving 0.0.0.0 OFFER#342

Merged
rsmarples merged 5 commits intoNetworkConfiguration:masterfrom
taoyl-g:dev/2563_fix
Jul 25, 2024
Merged

DHCP: Handle option 108 correctly when receiving 0.0.0.0 OFFER#342
rsmarples merged 5 commits intoNetworkConfiguration:masterfrom
taoyl-g:dev/2563_fix

Conversation

@taoyl-g
Copy link
Contributor

@taoyl-g taoyl-g commented Jul 23, 2024

According to RFC8925 section 3.3.1, when the server supports both option 108 (IPv6-Only Preferred) and option 116 (Auto-Configure), and the client only sends IPv6-Only Preferred option, then the server SHOULD return 0.0.0.0 as the offered address, and not setting the Auto-Configure option.

However, in our current client code, the IPv6-Only Preferred option in a 0.0.0.0 OFFER is only handled correctly when the Auto-Configure option is present. This patch fixes this issue.

taoyl-g and others added 2 commits July 23, 2024 16:01
According to RFC8925 section 3.3.1, when the server supports both option
108 (IPv6-Only Preferred) and option 116 (Auto-Configure), and the
client only sends IPv6-Only Preferred option, then the server SHOULD
return 0.0.0.0 as the offered address, and not setting the
Auto-Configure option.

However, in our current client code, the IPv6-Only Preferred option in a
0.0.0.0 OFFER is only handled correctly when the Auto-Configure option
is present. This patch fixes this issue.
As it's not valid for any RFC really.
@rsmarples
Copy link
Member

@taoyl-g I added another patch to your branch so that the DHCP continues normally if no hint about what to do is in an offer for 0.0.0.0.
Does this still work for you?

@taoyl-g
Copy link
Contributor Author

taoyl-g commented Jul 25, 2024

Looks good, Thanks!

Btw, it looks like ipv4llonly is not really used out of the switch statement so we don't need it and can keep the old code of using tmp?

@rsmarples rsmarples merged commit 9330dbb into NetworkConfiguration:master Jul 25, 2024
@rsmarples
Copy link
Member

Looks good, Thanks!

Btw, it looks like ipv4llonly is not really used out of the switch statement so we don't need it and can keep the old code of using tmp?

I removed the ipv4llonly var. I was planing on using it, but changed my mind.
Thanks for the patch, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants