diff options
author | Stu Tomlinson <stu@nosnilmot.com> | 2018-02-28 19:14:35 +0300 |
---|---|---|
committer | Stu Tomlinson <stu@nosnilmot.com> | 2018-02-28 19:14:35 +0300 |
commit | da81590fef1383bc90d3f9ccae4b9e906133637d (patch) | |
tree | 370bffe4f6c3fc585817e7ed57ae5cce3912b973 /src/ejabberd_s2s_in.erl | |
parent | 5054a9933f29d6cc8a88486c624987b1b9f05b17 (diff) |
Validate additional listen opts
The options "inet", "inet6" and "backlog" are valid listen options, but are
currently logged as errors (even though they do work):
2018-02-28 16:08:44.141 [error] <0.338.0>@ejabberd_listener:validate_module_option:630 unknown listen option 'backlog' for 'ejabberd_c2s' will be likely ignored, available options are: access, shaper, certfile, ciphers, dhfile, cafile, client_cafile, protocol_options, tls, tls_compression, starttls, starttls_required, tls_verify, zlib, max_fsm_queue
This adds the necessary validators so they are correctly recognized.
Diffstat (limited to 'src/ejabberd_s2s_in.erl')
-rw-r--r-- | src/ejabberd_s2s_in.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ejabberd_s2s_in.erl b/src/ejabberd_s2s_in.erl index 31a936c8c..a02834c78 100644 --- a/src/ejabberd_s2s_in.erl +++ b/src/ejabberd_s2s_in.erl @@ -358,6 +358,9 @@ change_shaper(#{shaper := ShaperName, server_host := ServerHost} = State, (supervisor) -> fun((boolean()) -> boolean()); (max_stanza_type) -> fun((timeout()) -> timeout()); (max_fsm_queue) -> fun((pos_integer()) -> pos_integer()); + (inet) -> fun((boolean()) -> boolean()); + (inet6) -> fun((boolean()) -> boolean()); + (backlog) -> fun((timeout()) -> timeout()); (atom()) -> [atom()]. listen_opt_type(shaper) -> fun acl:shaper_rules_validator/1; listen_opt_type(certfile = Opt) -> @@ -381,6 +384,10 @@ listen_opt_type(max_stanza_size) -> end; listen_opt_type(max_fsm_queue) -> fun(I) when is_integer(I), I>0 -> I end; +listen_opt_type(inet) -> fun(B) when is_boolean(B) -> B end; +listen_opt_type(inet6) -> fun(B) when is_boolean(B) -> B end; +listen_opt_type(backlog) -> + fun(I) when is_integer(I), I>0 -> I end; listen_opt_type(_) -> [shaper, certfile, ciphers, dhfile, cafile, protocol_options, - tls_compression, tls, max_fsm_queue]. + tls_compression, tls, max_fsm_queue, backlog, inet, inet6]. |