From 8ee729050282883479e985df73d664c0beb2896e Mon Sep 17 00:00:00 2001 From: chris hellberg Date: Thu, 30 Dec 2021 00:28:53 -0500 Subject: [PATCH] removed comments --- src/iodine.c | 2 +- src/iodined.c | 3 --- src/tun.c | 6 ++++-- src/user.c | 2 -- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/iodine.c b/src/iodine.c index 2059779..e8ebb66 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -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; diff --git a/src/iodined.c b/src/iodined.c index b1378ac..cc4f025 100644 --- a/src/iodined.c +++ b/src/iodined.c @@ -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; diff --git a/src/tun.c b/src/tun.c index 9d2c16d..38c01de 100644 --- a/src/tun.c +++ b/src/tun.c @@ -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 } diff --git a/src/user.c b/src/user.c index cbe91fe..c02f905 100644 --- a/src/user.c +++ b/src/user.c @@ -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; }