removed comments

This commit is contained in:
chris hellberg 2021-12-30 00:28:53 -05:00
parent ab2bbd987f
commit 8ee7290502
4 changed files with 5 additions and 8 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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
}

View File

@ -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;
}