version 1.14, 2020/09/14 08:37:08 |
version 1.15, 2020/09/14 08:39:12 |
|
|
opt = option[0]; |
opt = option[0]; |
switch (opt) { |
switch (opt) { |
case '4': |
case '4': |
if (have_ipv4) { |
if (have_ipv4) |
isc_net_disableipv6(); |
|
have_ipv6 = ISC_FALSE; |
have_ipv6 = ISC_FALSE; |
} else { |
else |
fatal("can't find IPv4 networking"); |
fatal("can't find IPv4 networking"); |
/* NOTREACHED */ |
|
return (ISC_FALSE); |
|
} |
|
break; |
break; |
case '6': |
case '6': |
if (have_ipv6) { |
if (have_ipv6) |
isc_net_disableipv4(); |
|
have_ipv4 = ISC_FALSE; |
have_ipv4 = ISC_FALSE; |
} else { |
else |
fatal("can't find IPv6 networking"); |
fatal("can't find IPv6 networking"); |
/* NOTREACHED */ |
|
return (ISC_FALSE); |
|
} |
|
break; |
break; |
case 'd': |
case 'd': |
ptr = strpbrk(&option[1], dash_opts); |
ptr = strpbrk(&option[1], dash_opts); |
|
|
*hash = '\0'; |
*hash = '\0'; |
} else |
} else |
srcport = 0; |
srcport = 0; |
if (have_ipv6 && inet_pton(AF_INET6, value, &in6) == 1) { |
if (have_ipv6 && inet_pton(AF_INET6, value, &in6) == 1) |
isc_sockaddr_fromin6(&bind_address, &in6, srcport); |
isc_sockaddr_fromin6(&bind_address, &in6, srcport); |
isc_net_disableipv4(); |
else if (have_ipv4 && inet_pton(AF_INET, value, &in4) == 1) |
} else if (have_ipv4 && inet_pton(AF_INET, value, &in4) == 1) { |
|
isc_sockaddr_fromin(&bind_address, &in4, srcport); |
isc_sockaddr_fromin(&bind_address, &in4, srcport); |
isc_net_disableipv6(); |
else |
} else { |
|
if (hash != NULL) |
|
*hash = '#'; |
|
fatal("invalid address %s", value); |
fatal("invalid address %s", value); |
} |
|
if (hash != NULL) |
if (hash != NULL) |
*hash = '#'; |
*hash = '#'; |
specified_source = ISC_TRUE; |
specified_source = ISC_TRUE; |