summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-03-08 13:34:54 +0100
committerThomas Haller <thaller@redhat.com>2018-04-04 14:57:07 +0200
commit2a579f05febd8338cd7d7410c833acd1454b87fb (patch)
tree95b0b73b86219cdccecd36dbf3ed5d5bc9eb9552
parent33d2d8850bd64c70b18eb1114546277548496e17 (diff)
downloadNetworkManager-2a579f05febd8338cd7d7410c833acd1454b87fb.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 6acc3f10d8..6bcd8f0d8a 100644
--- a/src/nm-types.h
+++ b/src/nm-types.h
@@ -95,6 +95,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;