Wait DAD complete after ifconfig up.

This commit is contained in:
Hajimu UMEMOTO 2000-12-04 18:06:49 +00:00
parent eb74b99618
commit 06617fbb29
2 changed files with 14 additions and 2 deletions

View File

@ -270,16 +270,22 @@ tcpOpenDialog(Device *devp)
if (!variable_cmp(VAR_TRY_RTSOL, "YES") ||
((!variable_cmp(VAR_TRY_RTSOL, "NO")) && (!msgYesNo("Do you want to try IPv6 configuration of the interface?")))) {
int i;
int len;
i = 0;
sysctlbyname("net.inet6.ip6.forwarding", NULL, 0, &i, sizeof(i));
i = 1;
sysctlbyname("net.inet6.ip6.accept_rtadv", NULL, 0, &i, sizeof(i));
vsystem("ifconfig %s up", devp->name);
len = sizeof(i);
sysctlbyname("net.inet6.ip6.dad_count", &i, &len, NULL, 0);
sleep(i + 1);
Mkdir("/var/run");
msgNotify("Scanning for RA servers...");
if (0 == vsystem("rtsol %s", devp->name)) {
sleep(3);
len = sizeof(i);
sysctlbyname("net.inet6.ip6.dad_count", &i, &len, NULL, 0);
sleep(i + 1);
rtsolGetInfo(devp);
use_rtsol = TRUE;
} else

View File

@ -270,16 +270,22 @@ tcpOpenDialog(Device *devp)
if (!variable_cmp(VAR_TRY_RTSOL, "YES") ||
((!variable_cmp(VAR_TRY_RTSOL, "NO")) && (!msgYesNo("Do you want to try IPv6 configuration of the interface?")))) {
int i;
int len;
i = 0;
sysctlbyname("net.inet6.ip6.forwarding", NULL, 0, &i, sizeof(i));
i = 1;
sysctlbyname("net.inet6.ip6.accept_rtadv", NULL, 0, &i, sizeof(i));
vsystem("ifconfig %s up", devp->name);
len = sizeof(i);
sysctlbyname("net.inet6.ip6.dad_count", &i, &len, NULL, 0);
sleep(i + 1);
Mkdir("/var/run");
msgNotify("Scanning for RA servers...");
if (0 == vsystem("rtsol %s", devp->name)) {
sleep(3);
len = sizeof(i);
sysctlbyname("net.inet6.ip6.dad_count", &i, &len, NULL, 0);
sleep(i + 1);
rtsolGetInfo(devp);
use_rtsol = TRUE;
} else