Fossil SCM
Add the --ipv4 option to force the use of IPv4 on "fossil clone" and "fossil sync" and so forth.
Commit
317bd3cb3dbc5c1d4a3f75939fec5ede6f6a1655
Parent
5826f9c4b8f64ec…
3 files changed
+1
-1
+1
+1
+1
-1
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -144,11 +144,11 @@ | ||
| 144 | 144 | char zRemote[NI_MAXHOST]; |
| 145 | 145 | |
| 146 | 146 | socket_global_init(); |
| 147 | 147 | memset(&hints, 0, sizeof(struct addrinfo)); |
| 148 | 148 | assert( iSocket<0 ); |
| 149 | - hints.ai_family = AF_UNSPEC; | |
| 149 | + hints.ai_family = g.fIPv4 ? AF_INET : AF_UNSPEC; | |
| 150 | 150 | hints.ai_socktype = SOCK_STREAM; |
| 151 | 151 | hints.ai_protocol = IPPROTO_TCP; |
| 152 | 152 | sqlite3_snprintf(sizeof(zPort),zPort,"%d", pUrlData->port); |
| 153 | 153 | rc = getaddrinfo(pUrlData->name, zPort, &hints, &ai); |
| 154 | 154 | if( rc ){ |
| 155 | 155 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -144,11 +144,11 @@ | |
| 144 | char zRemote[NI_MAXHOST]; |
| 145 | |
| 146 | socket_global_init(); |
| 147 | memset(&hints, 0, sizeof(struct addrinfo)); |
| 148 | assert( iSocket<0 ); |
| 149 | hints.ai_family = AF_UNSPEC; |
| 150 | hints.ai_socktype = SOCK_STREAM; |
| 151 | hints.ai_protocol = IPPROTO_TCP; |
| 152 | sqlite3_snprintf(sizeof(zPort),zPort,"%d", pUrlData->port); |
| 153 | rc = getaddrinfo(pUrlData->name, zPort, &hints, &ai); |
| 154 | if( rc ){ |
| 155 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -144,11 +144,11 @@ | |
| 144 | char zRemote[NI_MAXHOST]; |
| 145 | |
| 146 | socket_global_init(); |
| 147 | memset(&hints, 0, sizeof(struct addrinfo)); |
| 148 | assert( iSocket<0 ); |
| 149 | hints.ai_family = g.fIPv4 ? AF_INET : AF_UNSPEC; |
| 150 | hints.ai_socktype = SOCK_STREAM; |
| 151 | hints.ai_protocol = IPPROTO_TCP; |
| 152 | sqlite3_snprintf(sizeof(zPort),zPort,"%d", pUrlData->port); |
| 153 | rc = getaddrinfo(pUrlData->name, zPort, &hints, &ai); |
| 154 | if( rc ){ |
| 155 |
+1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -149,10 +149,11 @@ | ||
| 149 | 149 | int fSystemTrace; /* Trace calls to fossil_system(), --systemtrace */ |
| 150 | 150 | int fSshTrace; /* Trace the SSH setup traffic */ |
| 151 | 151 | int fSshClient; /* HTTP client flags for SSH client */ |
| 152 | 152 | char *zSshCmd; /* SSH command string */ |
| 153 | 153 | int fNoSync; /* Do not do an autosync ever. --nosync */ |
| 154 | + int fIPv4; /* Use only IPv4, not IPv6. --ipv4 */ | |
| 154 | 155 | char *zPath; /* Name of webpage being served */ |
| 155 | 156 | char *zExtra; /* Extra path information past the webpage name */ |
| 156 | 157 | char *zBaseURL; /* Full text of the URL being served */ |
| 157 | 158 | char *zHttpsURL; /* zBaseURL translated to https: */ |
| 158 | 159 | char *zTop; /* Parent directory of zPath */ |
| 159 | 160 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -149,10 +149,11 @@ | |
| 149 | int fSystemTrace; /* Trace calls to fossil_system(), --systemtrace */ |
| 150 | int fSshTrace; /* Trace the SSH setup traffic */ |
| 151 | int fSshClient; /* HTTP client flags for SSH client */ |
| 152 | char *zSshCmd; /* SSH command string */ |
| 153 | int fNoSync; /* Do not do an autosync ever. --nosync */ |
| 154 | char *zPath; /* Name of webpage being served */ |
| 155 | char *zExtra; /* Extra path information past the webpage name */ |
| 156 | char *zBaseURL; /* Full text of the URL being served */ |
| 157 | char *zHttpsURL; /* zBaseURL translated to https: */ |
| 158 | char *zTop; /* Parent directory of zPath */ |
| 159 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -149,10 +149,11 @@ | |
| 149 | int fSystemTrace; /* Trace calls to fossil_system(), --systemtrace */ |
| 150 | int fSshTrace; /* Trace the SSH setup traffic */ |
| 151 | int fSshClient; /* HTTP client flags for SSH client */ |
| 152 | char *zSshCmd; /* SSH command string */ |
| 153 | int fNoSync; /* Do not do an autosync ever. --nosync */ |
| 154 | int fIPv4; /* Use only IPv4, not IPv6. --ipv4 */ |
| 155 | char *zPath; /* Name of webpage being served */ |
| 156 | char *zExtra; /* Extra path information past the webpage name */ |
| 157 | char *zBaseURL; /* Full text of the URL being served */ |
| 158 | char *zHttpsURL; /* zBaseURL translated to https: */ |
| 159 | char *zTop; /* Parent directory of zPath */ |
| 160 |
+1
| --- src/url.c | ||
| +++ src/url.c | ||
| @@ -362,10 +362,11 @@ | ||
| 362 | 362 | ** feature. |
| 363 | 363 | */ |
| 364 | 364 | void url_proxy_options(void){ |
| 365 | 365 | zProxyOpt = find_option("proxy", 0, 1); |
| 366 | 366 | if( find_option("nosync",0,0) ) g.fNoSync = 1; |
| 367 | + if( find_option("ipv4",0,0) ) g.fIPv4 = 1; | |
| 367 | 368 | } |
| 368 | 369 | |
| 369 | 370 | /* |
| 370 | 371 | ** If the "proxy" setting is defined, then change the URL settings |
| 371 | 372 | ** (initialized by a prior call to url_parse()) so that the HTTP |
| 372 | 373 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -362,10 +362,11 @@ | |
| 362 | ** feature. |
| 363 | */ |
| 364 | void url_proxy_options(void){ |
| 365 | zProxyOpt = find_option("proxy", 0, 1); |
| 366 | if( find_option("nosync",0,0) ) g.fNoSync = 1; |
| 367 | } |
| 368 | |
| 369 | /* |
| 370 | ** If the "proxy" setting is defined, then change the URL settings |
| 371 | ** (initialized by a prior call to url_parse()) so that the HTTP |
| 372 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -362,10 +362,11 @@ | |
| 362 | ** feature. |
| 363 | */ |
| 364 | void url_proxy_options(void){ |
| 365 | zProxyOpt = find_option("proxy", 0, 1); |
| 366 | if( find_option("nosync",0,0) ) g.fNoSync = 1; |
| 367 | if( find_option("ipv4",0,0) ) g.fIPv4 = 1; |
| 368 | } |
| 369 | |
| 370 | /* |
| 371 | ** If the "proxy" setting is defined, then change the URL settings |
| 372 | ** (initialized by a prior call to url_parse()) so that the HTTP |
| 373 |