Imported Upstream version 0.9.6~rc2
Bernhard Schmidt
14 years ago
0 | 0 |
AC_INIT(src/main.c)
|
1 | |
AM_INIT_AUTOMAKE(isatapd, 0.9.6_rc1)
|
|
1 |
AM_INIT_AUTOMAKE(isatapd, 0.9.6_rc2)
|
2 | 2 |
|
3 | 3 |
AM_CONFIG_HEADER([config.h])
|
4 | 4 |
|
346 | 346 |
if (verbose >= 2) {
|
347 | 347 |
syslog(LOG_DEBUG, "still waiting for link...\n");
|
348 | 348 |
}
|
349 | |
sleep(WAIT_FOR_LINK);
|
350 | |
if (go_down)
|
351 | |
return 0;
|
|
349 |
if (sleep(WAIT_FOR_LINK) || go_down)
|
|
350 |
return 0; /* Interrupted by signal */
|
352 | 351 |
saddr = get_tunnel_saddr(interface_name);
|
353 | 352 |
} while ((go_down == 0) && (saddr == 0));
|
354 | 353 |
|
|
529 | 528 |
|
530 | 529 |
/* Wait till we find an outgoing interface for the first entry in the PRL */
|
531 | 530 |
saddr = wait_for_link();
|
|
531 |
if (go_down)
|
|
532 |
goto end;
|
|
533 |
if (saddr == 0)
|
|
534 |
goto begin;
|
532 | 535 |
create_isatap_tunnel(saddr);
|
533 | 536 |
|
534 | 537 |
while (!go_down)
|
|
578 | 581 |
break;
|
579 | 582 |
}
|
580 | 583 |
|
581 | |
/* Try to detect link */
|
582 | |
saddr_n = wait_for_link();
|
583 | |
if (go_down)
|
584 | |
break;
|
585 | |
|
586 | |
if (saddr_n != saddr || status == EXIT_ERROR_LAYER2) {
|
|
584 |
/* Try to detect link change */
|
|
585 |
saddr_n = get_tunnel_saddr(interface_name);
|
|
586 |
|
|
587 |
if (saddr_n != saddr || saddr_n == 0 || status == EXIT_ERROR_LAYER2) {
|
587 | 588 |
syslog(LOG_WARNING, "Link change detected. Re-creating tunnel.\n");
|
588 | 589 |
delete_isatap_tunnel();
|
589 | |
saddr = saddr_n;
|
590 | |
create_isatap_tunnel(saddr);
|
|
590 |
goto begin;
|
591 | 591 |
}
|
592 | 592 |
}
|
593 | 593 |
delete_isatap_tunnel();
|