package/dropbear: merge r28718
authorNicolas Thill <nico@openwrt.org>
Thu, 3 Nov 2011 08:17:29 +0000 (08:17 +0000)
committerNicolas Thill <nico@openwrt.org>
Thu, 3 Nov 2011 08:17:29 +0000 (08:17 +0000)
SVN-Revision: 28719

package/dropbear/Makefile
package/dropbear/patches/160-segfault_fwd_localhost.patch [new file with mode: 0644]

index 34f064c37f9a27f623f14a2114436e59db9d236e..5006c94bb380b3f0eda789ff6f6e9b7356a8ca65 100644 (file)
@@ -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 (file)
index 0000000..05ae844
--- /dev/null
@@ -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);