forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openssh: fix tunnel forwarding broken in 7.7p1
Uses an upstream patch from openssh/openssh-portable@b81b2d1 Fixes NixOS#48016.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
pkgs/tools/networking/openssh/fix-tunnel-forwarding-broken-in-7.7p1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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); | ||
|