X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fbsd%2Fdevice.c;h=a41827ff25bb265857cff5f58811d31e83db4130;hp=e8fdc1bc3abc94b603f022f8382c415d39babb96;hb=6d08eb1614b59d5f86a43edda9db06fca72b76cd;hpb=798fa2f04c52b0639713f74b1195847bec40c16a diff --git a/src/bsd/device.c b/src/bsd/device.c index e8fdc1bc..a41827ff 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -1,7 +1,7 @@ /* device.c -- Interaction BSD tun/tap device Copyright (C) 2001-2005 Ivo Timmermans, - 2001-2009 Guus Sliepen + 2001-2011 Guus Sliepen 2009 Grzegorz Dymarek This program is free software; you can redistribute it and/or modify @@ -22,6 +22,7 @@ #include "system.h" #include "conf.h" +#include "device.h" #include "logger.h" #include "net.h" #include "route.h" @@ -51,7 +52,7 @@ static uint64_t device_total_in = 0; static uint64_t device_total_out = 0; #if defined(TUNEMU) static device_type_t device_type = DEVICE_TYPE_TUNEMU; -#elif defined(HAVE_OPENBSD) || defined(HAVE_FREEBSD) +#elif defined(HAVE_OPENBSD) || defined(HAVE_FREEBSD) || defined(HAVE_DRAGONFLY) static device_type_t device_type = DEVICE_TYPE_TUNIFHEAD; #else static device_type_t device_type = DEVICE_TYPE_TUN; @@ -199,9 +200,8 @@ bool read_packet(vpn_packet_t *packet) { if(device_type == DEVICE_TYPE_TUNEMU) lenin = tunemu_read(device_fd, packet->data + 14, MTU - 14); else -#else - lenin = read(device_fd, packet->data + 14, MTU - 14); #endif + lenin = read(device_fd, packet->data + 14, MTU - 14); if(lenin <= 0) { logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,