--- gvpe/src/device-tincd.C 2005/03/23 17:03:58 1.14 +++ gvpe/src/device-tincd.C 2005/03/25 13:56:25 1.16 @@ -93,38 +93,48 @@ #if IF_linux # include "tincd/linux/device.c" +const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME hw ether $MAC mtu $MTU up"; } #elif IF_freebsd # include "tincd/freebsd/device.c" +// 5.2.1' ifconfig _first_ sets the if up then changes mtu, which can be deadly due to ipv6 kicking in +const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU && /sbin/ifconfig $IFNAME up"; } #elif IF_netbsd # define IF_istun 1 # include "tincd/netbsd/device.c" +const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; } #elif IF_openbsd # define IF_istun 1 # include "tincd/openbsd/device.c" +const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; } #elif IF_solaris # define IF_istun 1 # include "tincd/solaris/device.c" +const char * tap_device::if_up () { return ""; } #elif IF_cygwin # include "tincd/cygwin/device.c" +const char * tap_device::if_up () { return ""; } #elif IF_mingw # include "tincd/mingw/device.c" +const char * tap_device::if_up () { return ""; } #elif IF_darwin # define IF_istun 1 # include "tincd/darwin/device.c" +const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } #elif IF_raw_socket -# define IF_istun 1 # include "tincd/raw_socket/device.c" +const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } #elif IF_uml_socket # include "tincd/uml_socket/device.c" +const char * tap_device::if_up () { return 0; } #else # error No interface implementation for your IFTYPE/IFSUBTYPE combination.