Add Fedora 9+ support, IPv6 support
authorJamie Cameron <jcameron@webmin.com>
Mon, 1 Nov 2010 05:00:26 +0000 (22:00 -0700)
committerJamie Cameron <jcameron@webmin.com>
Mon, 1 Nov 2010 05:00:26 +0000 (22:00 -0700)
stunnel/config-redhat-linux-18.0-* [new file with mode: 0644]
stunnel/save_stunnel.cgi

diff --git a/stunnel/config-redhat-linux-18.0-* b/stunnel/config-redhat-linux-18.0-*
new file mode 100644 (file)
index 0000000..2c6af58
--- /dev/null
@@ -0,0 +1 @@
+stunnel_path=/usr/bin/stunnel
index 47a4125..b60f6d3 100755 (executable)
@@ -37,7 +37,7 @@ else {
                $in{'tcpw'} =~ /^\S+$/ || &error($text{'save_etcpw'});
                }
        if (!$in{'iface_def'}) {
-               gethostbyname($in{'iface'}) || &check_ipaddress($in{'iface'}) ||
+               &to_ipaddress($in{'iface'}) || &to_ip6address($in{'iface'}) ||
                        &error($text{'save_eiface'});
                }
        if ($in{'mode'} == 0 || $in{'mode'} == 1) {
@@ -48,7 +48,7 @@ else {
                }
        else {
                # Connecting to remote host and port
-               gethostbyname($in{'rhost'}) || &check_ipaddress($in{'rhost'}) ||
+               &to_ipaddress($in{'rhost'}) || &to_ip6address($in{'rhost'}) ||
                        &error($text{'save_erhost'});
                $in{'rport'} =~ /^\d+$/ || &error($text{'save_erport'});
                }