Fossil SCM

Fix "fossil ui" so that it listens to both 127.0.0.1 and to [::1]. [forum:/forumpost/7f8d2afe4d|Forum post 7f8d2afe4d].

drh 2025-04-16 16:47 trunk
Commit 264250d670234218799b82d26d810a24ec0037d65904270b919fb2d2b607f9f2
1 file changed +1 -1
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -2632,11 +2632,11 @@
26322632
){
26332633
fossil_fatal("not a valid IP address: %s", zIpAddr);
26342634
}
26352635
}else if( flags & HTTP_SERVER_LOCALHOST ){
26362636
/* Bind to the loop-back IP address */
2637
- inaddr.sin6_addr = in6addr_loopback;
2637
+ inet_pton(AF_INET6, "::ffff.127.0.0.1", &inaddr.sin6_addr);
26382638
}else{
26392639
/* Bind to any and all available IP addresses */
26402640
inaddr.sin6_addr = in6addr_any;
26412641
}
26422642
inaddr.sin6_port = htons(iPort);
26432643
--- src/cgi.c
+++ src/cgi.c
@@ -2632,11 +2632,11 @@
2632 ){
2633 fossil_fatal("not a valid IP address: %s", zIpAddr);
2634 }
2635 }else if( flags & HTTP_SERVER_LOCALHOST ){
2636 /* Bind to the loop-back IP address */
2637 inaddr.sin6_addr = in6addr_loopback;
2638 }else{
2639 /* Bind to any and all available IP addresses */
2640 inaddr.sin6_addr = in6addr_any;
2641 }
2642 inaddr.sin6_port = htons(iPort);
2643
--- src/cgi.c
+++ src/cgi.c
@@ -2632,11 +2632,11 @@
2632 ){
2633 fossil_fatal("not a valid IP address: %s", zIpAddr);
2634 }
2635 }else if( flags & HTTP_SERVER_LOCALHOST ){
2636 /* Bind to the loop-back IP address */
2637 inet_pton(AF_INET6, "::ffff.127.0.0.1", &inaddr.sin6_addr);
2638 }else{
2639 /* Bind to any and all available IP addresses */
2640 inaddr.sin6_addr = in6addr_any;
2641 }
2642 inaddr.sin6_port = htons(iPort);
2643

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button