Package: iodine Version: 0.4.1-3 Severity: wishlist Tags: patch Hi!
I would like to use iodine into a vserver. In a vserver, iodine has no right to create an interface, to assign an IP and to set MTU of the interface. Therefore, I set all this outside of the vserver and I would like to provide a way such that iodine does not try to setup the interface. I attach a patch that provides such a functionality. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.24-1-amd64 (SMP w/1 CPU core) Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/bash Versions of packages iodine depends on: ii adduser 3.107 add and remove users and groups ii debconf [debconf-2.0] 1.5.21 Debian configuration management sy ii libc6 2.7-10 GNU C Library: Shared libraries ii makedev 2.3.1-87 creates device files in /dev ii udev 0.114-2 /dev/ and hotplug management daemo ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime iodine recommends no packages. -- debconf information: iodine/daemon_options: iodine/start_daemon: false
--- iodine-0.4.1/src/iodined.c~ 2007-11-30 23:11:30.000000000 +0100 +++ iodine-0.4.1/src/iodined.c 2008-04-24 17:22:11.000000000 +0200 @@ -446,6 +446,7 @@ int choice; int port; int mtu; + int skipipconfig; username = NULL; newroot = NULL; @@ -454,17 +455,21 @@ mtu = 1024; listen_ip = INADDR_ANY; port = 53; + skipipconfig = 0; b32 = get_base32_encoder(); memset(password, 0, sizeof(password)); 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) { case 'v': version(); break; + case 's': + skipipconfig = 1; + break; case 'f': foreground = 1; break; @@ -545,8 +550,9 @@ if ((tun_fd = open_tun(device)) == -1) goto cleanup0; - if (tun_setip(argv[0]) != 0 || tun_setmtu(mtu) != 0) - goto cleanup1; + if (!skipipconfig) + if (tun_setip(argv[0]) != 0 || tun_setmtu(mtu) != 0) + goto cleanup1; if ((dnsd_fd = open_dns(port, listen_ip)) == -1) goto cleanup2; --- iodine-0.4.1/man/iodine.8~ 2007-11-30 23:11:30.000000000 +0100 +++ iodine-0.4.1/man/iodine.8 2008-04-24 17:25:37.000000000 +0200 @@ -25,7 +25,7 @@ .B iodined [-h] -.B iodined [-f] [-u +.B iodined [-f] [-s] [-u .I user .B ] [-P .I password @@ -62,6 +62,10 @@ .B -f Keep running in foreground. .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 Drop privileges and run as user 'user' after setting up tunnel. .TP