mirror of
https://github.com/yarrick/iodine.git
synced 2025-04-11 21:10:56 +00:00
---
This commit is contained in:
parent
9474a3d79e
commit
113f384dcc
3 changed files with 10 additions and 8 deletions
|
@ -1548,6 +1548,11 @@ handshake_login(int dns_fd, int seed)
|
||||||
} else if (handshake_login_info_check(in, server, client, &mtu, &netmask,
|
} else if (handshake_login_info_check(in, server, client, &mtu, &netmask,
|
||||||
server6, client6, &netmask6)) {
|
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;
|
server[64] = 0;
|
||||||
client[64] = 0;
|
client[64] = 0;
|
||||||
if (tun_setip(client, server, netmask) == 0 &&
|
if (tun_setip(client, server, netmask) == 0 &&
|
||||||
|
|
|
@ -2406,6 +2406,11 @@ main(int argc, char **argv)
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(mtu < 1280) {
|
||||||
|
fprintf(stderr, "Increasing MTU from %u to 1280 (as needed by IPv6)\n", mtu);
|
||||||
|
mtu = 1280;
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(stderr, "IPv6 network: ");
|
fprintf(stderr, "IPv6 network: ");
|
||||||
ipv6_print(&my_net6, netmask6);
|
ipv6_print(&my_net6, netmask6);
|
||||||
}
|
}
|
||||||
|
|
|
@ -550,14 +550,6 @@ tun_setmtu(unsigned mtu)
|
||||||
#ifndef WINDOWS32
|
#ifndef WINDOWS32
|
||||||
char cmdline[512];
|
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) {
|
if (mtu > 200 && mtu <= 1500) {
|
||||||
snprintf(cmdline, sizeof(cmdline),
|
snprintf(cmdline, sizeof(cmdline),
|
||||||
IFCONFIGPATH "ifconfig %s mtu %u",
|
IFCONFIGPATH "ifconfig %s mtu %u",
|
||||||
|
|
Loading…
Add table
Reference in a new issue