summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2011-11-03 08:12:17 +0000
committerNicolas Thill <nico@openwrt.org>2011-11-03 08:12:17 +0000
commitd8722fac7046020715c41106df28371f3f521132 (patch)
tree6b0f91af67ea7dfa5ae2ed4ef26384ffc2b6305d /package
parentc4e9e4d27ed84b056e7e195826e782cad3c7230b (diff)
downloadmtk-20170518-d8722fac7046020715c41106df28371f3f521132.zip
mtk-20170518-d8722fac7046020715c41106df28371f3f521132.tar.gz
mtk-20170518-d8722fac7046020715c41106df28371f3f521132.tar.bz2
package/dropbear: fix segfault with remote port forwarding (closes: #10339)
SVN-Revision: 28718
Diffstat (limited to 'package')
-rw-r--r--package/dropbear/Makefile2
-rw-r--r--package/dropbear/patches/160-segfault_fwd_localhost.patch40
2 files changed, 41 insertions, 1 deletions
diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile
index 34f064c..5006c94 100644
--- a/package/dropbear/Makefile
+++ b/package/dropbear/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dropbear
PKG_VERSION:=0.53.1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
diff --git a/package/dropbear/patches/160-segfault_fwd_localhost.patch b/package/dropbear/patches/160-segfault_fwd_localhost.patch
new file mode 100644
index 0000000..05ae844
--- /dev/null
+++ b/package/dropbear/patches/160-segfault_fwd_localhost.patch
@@ -0,0 +1,40 @@
+http://wl500g.googlecode.com/svn/trunk/dropbear/011-fwd-all-segfault.patch
+https://dev.openwrt.org/ticket/10339
+
+--- a/svr-tcpfwd.c
++++ b/svr-tcpfwd.c
+@@ -210,15 +210,13 @@ static int svr_remotetcpreq() {
+ tcpinfo->chantype = &svr_chan_tcpremote;
+ tcpinfo->tcp_type = forwarded;
+
+- if (!opts.listen_fwd_all
+- || (strcmp(tcpinfo->listenaddr, "localhost") == 0) ) {
+- // NULL means "localhost only"
+- tcpinfo->listenaddr = NULL;
+- }
+- else
+- {
+- tcpinfo->listenaddr = bindaddr;
+- }
++ if (!opts.listen_fwd_all || (strcmp(bindaddr, "localhost") == 0) ) {
++ // NULL means "localhost only"
++ tcpinfo->listenaddr = NULL;
++ }
++ else {
++ tcpinfo->listenaddr = bindaddr;
++ }
+
+ ret = listen_tcpfwd(tcpinfo);
+
+--- a/tcp-accept.c
++++ b/tcp-accept.c
+@@ -80,6 +80,9 @@ static void tcp_acceptor(struct Listener
+ addr = tcpinfo->listenaddr;
+ port = tcpinfo->listenport;
+ }
++ if (!addr) {
++ addr = "localhost";
++ }
+
+ buf_putstring(ses.writepayload, addr, strlen(addr));
+ buf_putint(ses.writepayload, port);