From: Lennart Poettering Date: Tue, 16 Feb 2021 22:41:35 +0000 (+0100) Subject: Merge pull request #18007 from fw-strlen/ipv6_masq_and_dnat X-Git-Tag: v248-rc1~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1b4e9204c8260956825e2b9733c95903e215e31;p=thirdparty%2Fsystemd.git Merge pull request #18007 from fw-strlen/ipv6_masq_and_dnat Support ipv6 for masquerade and dnat in nspawn and networkd --- b1b4e9204c8260956825e2b9733c95903e215e31 diff --cc src/network/networkd-util.c index a5c6fa8d006,02a6800a414..494b23f9f4a --- a/src/network/networkd-util.c +++ b/src/network/networkd-util.c @@@ -58,9 -51,18 +58,19 @@@ DEFINE_STRING_TABLE_LOOKUP(routing_poli DEFINE_STRING_TABLE_LOOKUP(duplicate_address_detection_address_family, AddressFamily); DEFINE_CONFIG_PARSE_ENUM(config_parse_link_local_address_family, link_local_address_family, AddressFamily, "Failed to parse option"); +DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(dhcp_deprecated_address_family, AddressFamily); DEFINE_STRING_TABLE_LOOKUP(dhcp_lease_server_type, sd_dhcp_lease_server_type); + static AddressFamily address_family_compat_from_string(const char *s) { + if (streq_ptr(s, "yes")) /* compat name */ + return ADDRESS_FAMILY_IPV4; + if (streq_ptr(s, "both")) + return ADDRESS_FAMILY_YES; + return address_family_from_string(s); + } + DEFINE_CONFIG_PARSE_ENUM(config_parse_address_family_compat, address_family_compat, + AddressFamily, "Failed to parse option"); + int config_parse_address_family_with_kernel( const char* unit, const char *filename,