Skip to content

Commit

Permalink
http: client - set scopeid fixes HTTP requests for IPv6ll (#1055)
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 authored Jan 16, 2024
1 parent 9d73cbd commit 93ad208
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/http/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 93ad208

Please sign in to comment.