aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2015-06-17 09:35:14 +0200
committerRaimo Niskanen <[email protected]>2015-06-17 09:35:14 +0200
commit5fc3d37e65d31dea7938750a3d75c7a1f7ebbd25 (patch)
treeee317fe2e3fd790976db7b4a8d20951fe72bb972 /lib/kernel/src
parent828fbf8c9bd838280c1fc8a9f9da065aba2ada0e (diff)
parent485187dfdb5ec628efed755c88331ca296bc33dc (diff)
downloadotp-5fc3d37e65d31dea7938750a3d75c7a1f7ebbd25.tar.gz
otp-5fc3d37e65d31dea7938750a3d75c7a1f7ebbd25.tar.bz2
otp-5fc3d37e65d31dea7938750a3d75c7a1f7ebbd25.zip
Merge branch 'nybek/fix_so_linger_zero__simple'
* nybek/fix_so_linger_zero__simple: Update prim_inet.beam Fix socket option {linger, {true, 0}} to abort TCP connections Apply 'show_econnreset' socket option to send errors as well Add 'show_econnreset' TCP socket option
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/gen_tcp.erl2
-rw-r--r--lib/kernel/src/inet.erl7
-rw-r--r--lib/kernel/src/inet_int.hrl1
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/kernel/src/gen_tcp.erl b/lib/kernel/src/gen_tcp.erl
index bc8ffbe5e3..86251fc8f1 100644
--- a/lib/kernel/src/gen_tcp.erl
+++ b/lib/kernel/src/gen_tcp.erl
@@ -58,6 +58,7 @@
{reuseaddr, boolean()} |
{send_timeout, non_neg_integer() | infinity} |
{send_timeout_close, boolean()} |
+ {show_econnreset, boolean()} |
{sndbuf, non_neg_integer()} |
{tos, non_neg_integer()} |
{ipv6_v6only, boolean()}.
@@ -89,6 +90,7 @@
reuseaddr |
send_timeout |
send_timeout_close |
+ show_econnreset |
sndbuf |
tos |
ipv6_v6only.
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index d668738109..1ae90aaf0c 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -654,7 +654,7 @@ options() ->
multicast_if, multicast_ttl, multicast_loop,
exit_on_close, high_watermark, low_watermark,
high_msgq_watermark, low_msgq_watermark,
- send_timeout, send_timeout_close
+ send_timeout, send_timeout_close, show_econnreset
].
%% Return a list of statistics options
@@ -672,7 +672,8 @@ connect_options() ->
[tos, priority, reuseaddr, keepalive, linger, sndbuf, recbuf, nodelay,
header, active, packet, packet_size, buffer, mode, deliver,
exit_on_close, high_watermark, low_watermark, high_msgq_watermark,
- low_msgq_watermark, send_timeout, send_timeout_close, delay_send, raw].
+ low_msgq_watermark, send_timeout, send_timeout_close, delay_send, raw,
+ show_econnreset].
connect_options(Opts, Family) ->
BaseOpts =
@@ -740,7 +741,7 @@ listen_options() ->
header, active, packet, buffer, mode, deliver, backlog, ipv6_v6only,
exit_on_close, high_watermark, low_watermark, high_msgq_watermark,
low_msgq_watermark, send_timeout, send_timeout_close, delay_send,
- packet_size, raw].
+ packet_size, raw, show_econnreset].
listen_options(Opts, Family) ->
BaseOpts =
diff --git a/lib/kernel/src/inet_int.hrl b/lib/kernel/src/inet_int.hrl
index 889b596a22..7bd973af99 100644
--- a/lib/kernel/src/inet_int.hrl
+++ b/lib/kernel/src/inet_int.hrl
@@ -147,6 +147,7 @@
-define(INET_LOPT_MSGQ_HIWTRMRK, 36).
-define(INET_LOPT_MSGQ_LOWTRMRK, 37).
-define(INET_LOPT_NETNS, 38).
+-define(INET_LOPT_TCP_SHOW_ECONNRESET, 39).
% Specific SCTP options: separate range:
-define(SCTP_OPT_RTOINFO, 100).
-define(SCTP_OPT_ASSOCINFO, 101).