warp-vpn

point to point VPN implementation
git clone git://git.2f30.org/warp-vpn
Log | Files | Refs | README

commit c3bf822d58b4e61385d19cb9fbce9a35b7e1550d
parent ce00cc0b8b8192d186379a750562ccdf8af26a32
Author: sin <sin@2f30.org>
Date:   Tue, 22 Mar 2016 15:39:56 +0000

use posix IF_NAMESIZE

Diffstat:
Mstun.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stun.c b/stun.c @@ -184,8 +184,8 @@ opentun(char *tundev) memset(&ifr, 0, sizeof(ifr)); ifr.ifr_flags = IFF_TUN | IFF_NO_PI; - strncpy(ifr.ifr_name, tundev, IFNAMSIZ); - ifr.ifr_name[IFNAMSIZ - 1] = '\0'; + strncpy(ifr.ifr_name, tundev, IF_NAMESIZE); + ifr.ifr_name[IF_NAMESIZE - 1] = '\0'; if (ioctl(fd, TUNSETIFF, &ifr) < 0) logerr("failed to set TUNSETIFF on %s", tundev);