summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid A. Madore <david.madore@ens.fr>2010-02-22 14:31:43 +0100
committerDavid A. Madore <david.madore@ens.fr>2010-02-22 14:31:43 +0100
commit0ee8db29286983511adc1c9ed3ae64ff4ee1f0b3 (patch)
treebb45ad207e2401b1dff0df668a7b352984834c06
parente80e7f3c2289a93955ffeda6cf1a2e8e47eb351a (diff)
downloademergency-0ee8db29286983511adc1c9ed3ae64ff4ee1f0b3.tar.gz
emergency-0ee8db29286983511adc1c9ed3ae64ff4ee1f0b3.tar.bz2
emergency-0ee8db29286983511adc1c9ed3ae64ff4ee1f0b3.zip
Use a way to check for the existence of IPV6_V6ONLY that actually works. (Thanks, Cigaes, for this one.)
-rwxr-xr-xemergencyd.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/emergencyd.pl b/emergencyd.pl
index 5766484..7314324 100755
--- a/emergencyd.pl
+++ b/emergencyd.pl
@@ -97,7 +97,7 @@ if ( defined($opts{p}) ) {
my $socket;
socket $socket, PF_INET6, SOCK_DGRAM, $proto or die "Can't create socket: $!";
-if ( defined(IPV6_V6ONLY) ) {
+if ( defined(*IPV6_V6ONLY{CODE}) ) {
setsockopt $socket, IPPROTO_IPV6, IPV6_V6ONLY, 0 or die "Can't set IPV6_V6ONLY option to 0: $!";
}
bind $socket, sockaddr_in6($port, in6addr_any) or die "Can't bind socket: $!";