dropbear: add option to disable reverse DNS lookups
authorPeter Korsgaard <jacmet@sunsite.dk>
Mon, 6 Sep 2010 12:37:22 +0000 (14:37 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 6 Sep 2010 12:37:22 +0000 (14:37 +0200)
Add option to disable reverse DNS lookups on client connection, as
connections otherwise stall until DNS times out in configurations without
working reverse DNS.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/dropbear/Config.in
package/dropbear/dropbear.mk

diff --git a/CHANGES b/CHANGES
index 03bc5f4f41dcea1edc7e5fab04301257b4700d98..394bb5ff2e6dd4170efc7cf81ea31c9511d3360a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,7 +5,7 @@
        Kconfig infrastructure rebased against 2.6.36-rc1, bringing
        misc fixes + nconfig and savedefconfig targets.
 
-       Updated/fixed packages: busybox
+       Updated/fixed packages: busybox, dropbear
 
 2010.08: Released August 31th, 2010:
 
index 20469f8b241fc8b5fb5ba76d286fdfe94ca17ab8..e47ba454570f20e98fe3d56fbb546d02dfbc9a35 100644 (file)
@@ -5,3 +5,11 @@ config BR2_PACKAGE_DROPBEAR
          A small SSH 2 server designed for small memory environments.
 
          http://matt.ucc.asn.au/dropbear/dropbear.html
+
+config BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS
+       bool "disable reverse DNS lookups"
+       depends on BR2_PACKAGE_DROPBEAR
+       help
+         Disable reverse DNS lookups on connection. This can be handy
+         on systems without working DNS, as connections otherwise
+         stall until DNS times out.
index c73525b04d747b8cbfb4a8cee996df1806c8398b..ec678d7e95a5446dc72893008af87dde2794d087 100644 (file)
@@ -21,6 +21,10 @@ $(eval $(call AUTOTARGETS,package,dropbear))
 
 $(DROPBEAR_HOOK_POST_EXTRACT):
        $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(DROPBEAR_DIR)/options.h
+ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),y)
+       $(SED) 's,^#define DO_HOST_LOOKUP.*,/* #define DO_HOST_LOOKUP */,' \
+               $(DROPBEAR_DIR)/options.h
+endif
        touch $@
 
 $(DROPBEAR_TARGET_INSTALL_TARGET):