From 1f0d9695125bf8e66d0e53e37d454755a84899bb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 6 Jul 2015 20:29:33 +0200 Subject: networkd: various fixes for the IPv6 privacy extensions support - Make sure that the IPv6PrivacyExtensions=yes results in prefer-temporary, not prefer-public. - Introduce special enum value "kernel" to leave setting unset, similar how we have it for the IP forwarding settings. - Bring the enum values in sync with the the strings we parse for them, to the level this makes sense (specifically, rename "disabled" to "no", and "prefer-temporary" to "yes"). - Make sure we really set the value to to "no" by default, the way it is already documented in the man page. - Fix whitespace error. - Make sure link_ipv6_privacy_extensions() actually returns the correct enum type, rather than implicitly casting it to "bool". - properly size formatting buffer for ipv6 sysctl value - Don't complain if /proc/sys isn't writable - Document that the enum follows the kernel's own values (0 = off, 1 = prefer-public, 2 = prefer-temporary) - Drop redundant negating of error code passed to log_syntax() - Manpage fixes This fixes a number of issues from PR #417 --- src/network/networkd.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/network/networkd.h') diff --git a/src/network/networkd.h b/src/network/networkd.h index cd5c020533..f98c640822 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -91,9 +91,10 @@ typedef enum DCHPClientIdentifier { } DCHPClientIdentifier; typedef enum IPv6PrivacyExtensions { - IPV6_PRIVACY_EXTENSIONS_DISABLE, + /* The values map to the kernel's /proc/sys/net/ipv6/conf/xxx/use_tempaddr values */ + IPV6_PRIVACY_EXTENSIONS_NO, IPV6_PRIVACY_EXTENSIONS_PREFER_PUBLIC, - IPV6_PRIVACY_EXTENSIONS_PREFER_TEMPORARY, + IPV6_PRIVACY_EXTENSIONS_YES, /* aka prefer-temporary */ _IPV6_PRIVACY_EXTENSIONS_MAX, _IPV6_PRIVACY_EXTENSIONS_INVALID = -1, } IPv6PrivacyExtensions; -- cgit v1.2.3-54-g00ecf