]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Fix tunnel forwarding broken in 7.7p1
authorDamien Miller <djm@mindrot.org>
Fri, 13 Apr 2018 03:38:06 +0000 (13:38 +1000)
committerDamien Miller <djm@mindrot.org>
Fri, 13 Apr 2018 03:38:06 +0000 (13:38 +1000)
bz2855, ok dtucker@

openbsd-compat/port-net.c

index 7050629c31f79d0ae6ffc939ce2c5d686231cebf..bb535626ffe02062a7e87f6edb4d0680d23d8904 100644 (file)
@@ -185,7 +185,7 @@ sys_tun_open(int tun, int mode, char **ifname)
        else
                debug("%s: %s mode %d fd %d", __func__, ifr.ifr_name, mode, fd);
 
-       if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)))
+       if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)) == NULL)
                goto failed;
 
        return (fd);
@@ -272,7 +272,7 @@ sys_tun_open(int tun, int mode, char **ifname)
                        goto failed;
        }
 
-       if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)))
+       if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)) == NULL)
                goto failed;
 
        close(sock);