-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Implement RFC8910: captive portal dhcp options #28132
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
Conversation
6aefa2e
to
5a24919
Compare
This probably should declare that this is an implementation of RFC 8910, i.e. https://www.rfc-editor.org/rfc/rfc8910.html |
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.
would be good to implement the same for dhcp6 (which uses a different option nr though) at the same time. and the IPv6RA support would be nice too.
also needs man page updates |
Yeah I plan to add these. |
5a24919
to
de00ae7
Compare
Ok the dhcp4 option actually works as intended now.
@poettering Sounds good, but how do you mean? Just in the commit message? RFC 8910 also includes this idea where a portal uri that is exactly "urn:ietf:params:capport:unrestricted" means there is explicitly no captive portal, and clients can skip any kind of detection. Should we have some kind of captive portal state in the api or just let clients figure that one out? |
27632f8
to
8722018
Compare
8722018
to
30ae6fa
Compare
Okay, added dhcpv6 + ipv6ra options and updated systemd.network(5) to include all the UseCaptivePortal directives. Should be in a reviewable state now. Interesting questions:
|
Please add a simple testcase in test/test-network/systemd-networkd-tests.py. |
30ae6fa
to
33456eb
Compare
ceeed20
to
2ecb240
Compare
7493a9a
to
86b282b
Compare
86b282b
to
a1798eb
Compare
Here is a version with the requested history. Wasn't sure if the options should still be separate, lmk if I should squash them. Also caught that ipv6ra option default had not been set. N.B. I haven't tested the intermediate commits, other than that they compile without error. |
Accepts a boolean. When enabled, UseCaptivePortal will request and retain the captive portal configuration from the DHCP server.
Acepts a boolean. When enabled requests and retains captive portal configuration from the DHCPv6 server.
Accepts a boolean. When enabled retains captive portal configuration advertised by the router.
a1798eb
to
dbe960f
Compare
fixed whitespace mismatch in the test. |
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.
LGTM. Thank you!
There is a double-free somewhere: #28229 |
As far as I can see that part isn't covered by any tests at all. It would probably make sense to cover it too just in case. |
This adds support for recording the captive portal advertised by dhcp option 114. It can be retrieved from the Describe link json output.
I figured since we are dropping the DVE-2018-0001 kludge now might be a good time to improve captive portal support with DHCP option 114.
Doesn't appear to actually work atm though... the portal is not recorded in our state file despite option 114 appearing in the dhcp option list according to tcpdump.