Sorry, I should have read more about goto, I understand now, And it should work now.

This commit is contained in:
MissValeska 2014-05-20 15:20:38 -07:00
parent b9e764d89d
commit a7bbd6dff7

View File

@ -337,22 +337,18 @@ void exclude_interface(void) {
if(tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET) if(tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET)
ifs = tmp->ifa_name; ifs = tmp->ifa_name;
printf("One");
goto Check_Active;
printf("Two");
if(strncmp(ifs, "lo", 2) == 0 || strncmp(ifs, "tunl0", 5) == 0 || strncmp(ifs, "tunl1", 5) == 0 || strcmp(ifs, optarg) == 0) if(strncmp(ifs, "lo", 2) == 0 || strncmp(ifs, "tunl0", 5) == 0 || strncmp(ifs, "tunl1", 5) == 0 || strcmp(ifs, optarg) == 0)
goto Check_Active; goto Check_Active;
Check_Active: Check_Active:
a_ifs = ifs; a_ifs = ifs;
if(a_ifs->ifr_name != IFF_UP) { if(a_ifs->ifr_name != IFF_UP) {
tmp = tmp->ifa_next; tmp = tmp->ifa_next;
if(tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET) if(tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET)
ifs = tmp->ifa_name; ifs = tmp->ifa_name;
} }
tmp = tmp->ifa_next; tmp = tmp->ifa_next;
if(strcmp(old_tmp, ifs) == 0) if(strcmp(old_tmp, ifs) == 0)
break; break;