mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 16:19:20 +02:00
removed comments
This commit is contained in:
parent
ab2bbd987f
commit
8ee7290502
|
@ -195,7 +195,7 @@ int main(int argc, char **argv)
|
|||
__progname++;
|
||||
#endif
|
||||
|
||||
while ((choice = getopt(argc, argv, "46vfhru:t:d:R:P:m:M:F:T:O:L:I:s")) != -1) {
|
||||
while ((choice = getopt(argc, argv, "46vfhruS:t:d:R:P:m:M:F:T:O:L:I")) != -1) {
|
||||
switch(choice) {
|
||||
case '4':
|
||||
nameserv_family = AF_INET;
|
||||
|
|
|
@ -666,12 +666,9 @@ static int tunnel_tun(int tun_fd, struct dnsfd *dns_fds)
|
|||
} else { /* IPv6 */
|
||||
for (c = 0; c < 16; c++) {
|
||||
v6Addr.s6_addr[c] = in[c + 28];
|
||||
printf("adding byte: %i to v6 address\n", in[c+28]);
|
||||
}
|
||||
inet_ntop(AF_INET6, &v6Addr, v6AddrP, INET6_ADDRSTRLEN);
|
||||
printf("read v6Addr from tunnel: %s\n", v6AddrP);
|
||||
userid = find_user_by_ip6(&v6Addr);
|
||||
printf("userid: %d\n", userid);
|
||||
}
|
||||
if (userid < 0)
|
||||
return 0;
|
||||
|
|
|
@ -548,9 +548,9 @@ write_tun(int tun_fd, char *data, size_t len)
|
|||
data += 4;
|
||||
len -= 4;
|
||||
} else {
|
||||
int i = data[4] & 0xf0;
|
||||
#ifdef LINUX
|
||||
|
||||
int i = data[4] & 0xf0;
|
||||
if (i == 64) {
|
||||
fprintf(stderr, "IPv4 packet\n");
|
||||
// Look at the fifth bype
|
||||
|
@ -581,7 +581,9 @@ write_tun(int tun_fd, char *data, size_t len)
|
|||
data[0] = 0x00;
|
||||
data[1] = 0x00;
|
||||
data[2] = 0x00;
|
||||
data[3] = 0x0A;
|
||||
data[3] = 0x1E;
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,6 @@ int find_user_by_ip6(struct in6_addr *v6Addr)
|
|||
|
||||
inet_ntop(AF_INET6, v6Addr, v6AddrOut, INET6_ADDRSTRLEN);
|
||||
|
||||
printf("Going to check address: %s in user list\n", v6AddrOut);
|
||||
for (i = 0; i < usercount; i++) {
|
||||
if (users[i].active &&
|
||||
users[i].authenticated &&
|
||||
|
@ -137,7 +136,6 @@ int areV6AddressesEqual(struct in6_addr *v6Struct1, struct in6_addr *v6Struct2)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
printf("byte1 %d: %d byte2 %d: %d\n", i, v6Struct1->s6_addr[i], i, v6Struct2->s6_addr[i]);
|
||||
if (v6Struct1->s6_addr[i] != v6Struct2->s6_addr[i]) {
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue