mirror of
https://github.com/yarrick/iodine.git
synced 2025-04-11 21:10:56 +00:00
Iodine: Added minimal MTU for IPv6
This commit is contained in:
parent
bdcfe58534
commit
ae2bd6ea47
3 changed files with 13 additions and 3 deletions
|
@ -1504,6 +1504,7 @@ handshake_login(int dns_fd, int seed)
|
||||||
|
|
||||||
login_calculate(login, 16, password, seed);
|
login_calculate(login, 16, password, seed);
|
||||||
|
|
||||||
|
|
||||||
for (i=0; running && i<5 ;i++) {
|
for (i=0; running && i<5 ;i++) {
|
||||||
|
|
||||||
send_login(dns_fd, login, 16);
|
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",
|
} else if (sscanf(in, "%64[^-]-%64[^-]-%d-%d",
|
||||||
server, client, &mtu, &netmask) == 4) {
|
server, client, &mtu, &netmask) == 4) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Todo: Correct?
|
||||||
|
*/
|
||||||
|
if(mtu < 1280)
|
||||||
|
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 &&
|
||||||
|
|
|
@ -138,7 +138,8 @@ main(int argc, char **argv)
|
||||||
int hostname_maxlen;
|
int hostname_maxlen;
|
||||||
int rtable = 0;
|
int rtable = 0;
|
||||||
|
|
||||||
printf("***MODIFIED***");
|
printf("***MODIFIED***\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
nameserv_addr = NULL;
|
nameserv_addr = NULL;
|
||||||
topdomain = NULL;
|
topdomain = NULL;
|
||||||
|
@ -327,10 +328,12 @@ main(int argc, char **argv)
|
||||||
retval = 1;
|
retval = 1;
|
||||||
goto cleanup1;
|
goto cleanup1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((dns_fd = open_dns(0, INADDR_ANY)) == -1) {
|
if ((dns_fd = open_dns(0, INADDR_ANY)) == -1) {
|
||||||
retval = 1;
|
retval = 1;
|
||||||
goto cleanup2;
|
goto cleanup2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OPENBSD
|
#ifdef OPENBSD
|
||||||
if (rtable > 0)
|
if (rtable > 0)
|
||||||
socket_setrtable(dns_fd, rtable);
|
socket_setrtable(dns_fd, rtable);
|
||||||
|
@ -346,7 +349,7 @@ main(int argc, char **argv)
|
||||||
retval = 1;
|
retval = 1;
|
||||||
goto cleanup2;
|
goto cleanup2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client_get_conn() == CONN_RAW_UDP) {
|
if (client_get_conn() == CONN_RAW_UDP) {
|
||||||
fprintf(stderr, "Sending raw traffic directly to %s\n", client_get_raw_addr());
|
fprintf(stderr, "Sending raw traffic directly to %s\n", client_get_raw_addr());
|
||||||
}
|
}
|
||||||
|
|
|
@ -472,7 +472,7 @@ tun_setip(const char *ip, const char *other_ip, int netbits)
|
||||||
ip,
|
ip,
|
||||||
#endif
|
#endif
|
||||||
inet_ntoa(net));
|
inet_ntoa(net));
|
||||||
|
|
||||||
fprintf(stderr, "Setting IP of %s to %s\n", if_name, ip);
|
fprintf(stderr, "Setting IP of %s to %s\n", if_name, ip);
|
||||||
#ifndef LINUX
|
#ifndef LINUX
|
||||||
r = system(cmdline);
|
r = system(cmdline);
|
||||||
|
|
Loading…
Add table
Reference in a new issue