aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/inet.erl
AgeCommit message (Collapse)Author
2012-10-31erts,kernel: Implement socket option ipv6_v6only in erlang codeRaimo Niskanen
2012-08-27Merge branch 'maint'Lukas Larsson
* maint: Bumped version nr ssl & public_key: Workaround that some certificates encode countryname as utf8 and close down gracefully if other ASN-1 errors occur. Add more cross reference links to ct docs Remove config option from common_test args Update user config to use nested tuple keys Allow mixed IPv4 and IPv6 addresses to sctp_bindx Add checks for in6addr_any and in6addr_loopback Fix SCTP multihoming observer: fix app file (Noticed-by: Motiejus Jakstys) Fix lib/src/test/ssh_basic_SUITE.erl to fix IPv6 option typos Prevent index from being corrupted if a nonexistent item is deleted Add tests showing that trying to delete non-existing object may corrupt the table index Fix Table Viewer search crash on new|changed|deleted rows Escape control characters in Table Viewer Fix Table Viewer crash after a 'Found' -> 'Not found' search sequence inet_drv.c: Set sockaddr lengths in inet_set_[f]address Conflicts: erts/preloaded/ebin/prim_inet.beam
2012-08-16Fix SCTP multihomingTomas Abrahamsson
Setting several ip addresses for an SCTP socket worked only for IPv4 on Linux. For IPv6 and for other for instance Solaris and FreeBSD, it failed with badarg for both IPv4 and IPv6. For the first address specified to gen_sctp:open, bind is now called, while for any following addresses, sctp_bindx is called, repeatedly, with one address at a time. Previously, sctp_bindx was called for all addresses in one go, with the addresses in reverse order, and bind was not called at all if more than one address was specified. Both Solaris and FreeBSD requires bind to have been called before calling sctp_bindx, and FreeBSD additionally allows at most one address at a time in the call to sctp_bindx. For some versions of Linux, for instance SuSE 10, the port can be 0 only for the call to bind but not for subsequent calls to sctp_bindx, so replace with the port number assigned by the operating system.
2012-06-20Optimize inet:tcp_controlling_processSverker Eriksson
by removing unecessary inet:setops calls.
2012-05-23Merge branch 'maint'Lukas Larsson
* maint: Add testcase for controlling_process(P,self()) Fix port leaking after controlling_process(Port, self())
2012-05-23Merge branch 'lukas/kernel/fix-gen_udp_tcp-leak/OTP-10094' into maintLukas Larsson
* lukas/kernel/fix-gen_udp_tcp-leak/OTP-10094: Add testcase for controlling_process(P,self()) Fix port leaking after controlling_process(Port, self())
2012-04-16kernel, erts: Remove bit8 option from inetBjörn-Egil Dahlberg
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-02-04Fix port leaking after controlling_process(Port, self())Ricardo
Add case to handle the situation when someone call {gen_tcp,gen_udp}:controlling_process(Port, self()). Also improve spec and doc from gen_udp and gen_sctp for controlling_process/2. To reproduce the issue, open an UDP port: 4> {ok,Port} = gen_udp:open(9000, [binary]). {ok,#Port<0.587>} 5> gen_udp:controlling_process(Port, self()). ok Simulate error: 6> 1=2. ** exception error: no match of right hand side value 2 Here is the leak: 7> inet:i(). Port Module Recv Sent Owner Local Address Foreign Address State Type 581 inet_udp 0 0 <0.31.0> *:cslistener *:* BOUND DGRAM ok
2012-01-04Fix returned error from gen_tcp:accept/1,2 when running out of portsPer Hedeland
The {error, enfile} return value is badly misleading and confusing for this case, since the Posix ENFILE errno value has a well-defined meaning that has nothing to do with Erlang ports. The fix changes the return value to {error, system_limit}, which is consistent with e.g. various file(3) functions. inet:format_error/1 has also been updated to support system_limit in the same manner as file:format_error/1.
2011-12-01sendfile caller now has to be the controlling_processLukas Larsson
This is needed because otherwise there could be scenarios when the efile driver blocks a fd and then crashes without the inet driver ever finding out. Now when the process crashes the port will close and we can cleanup in the inet driver.
2011-11-17erts,kernel: Implement gen_sctp:peeloff/2Raimo Niskanen
2011-11-17erts,kernel: Add type stream sockets to SCTPRaimo Niskanen
2011-08-25Improve types and specifications of the inet modulesHans Bolinder
2011-05-09Types and specifications have been modified and addedHans Bolinder
2010-11-09Implement basic inet:getifaddrs/0Raimo Niskanen
2010-06-03kernel: Add declaration for exported typesKostis Sagonas
2010-02-10Merge branch 'rani/inet_gethostbyname_fixes' into ccase/r13b04_devErlang/OTP
* rani/inet_gethostbyname_fixes: inet_res_SUITE: testcase fixes for legacy DNS resolver (Solaris 8) inet_res: /etc/resolv.conf: use domain as default search list inet: delayed/avoided read of /etc/resolv.conf and /etc/hosts inet_gethost_native: workaround for empty result hostname on MacOS X inet_res_SUITE: testcase fix for empty domain name inet:gethostbyname improved to parse IP strings and look up own hostname OTP-8426 The resolver routines failed to look up the own node name as hostname, if the OS native resolver was erroneously configured, bug reported by Yogish Baliga, now fixed. The resolver routines now tries to parse the hostname as an IP string as most OS resolvers do, unless the native resolver is used. The DNS resolver inet_res and file resolver inet_hosts now do not read OS configuration files until they are needed. Since the native resolver is default, in most cases they are never needed. The DNS resolver's automatic updating of OS configuration file data (/etc/resolv.conf) now uses the 'domain' keyword as default search domain if there is no 'search' keyword.
2010-02-09inet:gethostbyname improved to parse IP strings and look up own hostnameRaimo Niskanen
Now inet:gethostbyname tries to parse the hostname as an IP string first if the 'native' lookup method is not used. One can also make the IP string parsing explicit using the new 'string' lookup method, or avoid it using the new pseudo lookup method 'nostring'. In R13B04 a bug was introduced when the gethostbyname code was rewritten, so if the native resolver was used and misconfigured to not be able to look up the own hostname, inet:gethostbyname also failed. This is now fixed.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP