mirror of
https://github.com/ChronosX88/netsukuku.git
synced 2024-11-25 19:52:19 +00:00
The Exclude argument should now work, And some unneccesary debugging stuff has been removed.
This commit is contained in:
parent
e06db959e8
commit
e5eaf16cab
@ -21,8 +21,8 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
@ -552,8 +552,6 @@ int new_socket(int sock_type)
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Socket FD: %i ", sockfd);
|
||||
|
||||
return sockfd;
|
||||
}
|
||||
|
||||
|
@ -325,35 +325,27 @@ void free_server_opt(void)
|
||||
}
|
||||
|
||||
void exclude_interface(void) {
|
||||
char *a_ifs;
|
||||
char *old_tmp;
|
||||
char *a_ifs = NULL;
|
||||
char *old_tmp = NULL;
|
||||
struct ifaddrs *addrs,*tmp;
|
||||
getifaddrs(&addrs);
|
||||
tmp = addrs;
|
||||
int run_c = 1;
|
||||
printf("omg\n");
|
||||
while(tmp) {
|
||||
old_tmp = a_ifs;
|
||||
|
||||
if(tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET)
|
||||
a_ifs = tmp->ifa_name;
|
||||
|
||||
printf("wtf\n");
|
||||
|
||||
if(strncmp(a_ifs, "lo", 2) == 0 || strncmp(a_ifs, "tunl0", 5) == 0 || strncmp(a_ifs, "tunl1", 5) == 0 || strcmp(a_ifs, optarg) == 0) {
|
||||
tmp = tmp->ifa_next;
|
||||
if(tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET)
|
||||
a_ifs = tmp->ifa_name;
|
||||
printf("dun be meanie\n");
|
||||
}
|
||||
printf("weirdness\n");
|
||||
tmp = tmp->ifa_next;
|
||||
run_c++;
|
||||
if(strcmp(old_tmp, a_ifs) == 0) {
|
||||
printf("True\n");
|
||||
if(strcmp(old_tmp, a_ifs) == 0)
|
||||
break;
|
||||
}
|
||||
printf("why so mean? D:\n");
|
||||
server_opt.ifs[server_opt.ifs_n++]=xstrndup(a_ifs, IFNAMSIZ-1);
|
||||
}
|
||||
|
||||
@ -402,7 +394,6 @@ void parse_options(int argc, char **argv)
|
||||
exit(0);
|
||||
break;
|
||||
case 'e':
|
||||
printf("hey\n");
|
||||
exclude_interface();
|
||||
break;
|
||||
case 'k':
|
||||
|
Loading…
Reference in New Issue
Block a user