From 1c26ae984a79224ce64b40dbc7239bf9721bb096 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Fri, 20 Jul 2018 15:14:06 +0200 Subject: [socket-nif] Add support for socket (level ip) option freebind Added support for ip level socket option FREEBIND. Note that there is an option available on FreeBSD called IP_BINDANY, which seems to have similar properties (FREEBIND is *not* available on FreeBSD). There are some restrictions for this option though (which is not mentioned in the Linux man page). OTP-14831 --- lib/kernel/test/socket_server.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/kernel') diff --git a/lib/kernel/test/socket_server.erl b/lib/kernel/test/socket_server.erl index 6aa26494f7..971ceb2093 100644 --- a/lib/kernel/test/socket_server.erl +++ b/lib/kernel/test/socket_server.erl @@ -604,6 +604,7 @@ handler_init(Manager, ID, Peek, Sock) -> SndTO = GSO(sndtimeo), Linger = GSO(linger), Timestamp = GSO(timestamp), + FreeBind = GIP(freebind), MTU = GIP(mtu), MTUDisc = GIP(mtu_discover), MALL = GIP(multicast_all), @@ -629,6 +630,7 @@ handler_init(Manager, ID, Peek, Sock) -> "~n (socket) SndTO: ~s" "~n (socket) Linger: ~s" "~n (socket) Timestamp: ~s" + "~n (ip) FreeBind: ~s" "~n (ip) MTU: ~s" "~n (ip) MTU Discovery: ~s" "~n (ip) Multicast ALL: ~s" @@ -642,7 +644,7 @@ handler_init(Manager, ID, Peek, Sock) -> RA, RP, B2D, OOBI, RcvBuf, RcvLW, RcvTO, SndBuf, SndLW, SndTO, Linger, Timestamp, - MTU, MTUDisc, MALL, MIF, MLoop, MTTL, + FreeBind, MTU, MTUDisc, MALL, MIF, MLoop, MTTL, NF, RecvTOS, RecvTTL]), handler_loop(#handler{peek = Peek, -- cgit v1.2.3