1
0
Fork 0
mirror of https://github.com/yarrick/iodine.git synced 2025-04-07 11:07:03 +00:00
This commit is contained in:
Julian Kranz 2012-01-06 17:30:48 +01:00 committed by Barak A. Pearlmutter
parent 9474a3d79e
commit 113f384dcc
3 changed files with 10 additions and 8 deletions

View file

@ -1548,6 +1548,11 @@ handshake_login(int dns_fd, int seed)
} else if (handshake_login_info_check(in, server, client, &mtu, &netmask,
server6, client6, &netmask6)) {
if(_v6 && mtu < 1280) {
fprintf(stderr, "Increasing MTU from %u to 1280 (as needed by IPv6)\n", mtu);
mtu = 1280;
}
server[64] = 0;
client[64] = 0;
if (tun_setip(client, server, netmask) == 0 &&

View file

@ -2406,6 +2406,11 @@ main(int argc, char **argv)
usage();
}
if(mtu < 1280) {
fprintf(stderr, "Increasing MTU from %u to 1280 (as needed by IPv6)\n", mtu);
mtu = 1280;
}
fprintf(stderr, "IPv6 network: ");
ipv6_print(&my_net6, netmask6);
}

View file

@ -550,14 +550,6 @@ tun_setmtu(unsigned mtu)
#ifndef WINDOWS32
char cmdline[512];
/**
* Todo: Correct?
*/
if(mtu < 1280) {
fprintf(stderr, "Increasing MTU from %u to 1280 (as needed by IPv6)\n", mtu);
mtu = 1280;
}
if (mtu > 200 && mtu <= 1500) {
snprintf(cmdline, sizeof(cmdline),
IFCONFIGPATH "ifconfig %s mtu %u",