mirror of
https://github.com/ChronosX88/netsukuku.git
synced 2024-11-26 12:12:18 +00:00
Okay, Testing again, I've been doing a bunch of reading of netsukuku's code, Hopefully this will work.
This commit is contained in:
parent
0f9b385a31
commit
9d790fcc07
@ -370,7 +370,7 @@ int exclude_interface(int prevent_doubles) {
|
|||||||
|
|
||||||
old_tmp = ifs;
|
old_tmp = ifs;
|
||||||
|
|
||||||
if(tmp && tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET && tmp->ifa_flags & IFF_UP && !(tmp->ifa_flags & IFF_LOOPBACK /*&& strncmp(tmp->ifa_name, "tunl0", 5) != 0 && strncmp(tmp->ifa_name, "tunl1", 5) != 0 && */ && strcmp(optarg, tmp->ifa_name) != 0)) {
|
if(tmp && tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET && tmp->ifa_flags & IFF_UP && !(tmp->ifa_flags & IFF_LOOPBACK && strncmp(tmp->ifa_name, "tunl0", 5) != 0 && strncmp(tmp->ifa_name, "tunl1", 5) != 0 && strcmp(optarg, tmp->ifa_name) != 0)) {
|
||||||
ifs = tmp->ifa_name;
|
ifs = tmp->ifa_name;
|
||||||
ifs_n++;
|
ifs_n++;
|
||||||
}
|
}
|
||||||
@ -440,10 +440,9 @@ void parse_options(int argc, char **argv)
|
|||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
//int prevent_doubles = -1;
|
int prevent_doubles = -1;
|
||||||
//prevent_doubles++;
|
prevent_doubles++;
|
||||||
//exclude_interface(prevent_doubles);
|
exclude_interface(prevent_doubles);
|
||||||
//check_excluded();
|
|
||||||
break;
|
break;
|
||||||
case 'k':
|
case 'k':
|
||||||
if(is_ntkd_already_running() == 1){
|
if(is_ntkd_already_running() == 1){
|
||||||
@ -487,11 +486,7 @@ void parse_options(int argc, char **argv)
|
|||||||
fatal(0);
|
fatal(0);
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
if(server_opt.ifs_n+1 >= MAX_INTERFACES)
|
break;
|
||||||
fatal("The maximum number of interfaces is %d",
|
|
||||||
MAX_INTERFACES);
|
|
||||||
server_opt.ifs[server_opt.ifs_n++]=xstrndup(optarg, IFNAMSIZ-1);
|
|
||||||
break;
|
|
||||||
case 'D':
|
case 'D':
|
||||||
server_opt.daemon=0;
|
server_opt.daemon=0;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user