Handle the Captive Portal option (37) found in Router Advertisements.
The advertised API URL is written to /var/run/captive-portal6.IFACE
Details
- Reviewers
emaste zarychtam_plan-b.pwste.edu.pl - Group Reviewers
manpages
I have not been able to test anything for this one beside mocking, so I have no idea if it will work for real or not as I haven't got access to any real ipv6 only captive portal.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 77976 Build 74859: arc lint + arc unit
Event Timeline
Thanks for the opportunity to test and review this enhancement. I'm more of a vibe programmer than a professional developer, but I've tested it with net/radvd from the ports tree.
At first glance, it almost works as expected. One thing I noticed is that CAP_SEEK is also required to save the file in capability mode.
It's also worth noting that net/radvd cannot currently advertise URIs longer than 255 bytes, so I couldn't test longer URIs with it.
| usr.sbin/rtsold/rtsol.c | ||
|---|---|---|
| 526 | Please add ND_OPT_CAPTIVE_PORTAL to sys/netinet/icmp6.h | |
| 536 | Perhaps we should also impose a 255-byte URI limit ? In Section 2, it's described: "As the maximum length of the URI that can be carried in IPv4 DHCP is 255 bytes, URIs longer than this SHOULD NOT be provisioned by any of the IPv6 options described in this document. In IPv6-only environments, this restriction can be relaxed." In Section 2.3 of the RFC, we read: "As the maximum length of the URI that can be carried in IPv4 DHCP is 255 bytes, URIs longer than this SHOULD NOT be provisioned via IPv6 RA options." | |
| usr.sbin/rtsold/rtsold.c | ||
| 295–296 | We also need CAP_SEEK here. | |
| usr.sbin/rtsold/rtsol.c | ||
|---|---|---|
| 536 |
RFC 8910 allows this restriction to be relaxed in IPv6-only environments, so imposing a 255-byte URI limit in rtsol is probably unnecessary. We can leave URI length handling to the router advertisement daemon. | |
| usr.sbin/rtsold/rtsold.8 | ||
|---|---|---|
| 300 | see below for explaination | |
| 303–313 |
And, to be honest, these descriptions should all be lowercase with no periods, because they are not sentences and this is just an index, but pre-existing issues are out of scope. | |