summaryrefslogtreecommitdiff
path: root/lib/resolv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/resolv.rb')
-rw-r--r--lib/resolv.rb4
1 files changed, 3 insertions, 1 deletions
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