Commit 8460af11 authored by Tore Anderson's avatar Tore Anderson Committed by Pasi Sjöholm

main: Disable 6to4 by default

The 6to4 protocol as deployed on the public internet has been shown to
cause severe connectivity problems. RFC 6343 section 4.1 therefore
recommends against host implementations enabling it by default. This
patch implements that recommendation by introducing a new "Enable6to4"
configuration option, which defaults to false.

Due to the operational problems described in RFC 6343 section 3, the
IETF is about to deprecate the 6to4 protocol completely. This is done in
the document draft-ietf-v6ops-6to4-to-historic which is currently in the
RFC Editor's queue, pending final pulication as an RFC. Section 4 of
this document reinforces and strengthens RFC 6343's current
recommendation, mandating that hosts MUST disable 6to4 by default.

Conflicts:
	connman/src/main.c
parent 942961cf
......@@ -126,5 +126,10 @@ really know what you are doing.
Restore earlier tethering status when returning from offline mode,
re-enabling a technology, and after restarts and reboots.
Default value is false.
.TP
.B Enable6to4=\fPtrue|false\fP
Automatically enable Anycast 6to4 if possible. This is not recommended, as the
use of 6to4 will generally lead to a severe degradation of connection quality.
See RFC6343. Default value is false (as recommended by RFC6343 section 4.1).
.SH "SEE ALSO"
.BR Connman (8)
......@@ -410,7 +410,8 @@ static bool apply_lease_available_on_network(GDHCPClient *dhcp_client,
dhcp->pac);
}
__connman_6to4_probe(service);
if (connman_setting_get_bool("Enable6to4"))
__connman_6to4_probe(service);
return true;
}
......
......@@ -81,6 +81,7 @@ static struct {
char *ipv4_status_url;
char *tethering_subnet_block;
char **dont_bring_down_at_startup;
bool enable_6to4;
} connman_settings = {
.bg_scan = true,
.pref_timeservers = NULL,
......@@ -98,6 +99,7 @@ static struct {
.ipv6_status_url = NULL,
.tethering_subnet_block = NULL,
.dont_bring_down_at_startup = NULL,
.enable_6to4 = false,
};
#define CONF_BG_SCAN "BackgroundScanning"
......@@ -118,6 +120,7 @@ static struct {
#define CONF_STATUS_URL_IPV4 "Ipv4StatusUrl"
#define CONF_TETHERING_SUBNET_BLOCK "TetheringSubnetBlock"
#define CONF_ENABLE_6TO4 "Enable6to4"
static const char *supported_options[] = {
CONF_BG_SCAN,
......@@ -136,6 +139,7 @@ static const char *supported_options[] = {
CONF_STATUS_URL_IPV6,
CONF_TETHERING_SUBNET_BLOCK,
CONF_DONT_BRING_DOWN_AT_STARTUP,
CONF_ENABLE_6TO4,
NULL
};
......@@ -416,6 +420,12 @@ static void parse_config(GKeyFile *config)
g_clear_error(&error);
boolean = __connman_config_get_bool(config, "General",
CONF_ENABLE_6TO4, &error);
if (!error)
connman_settings.enable_6to4 = boolean;
g_clear_error(&error);
}
static int config_init(const char *file)
......@@ -606,6 +616,9 @@ bool connman_setting_get_bool(const char *key)
if (g_str_equal(key, CONF_PERSISTENT_TETHERING_MODE))
return connman_settings.persistent_tethering_mode;
if (g_str_equal(key, CONF_ENABLE_6TO4))
return connman_settings.enable_6to4;
return false;
}
......
......@@ -95,3 +95,9 @@
# re-enabling a technology, and after restarts and reboots.
# Default value is false.
# PersistentTetheringMode = false
# Automatically enable Anycast 6to4 if possible. This is not recommended, as
# the use of 6to4 will generally lead to a severe degradation of connection
# quality. See RFC6343. Default value is false (as recommended by RFC6343
# section 4.1).
# Enable6to4 = false
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment