aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-07-24 11:49:12 +0200
committerMicael Karlberg <[email protected]>2018-09-18 14:50:18 +0200
commit9ca6de6efbe844bcf7dc996cfcf51bcd50325007 (patch)
tree518c101fe7e6d1bb6d08782ae13346fb6a204504 /lib/kernel/test
parent8b61022bdca354e541380391e3b0b2606f7af3f8 (diff)
downloadotp-9ca6de6efbe844bcf7dc996cfcf51bcd50325007.tar.gz
otp-9ca6de6efbe844bcf7dc996cfcf51bcd50325007.tar.bz2
otp-9ca6de6efbe844bcf7dc996cfcf51bcd50325007.zip
[socket-nif] Add support for socket (level ipv6) option dstopts
Added support for the IPv6 socket option(s) DSTOPTS. 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 RTHDR and HOPLIMIT. On FreeBSD, it says that HOPOPTS requires superuser privileges. Needs furher checking. OTP-14831.
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/socket_server.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/kernel/test/socket_server.erl b/lib/kernel/test/socket_server.erl
index 1cd0ec1202..8436b39372 100644
--- a/lib/kernel/test/socket_server.erl
+++ b/lib/kernel/test/socket_server.erl
@@ -635,7 +635,9 @@ handler_init(Manager, ID, Peek, Sock) ->
RecvPktInfo = GIP6(recvpktinfo),
RtHdr = GIP6(rthdr),
AuthHdr = GIP6(authhdr),
+ HopLimit = GIP6(hoplimit),
HopOpts = GIP6(hopopts),
+ DstOpts = GIP6(dstopts),
i("got continue when: "
"~n (socket) Domain: ~p"
"~n (socket) Type: ~p"
@@ -670,7 +672,9 @@ handler_init(Manager, ID, Peek, Sock) ->
"~n (ipv6) Recv Pkt Info: ~s"
"~n (ipv6) RT Hdr: ~s"
"~n (ipv6) Auth Hdr: ~s"
- "~n (ipv6) Hop Opts: ~s",
+ "~n (ipv6) Hop Limit: ~s"
+ "~n (ipv6) Hop Opts: ~s"
+ "~n (ipv6) Dst Opts: ~s",
[Domain, Type, Proto,
RA, RP, B2D, OOBI,
RcvBuf, RcvLW, RcvTO, SndBuf, SndLW, SndTO,
@@ -678,7 +682,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, HopOpts]),
+ RtHdr, AuthHdr, HopLimit, HopOpts, DstOpts]),
handler_loop(#handler{peek = Peek,
manager = Manager,