From: Damien Miller Date: Fri, 13 Apr 2018 03:38:06 +0000 (+1000) Subject: Fix tunnel forwarding broken in 7.7p1 X-Git-Tag: V_7_8_P1~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfb1d9bc76734681e3dea532a1504fcd466fbe91;p=thirdparty%2Fopenssh-portable.git Fix tunnel forwarding broken in 7.7p1 bz2855, ok dtucker@ --- diff --git a/openbsd-compat/port-net.c b/openbsd-compat/port-net.c index 7050629c3..bb535626f 100644 --- a/openbsd-compat/port-net.c +++ b/openbsd-compat/port-net.c @@ -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);