Merge upstream patch to unbreak tunnel forwarding.

Reported by:	cy@
This commit is contained in:
Dag-Erling Smørgrav 2018-05-16 14:04:39 +00:00
commit f2a2dfa729

View 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);