aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-07-24 11:08:20 +0200
committerMicael Karlberg <[email protected]>2018-09-18 14:50:18 +0200
commit8b61022bdca354e541380391e3b0b2606f7af3f8 (patch)
tree41ed15ddee4429ef64661882e7394b7e0913a712 /lib/kernel
parentd7ca5ba9d8a7f094037878acfecb52b0bfbacc2e (diff)
downloadotp-8b61022bdca354e541380391e3b0b2606f7af3f8.tar.gz
otp-8b61022bdca354e541380391e3b0b2606f7af3f8.tar.bz2
otp-8b61022bdca354e541380391e3b0b2606f7af3f8.zip
[socket-nif] Add support for socket (level ipv6) option authhdr & hopopts
Added support for the IPv6 socket option(s) AUTHHDR and HOPOPTS. Its possible that the option is AUTHHDR is obsolete. It says so in the include files and when trying to get it (getsockopt) it returns with enoprotoopt. The option HOPOPTS 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 RTHDR and HOPLIMIT. On FreeBSD, it says that HOPOPTS requires superuser privileges. Needs furher checking. OTP-14831.
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/socket_server.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/kernel/test/socket_server.erl b/lib/kernel/test/socket_server.erl
index 75cede75e5..1cd0ec1202 100644
--- a/lib/kernel/test/socket_server.erl
+++ b/lib/kernel/test/socket_server.erl
@@ -634,6 +634,8 @@ handler_init(Manager, ID, Peek, Sock) ->
MLoop6 = GIP6(multicast_loop),
RecvPktInfo = GIP6(recvpktinfo),
RtHdr = GIP6(rthdr),
+ AuthHdr = GIP6(authhdr),
+ HopOpts = GIP6(hopopts),
i("got continue when: "
"~n (socket) Domain: ~p"
"~n (socket) Type: ~p"
@@ -666,14 +668,17 @@ handler_init(Manager, ID, Peek, Sock) ->
"~n (ipv6) Multicast IF: ~s"
"~n (ipv6) Multicast Loop: ~s"
"~n (ipv6) Recv Pkt Info: ~s"
- "~n (ipv6) RT Hdr: ~s",
+ "~n (ipv6) RT Hdr: ~s"
+ "~n (ipv6) Auth Hdr: ~s"
+ "~n (ipv6) Hop Opts: ~s",
[Domain, Type, Proto,
RA, RP, B2D, OOBI,
RcvBuf, RcvLW, RcvTO, SndBuf, SndLW, SndTO,
Linger, Timestamp,
FreeBind, MTU, MTUDisc, MALL, MIF4, MLoop4, MTTL,
NF, RecvIF, RecvOPTS, RecvTOS, RecvTTL,
- MHops, MIF6, MLoop6, RecvPktInfo, RtHdr]),
+ MHops, MIF6, MLoop6, RecvPktInfo,
+ RtHdr, AuthHdr, HopOpts]),
handler_loop(#handler{peek = Peek,
manager = Manager,