1
0
Fork 0
mirror of https://github.com/yarrick/iodine.git synced 2025-04-07 19:12:07 +00:00

Iodine: Added minimal MTU for IPv6

This commit is contained in:
Julian Kranz 2011-12-31 16:36:32 +01:00 committed by Barak A. Pearlmutter
parent bdcfe58534
commit ae2bd6ea47
3 changed files with 13 additions and 3 deletions

View file

@ -1504,6 +1504,7 @@ handshake_login(int dns_fd, int seed)
login_calculate(login, 16, password, seed);
for (i=0; running && i<5 ;i++) {
send_login(dns_fd, login, 16);
@ -1519,6 +1520,12 @@ handshake_login(int dns_fd, int seed)
} else if (sscanf(in, "%64[^-]-%64[^-]-%d-%d",
server, client, &mtu, &netmask) == 4) {
/**
* Todo: Correct?
*/
if(mtu < 1280)
mtu = 1280;
server[64] = 0;
client[64] = 0;
if (tun_setip(client, server, netmask) == 0 &&

View file

@ -138,7 +138,8 @@ main(int argc, char **argv)
int hostname_maxlen;
int rtable = 0;
printf("***MODIFIED***");
printf("***MODIFIED***\n");
fflush(stdout);
nameserv_addr = NULL;
topdomain = NULL;
@ -327,10 +328,12 @@ main(int argc, char **argv)
retval = 1;
goto cleanup1;
}
if ((dns_fd = open_dns(0, INADDR_ANY)) == -1) {
retval = 1;
goto cleanup2;
}
#ifdef OPENBSD
if (rtable > 0)
socket_setrtable(dns_fd, rtable);
@ -346,7 +349,7 @@ main(int argc, char **argv)
retval = 1;
goto cleanup2;
}
if (client_get_conn() == CONN_RAW_UDP) {
fprintf(stderr, "Sending raw traffic directly to %s\n", client_get_raw_addr());
}

View file

@ -472,7 +472,7 @@ tun_setip(const char *ip, const char *other_ip, int netbits)
ip,
#endif
inet_ntoa(net));
fprintf(stderr, "Setting IP of %s to %s\n", if_name, ip);
#ifndef LINUX
r = system(cmdline);