Complete Phase 12 dual-stack networking

Add IPv6-aware Wi-Fi state, HTTPS/SSH listeners, mDNS service
reconciliation, and browser Wi-Fi administration.

Include a guarded build-local fix for mDNS 1.12.0 membership handling,
focused regression suites, and Phase 12 acceptance documentation.
This commit is contained in:
2026-09-20 22:35:34 +02:00
parent ece4ba77e3
commit 8902b25d78
52 changed files with 3042 additions and 163 deletions
+19 -1
View File
@@ -19,7 +19,10 @@ static struct httpd_data server = {.config.max_resp_headers = 8};
static struct sock_db socket_state;
static struct resp_hdr response_headers[8];
static char scratch[1024], cookie_values[2][200];
#if defined(HOST_NETWORK) || defined(HOST_BROKER)
#if defined(HOST_NETWORK)
#include "web_network_settings.h"
static char output[WEB_NETWORK_SNAPSHOT_MAX];
#elif defined(HOST_BROKER)
static char output[2048];
#else
static char output[1024];
@@ -161,6 +164,21 @@ static void auth_reset(void) {
int main(void) {
assert(store_tests() == 0); auth_reset();
char token[65], csrf[65], session[65], cookies[200];
begin("/api/login-challenge", HTTP_GET, NULL);
add("Host", "[2001:0DB8:0:0:0:0:0:1]:443"); add("X-Login-Bootstrap", "1");
expect("200 OK"); token_from(cookie_values[0], token); csrf_from(csrf);
for (unsigned mode = 0; mode < 3; ++mode) {
begin("/api/login", HTTP_POST, good_body);
add("Host", mode == 0 ? "[2001:db8::2]" : "[2001:db8::1]");
add("Origin", mode == 1 ? "https://[2001:db8::2]" :
mode == 0 ? "https://[2001:db8::2]" : "https://[2001:DB8::1]:443");
add("Content-Type", "application/json"); add("X-CSRF-Token", csrf);
snprintf(cookies, sizeof(cookies), "__Host-sak-prelogin=%s", token); add("Cookie", cookies);
expect(mode == 2 ? "200 OK" : "403 Forbidden");
assert(password_calls == (mode == 2 ? 1U : 0U));
}
puts("PASS: IPv6 challenge canonical binding, cross-address challenge replay and mismatched Origin rejected before password verification");
auth_reset();
challenge(token, csrf);
begin("/api/login-challenge", HTTP_GET, NULL); add("Host", "device.example"); add("X-Login-Bootstrap", "1");
snprintf(cookies, sizeof(cookies), "__Host-sak-prelogin=%s", token); add("Cookie", cookies);