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