[backfire] merge r22889, r22893 and r22897
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Sep 2010 21:58:52 +0000 (21:58 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Sep 2010 21:58:52 +0000 (21:58 +0000)
SVN-Revision: 22940

package/6in4/Makefile
package/6in4/files/6in4.hotplug

index c56b9c57ce37953fe24c5ca8a7d9f985c391f73d..b9fa220df7940845327e2c1731e5bf6ecf1051d7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=6in4
 PKG_VERSION:=5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
 
index 96b046d14d39d107a4388e2c82271068d10d16fb..534682e99a152ca600e2d734c1da654d335a4437 100644 (file)
@@ -32,7 +32,9 @@ if [ "$ACTION" = ifup ]; then
                        config_get password "$cfg" password
 
                        [ -n "$tunnelid" ] && [ -n "$username" ] && [ -n "$password" ] && {
-                               password="$(echo -n "$password" | md5sum)"; password="${password%% *}"
+                               [ "${#password}" == 32 -a -z "${password//[a-f0-9]/}" ] || {
+                                       password="$(echo -n "$password" | md5sum)"; password="${password%% *}"
+                               }
                                uci_set_state network "$cfg" ipaddr "$wanip"
 
                                ( wget -qO/dev/null "http://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=AUTO&user_id=$username&pass=$password&tunnel_id=$tunnelid" && ifup "$cfg" )&