From e54642b537177941ff361b1eebdec10e02cfc22d Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Tue, 24 Jul 2018 12:05:00 +0200 Subject: [socket-nif] Add support for socket (level ipv6) option flowinfo Added support for the IPv6 socket option(s) FLOWINFO. The option returns with einval when calling setsockopt, so either you need to be a privileged user to update, or its not actually possible to update this option (even though it says nothing about that in the man page. It only talks about set). This is the same behaviour as with DSTOPTS. Needs furher checking. OTP-14831. --- lib/kernel/test/socket_server.erl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/kernel/test/socket_server.erl') diff --git a/lib/kernel/test/socket_server.erl b/lib/kernel/test/socket_server.erl index 8436b39372..a1be73593b 100644 --- a/lib/kernel/test/socket_server.erl +++ b/lib/kernel/test/socket_server.erl @@ -166,7 +166,7 @@ do_manager_init(Domain, dgram = Type, Proto, Peek) -> addr => Addr}, i("try bind to: " "~n ~p", [Addr]), - case socket:bind(Sock, SA) of + case socket:bind(Sock, any) of {ok, _P} -> ok; {error, BReason} -> @@ -638,6 +638,7 @@ handler_init(Manager, ID, Peek, Sock) -> HopLimit = GIP6(hoplimit), HopOpts = GIP6(hopopts), DstOpts = GIP6(dstopts), + FlowInfo = GIP6(flowinfo), i("got continue when: " "~n (socket) Domain: ~p" "~n (socket) Type: ~p" @@ -674,7 +675,8 @@ handler_init(Manager, ID, Peek, Sock) -> "~n (ipv6) Auth Hdr: ~s" "~n (ipv6) Hop Limit: ~s" "~n (ipv6) Hop Opts: ~s" - "~n (ipv6) Dst Opts: ~s", + "~n (ipv6) Dst Opts: ~s" + "~n (ipv6) Flow Info: ~s", [Domain, Type, Proto, RA, RP, B2D, OOBI, RcvBuf, RcvLW, RcvTO, SndBuf, SndLW, SndTO, @@ -682,7 +684,7 @@ handler_init(Manager, ID, Peek, Sock) -> FreeBind, MTU, MTUDisc, MALL, MIF4, MLoop4, MTTL, NF, RecvIF, RecvOPTS, RecvTOS, RecvTTL, MHops, MIF6, MLoop6, RecvPktInfo, - RtHdr, AuthHdr, HopLimit, HopOpts, DstOpts]), + RtHdr, AuthHdr, HopLimit, HopOpts, DstOpts, FlowInfo]), handler_loop(#handler{peek = Peek, manager = Manager, -- cgit v1.2.3