mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-23 05:26:07 +03:00
Applied patch for not configuring the tun interface, debian bug 477692
This commit is contained in:
parent
e7de432088
commit
bc76b588c9
@ -25,7 +25,7 @@ iodine, iodined \- tunnel IPv4 over DNS
|
|||||||
|
|
||||||
.B iodined [-h]
|
.B iodined [-h]
|
||||||
|
|
||||||
.B iodined [-f] [-u
|
.B iodined [-f] [-s] [-u
|
||||||
.I user
|
.I user
|
||||||
.B ] [-P
|
.B ] [-P
|
||||||
.I password
|
.I password
|
||||||
@ -62,6 +62,10 @@ Print usage info and exit.
|
|||||||
.B -f
|
.B -f
|
||||||
Keep running in foreground.
|
Keep running in foreground.
|
||||||
.TP
|
.TP
|
||||||
|
.B -s
|
||||||
|
Don't try to configure IP address or MTU. This should only be used if
|
||||||
|
you have already configured the device that will be used.
|
||||||
|
.TP
|
||||||
.B -u user
|
.B -u user
|
||||||
Drop privileges and run as user 'user' after setting up tunnel.
|
Drop privileges and run as user 'user' after setting up tunnel.
|
||||||
.TP
|
.TP
|
||||||
|
@ -448,6 +448,7 @@ main(int argc, char **argv)
|
|||||||
int choice;
|
int choice;
|
||||||
int port;
|
int port;
|
||||||
int mtu;
|
int mtu;
|
||||||
|
int skipipconfig;
|
||||||
|
|
||||||
username = NULL;
|
username = NULL;
|
||||||
newroot = NULL;
|
newroot = NULL;
|
||||||
@ -456,17 +457,21 @@ main(int argc, char **argv)
|
|||||||
mtu = 1024;
|
mtu = 1024;
|
||||||
listen_ip = INADDR_ANY;
|
listen_ip = INADDR_ANY;
|
||||||
port = 53;
|
port = 53;
|
||||||
|
skipipconfig = 0;
|
||||||
|
|
||||||
b32 = get_base32_encoder();
|
b32 = get_base32_encoder();
|
||||||
|
|
||||||
memset(password, 0, sizeof(password));
|
memset(password, 0, sizeof(password));
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
while ((choice = getopt(argc, argv, "vfhu:t:d:m:l:p:P:")) != -1) {
|
while ((choice = getopt(argc, argv, "vsfhu:t:d:m:l:p:P:")) != -1) {
|
||||||
switch(choice) {
|
switch(choice) {
|
||||||
case 'v':
|
case 'v':
|
||||||
version();
|
version();
|
||||||
break;
|
break;
|
||||||
|
case 's':
|
||||||
|
skipipconfig = 1;
|
||||||
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
foreground = 1;
|
foreground = 1;
|
||||||
break;
|
break;
|
||||||
@ -558,6 +563,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
if ((tun_fd = open_tun(device)) == -1)
|
if ((tun_fd = open_tun(device)) == -1)
|
||||||
goto cleanup0;
|
goto cleanup0;
|
||||||
|
if (!skipipconfig)
|
||||||
if (tun_setip(argv[0]) != 0 || tun_setmtu(mtu) != 0)
|
if (tun_setip(argv[0]) != 0 || tun_setmtu(mtu) != 0)
|
||||||
goto cleanup1;
|
goto cleanup1;
|
||||||
if ((dnsd_fd = open_dns(port, listen_ip)) == -1)
|
if ((dnsd_fd = open_dns(port, listen_ip)) == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user