summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-03-08 13:34:54 +0100
committerThomas Haller <thaller@redhat.com>2018-03-30 13:17:57 +0200
commit5b2cdbc335ffb1b1fd777b1bcb463283a1d04fa3 (patch)
treebbd5ffa2c475d1496d42eca2fdb602969c05a275
parentd169cde872c433c1985188f252e1945d4972e154 (diff)
downloadNetworkManager-5b2cdbc335ffb1b1fd777b1bcb463283a1d04fa3.tar.gz
platform: add NM_IP_CONFIG_SOURCE_IP6LL source type
We already have IP4LL and maybe should re-use that also for IPv6. However, when adding the prefix route for IPv6 link local addresses, we want to add it with protocol "kernel", unlike "user" for IPv4. There is no strong reason for this. I don't think the protocol matters much. But up to now kernel automatically adds this prefix route, so as we are going to change that and let NetworkManager add it, keep the protocol at "kernel".
-rw-r--r--src/nm-types.h1
-rw-r--r--src/platform/nm-platform-utils.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/nm-types.h b/src/nm-types.h
index 487b001ec6..b96a43cbea 100644
--- a/src/nm-types.h
+++ b/src/nm-types.h
@@ -96,6 +96,7 @@ typedef enum {
NM_IP_CONFIG_SOURCE_KERNEL,
NM_IP_CONFIG_SOURCE_SHARED,
NM_IP_CONFIG_SOURCE_IP4LL,
+ NM_IP_CONFIG_SOURCE_IP6LL,
NM_IP_CONFIG_SOURCE_PPP,
NM_IP_CONFIG_SOURCE_WWAN,
NM_IP_CONFIG_SOURCE_VPN,
diff --git a/src/platform/nm-platform-utils.c b/src/platform/nm-platform-utils.c
index b664e8a9f1..114bf4b349 100644
--- a/src/platform/nm-platform-utils.c
+++ b/src/platform/nm-platform-utils.c
@@ -589,6 +589,8 @@ nmp_utils_ip_config_source_coerce_to_rtprot (NMIPConfigSource source)
switch (source) {
case NM_IP_CONFIG_SOURCE_KERNEL:
return RTPROT_KERNEL;
+ case NM_IP_CONFIG_SOURCE_IP6LL:
+ return RTPROT_KERNEL;
case NM_IP_CONFIG_SOURCE_DHCP:
return RTPROT_DHCP;
case NM_IP_CONFIG_SOURCE_NDISC:
@@ -656,6 +658,7 @@ nmp_utils_ip_config_source_to_string (NMIPConfigSource source, char *buf, gsize
case NM_IP_CONFIG_SOURCE_KERNEL: s = "kernel"; break;
case NM_IP_CONFIG_SOURCE_SHARED: s = "shared"; break;
case NM_IP_CONFIG_SOURCE_IP4LL: s = "ipv4ll"; break;
+ case NM_IP_CONFIG_SOURCE_IP6LL: s = "ipv6ll"; break;
case NM_IP_CONFIG_SOURCE_PPP: s = "ppp"; break;
case NM_IP_CONFIG_SOURCE_WWAN: s = "wwan"; break;
case NM_IP_CONFIG_SOURCE_VPN: s = "vpn"; break;