Fix issue with TUN name assignment for VPN
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Dec 2009 00:09:06 +0000 (01:09 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Dec 2009 00:09:06 +0000 (01:09 +0100)
plugins/openconnect.c

index 40acd82..d743642 100644 (file)
@@ -66,7 +66,7 @@ static int kill_tun(char *tun_name)
 
        memset(&ifr, 0, sizeof(ifr));
        ifr.ifr_flags = IFF_TUN | IFF_NO_PI;
 
        memset(&ifr, 0, sizeof(ifr));
        ifr.ifr_flags = IFF_TUN | IFF_NO_PI;
-       sprintf(ifr.ifr_name, tun_name);
+       sprintf(ifr.ifr_name, "%s", tun_name);
 
        fd = open("/dev/net/tun", O_RDWR);
        if (fd < 0) {
 
        fd = open("/dev/net/tun", O_RDWR);
        if (fd < 0) {