packet to the kernel we check that the tunnel it came over could
reasonably have produced it. */
-/* XXX now implement TUN. Kernel needs recompiling. */
-
+#include "secnet.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-
-#include "config.h"
-#include "secnet.h"
#include "util.h"
#ifdef HAVE_LINUX_IF_H
st->device_path=dict_read_string(dict,"device",False,"tun-netlink",loc);
st->interface_name=dict_read_string(dict,"interface",False,
"tun-netlink",loc);
- st->ifconfig_path=dict_read_string(dict,"device",False,"tun-netlink",loc);
- st->route_path=dict_read_string(dict,"device",False,"tun-netlink",loc);
+ st->ifconfig_path=dict_read_string(dict,"ifconfig-path",
+ False,"tun-netlink",loc);
+ st->route_path=dict_read_string(dict,"route-path",
+ False,"tun-netlink",loc);
if (!st->device_path) st->device_path="/dev/net/tun";
if (!st->ifconfig_path) st->ifconfig_path="ifconfig";
"tun-netlink",loc);
search_for_if=dict_read_bool(dict,"interface-search",False,"tun-netlink",
loc,st->device_path==NULL);
- st->ifconfig_path=dict_read_string(dict,"device",False,"tun-netlink",loc);
- st->route_path=dict_read_string(dict,"device",False,"tun-netlink",loc);
+ st->ifconfig_path=dict_read_string(dict,"ifconfig-path",False,
+ "tun-netlink",loc);
+ st->route_path=dict_read_string(dict,"route-path",False,"tun-netlink",loc);
if (!st->device_path) st->device_path="/dev/tun";
if (!st->ifconfig_path) st->ifconfig_path="ifconfig";
sprintf(st->interface_name,"tun%d",i);
Message(M_INFO,"%s: allocated network interface %s "
"through %s\n",st->nl.name,st->interface_name,dname);
- continue;
+ break;
}
}
if (st->fd==-1) {