summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib/resolv.rb4
-rw-r--r--version.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5904fcb64c..bbba6d464d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun Aug 31 16:20:14 2014 Tanaka Akira <akr@fsij.org>
+
+ * lib/resolv.rb (bind_random_port): Rescue EPERM for FreeBSD which
+ security.mac.portacl.port_high is changed.
+ See mac_portacl(4) for details.
+ Reported by Jakub Szafranski. [ruby-core:60917] [Bug #9544]
+
Sun Aug 31 16:16:24 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* re.c (match_aref): should not ignore name after NUL byte.
diff --git a/lib/resolv.rb b/lib/resolv.rb
index 6cf96a7035..53bfd54a11 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -646,7 +646,9 @@ class Resolv
begin
port = rangerand(1024..65535)
udpsock.bind(bind_host, port)
- rescue Errno::EADDRINUSE
+ rescue Errno::EADDRINUSE, # POSIX
+ Errno::EACCES, # SunOS: See PRIV_SYS_NFS in privileges(5)
+ Errno::EPERM # FreeBSD: security.mac.portacl.port_high is configurable. See mac_portacl(4).
retry
end
end
diff --git a/version.h b/version.h
index 41a4c9777c..893b835482 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.0.0"
#define RUBY_RELEASE_DATE "2014-08-31"
-#define RUBY_PATCHLEVEL 535
+#define RUBY_PATCHLEVEL 536
#define RUBY_RELEASE_YEAR 2014
#define RUBY_RELEASE_MONTH 8