Fossil SCM
Fix "fossil ui" so that it listens to both 127.0.0.1 and to [::1]. [forum:/forumpost/7f8d2afe4d|Forum post 7f8d2afe4d].
Commit
264250d670234218799b82d26d810a24ec0037d65904270b919fb2d2b607f9f2
Parent
76759875516b4dd…
1 file changed
+1
-1
+1
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -2632,11 +2632,11 @@ | ||
| 2632 | 2632 | ){ |
| 2633 | 2633 | fossil_fatal("not a valid IP address: %s", zIpAddr); |
| 2634 | 2634 | } |
| 2635 | 2635 | }else if( flags & HTTP_SERVER_LOCALHOST ){ |
| 2636 | 2636 | /* 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); | |
| 2638 | 2638 | }else{ |
| 2639 | 2639 | /* Bind to any and all available IP addresses */ |
| 2640 | 2640 | inaddr.sin6_addr = in6addr_any; |
| 2641 | 2641 | } |
| 2642 | 2642 | inaddr.sin6_port = htons(iPort); |
| 2643 | 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 | 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 |