projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45b12fc
)
Handle IPv6 support being missing
author
Jamie Cameron
<jcameron@webmin.com>
Thu, 25 Nov 2010 05:24:05 +0000
(21:24 -0800)
committer
Jamie Cameron
<jcameron@webmin.com>
Thu, 25 Nov 2010 05:24:05 +0000
(21:24 -0800)
web-lib-funcs.pl
patch
|
blob
|
history
diff --git
a/web-lib-funcs.pl
b/web-lib-funcs.pl
index
9e7aaef
..
1782fea
100755
(executable)
--- a/
web-lib-funcs.pl
+++ b/
web-lib-funcs.pl
@@
-2565,6
+2565,11
@@
if ($ip = &to_ipaddress($host)) {
}
elsif ($ip = &to_ip6address($host)) {
# Create IPv6 socket and connection
+ if (!&supports_ipv6()) {
+ $msg = "IPv6 connections are not supported";
+ if ($err) { $$err = $msg; return 0; }
+ else { &error($msg); }
+ }
if (!socket($fh, Socket6::PF_INET6(), SOCK_STREAM, $proto)) {
my $msg = "Failed to create IPv6 socket : $!";
if ($err) { $$err = $msg; return 0; }