|
@@ -128,7 +128,7 @@ turn_params_t turn_params = {
|
|
|
0, /* alt_listener_port */
|
|
|
0, /* alt_tls_listener_port */
|
|
|
0, /* tcp_proxy_port */
|
|
|
- true, /* rfc5780 */
|
|
|
+ false, /* rfc5780 */
|
|
|
|
|
|
false, /* no_udp */
|
|
|
false, /* no_tcp */
|
|
@@ -1323,15 +1323,17 @@ static char Usage[] =
|
|
|
"256.\n"
|
|
|
" --ne=[1|2|3] Set network engine type for the process (for internal "
|
|
|
"purposes).\n"
|
|
|
- " --no-rfc5780 Disable RFC5780 (NAT behavior discovery).\n"
|
|
|
+ " --no-rfc5780 DEPRECATED and now default, see --rfc5780.\n"
|
|
|
+ " --rfc5780 Enable RFC5780 (NAT behavior discovery).\n"
|
|
|
" Originally, if there are more than one listener address from the same\n"
|
|
|
" address family, then by default the NAT behavior discovery feature "
|
|
|
"enabled.\n"
|
|
|
- " This option disables this original behavior, because the NAT behavior "
|
|
|
+ " This option enables this original behavior (downside is that the NAT "
|
|
|
+ "behavior "
|
|
|
"discovery\n"
|
|
|
" adds attributes to response, and this increase the possibility of an "
|
|
|
- "amplification attack.\n"
|
|
|
- " Strongly encouraged to use this option to decrease gain factor in STUN "
|
|
|
+ "amplification attack.)\n"
|
|
|
+ " Strongly encouraged to keep it off to decrease gain factor in STUN "
|
|
|
"binding responses.\n"
|
|
|
" --no-stun-backward-compatibility Disable handling old STUN Binding requests and disable MAPPED-ADDRESS "
|
|
|
"attribute\n"
|
|
@@ -1496,6 +1498,7 @@ enum EXTRA_OPTS {
|
|
|
ACME_REDIRECT_OPT,
|
|
|
LOG_BINDING_OPT,
|
|
|
NO_RFC5780,
|
|
|
+ ENABLE_RFC5780,
|
|
|
NO_STUN_BACKWARD_COMPATIBILITY_OPT,
|
|
|
RESPONSE_ORIGIN_ONLY_WITH_RFC5780_OPT,
|
|
|
RESPOND_HTTP_UNSUPPORTED_OPT,
|
|
@@ -1639,6 +1642,7 @@ static const struct myoption long_options[] = {
|
|
|
{"acme-redirect", required_argument, NULL, ACME_REDIRECT_OPT},
|
|
|
{"log-binding", optional_argument, NULL, LOG_BINDING_OPT},
|
|
|
{"no-rfc5780", optional_argument, NULL, NO_RFC5780},
|
|
|
+ {"rfc5780", optional_argument, NULL, ENABLE_RFC5780},
|
|
|
{"no-stun-backward-compatibility", optional_argument, NULL, NO_STUN_BACKWARD_COMPATIBILITY_OPT},
|
|
|
{"response-origin-only-with-rfc5780", optional_argument, NULL, RESPONSE_ORIGIN_ONLY_WITH_RFC5780_OPT},
|
|
|
{"respond-http-unsupported", optional_argument, NULL, RESPOND_HTTP_UNSUPPORTED_OPT},
|
|
@@ -2346,8 +2350,10 @@ static void set_option(int c, char *value) {
|
|
|
case LOG_BINDING_OPT:
|
|
|
turn_params.log_binding = get_bool_value(value);
|
|
|
break;
|
|
|
- case NO_RFC5780:
|
|
|
- turn_params.rfc5780 = 0;
|
|
|
+ case NO_RFC5780: // DEPRECATED, see below
|
|
|
+ break;
|
|
|
+ case ENABLE_RFC5780:
|
|
|
+ turn_params.rfc5780 = true;
|
|
|
break;
|
|
|
case NO_STUN_BACKWARD_COMPATIBILITY_OPT:
|
|
|
turn_params.no_stun_backward_compatibility = get_bool_value(value);
|