From 0ea05f2218a21b4fb22df980f38a5341558bcf14 Mon Sep 17 00:00:00 2001 From: Christian Spielberger Date: Tue, 16 Jan 2024 14:23:16 +0100 Subject: [PATCH] http: client - set scopeid fixes HTTP requests for IPv6ll --- src/http/client.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/http/client.c b/src/http/client.c index c0e01b3a1..87ebedfb7 100644 --- a/src/http/client.c +++ b/src/http/client.c @@ -608,12 +608,15 @@ static int conn_connect(struct http_req *req) laddr = &req->cli->laddr6; #endif - if (sa_isset(laddr, SA_ADDR)) + if (sa_isset(laddr, SA_ADDR)) { + sa_set_scopeid(&conn->addr, sa_scopeid(laddr)); err = tcp_connect_bind(&conn->tc, addr, estab_handler, recv_handler,close_handler, laddr, conn); - else + } + else { err = tcp_connect(&conn->tc, addr, estab_handler, recv_handler, close_handler, conn); + } if (err) goto out;