lib/fetch: add FORCE_IPV{4,6} environment variables
This commit is contained in:
parent
271601dd0e
commit
8018833010
@ -33,6 +33,10 @@ Show the version information.
|
|||||||
.El
|
.El
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
.Bl -tag -width -x
|
.Bl -tag -width -x
|
||||||
|
.It Sy FORCE_IPV4
|
||||||
|
Only use IPv4.
|
||||||
|
.It Sy FORCE_IPV6
|
||||||
|
Only use IPv6.
|
||||||
.It Sy FTP_PASSIVE_MODE
|
.It Sy FTP_PASSIVE_MODE
|
||||||
If set to anything else than
|
If set to anything else than
|
||||||
.Ar "no"
|
.Ar "no"
|
||||||
|
@ -128,6 +128,10 @@ Show the version information.
|
|||||||
.El
|
.El
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
.Bl -tag -width SSL_NO_VERIFY_HOSTNAME
|
.Bl -tag -width SSL_NO_VERIFY_HOSTNAME
|
||||||
|
.It Sy FORCE_IPV4
|
||||||
|
Only use IPv4.
|
||||||
|
.It Sy FORCE_IPV6
|
||||||
|
Only use IPv6.
|
||||||
.It Sy FTP_PASSIVE_MODE
|
.It Sy FTP_PASSIVE_MODE
|
||||||
If set to anything else than
|
If set to anything else than
|
||||||
.Ar "no"
|
.Ar "no"
|
||||||
|
@ -478,8 +478,13 @@ happy_eyeballs_connect(struct addrinfo *res0)
|
|||||||
fetch_info("got %d A and %d AAAA records", n4, n6);
|
fetch_info("got %d A and %d AAAA records", n4, n6);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
res = NULL;
|
|
||||||
i4 = i6 = 0;
|
i4 = i6 = 0;
|
||||||
|
if (getenv("FORCE_IPV4"))
|
||||||
|
i6 = n6;
|
||||||
|
if (getenv("FORCE_IPV6"))
|
||||||
|
i4 = n4;
|
||||||
|
|
||||||
|
res = NULL;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int sd = -1;
|
int sd = -1;
|
||||||
int ret;
|
int ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user