diff options
author | Lukas Maerdian <lukas.maerdian@canonical.com> | 2020-04-07 08:16:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-07 08:16:34 +0200 |
commit | 0586a8d539326cc3273c2ea6f36c6dfe1cbe211b (patch) | |
tree | 8e1fe27a6caa8f11062b5d9c84c9bc4d9b3f8d0a /src/networkd.c | |
parent | 39057cc2a71185713a8c4d28182169d2e06db486 (diff) |
Add ipv6-address-generation field for NM backend (#126)
* ip6: add addr-gen-mode field for NM backend
* ip6: addr-gen-mode can be used with manual addresses, too
* Improve schema naming and comments
* Rename ip6_addr_gen_mode variable
Diffstat (limited to 'src/networkd.c')
-rw-r--r-- | src/networkd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/networkd.c b/src/networkd.c index 4d2a0b4..bb1c45b 100644 --- a/src/networkd.c +++ b/src/networkd.c @@ -487,6 +487,15 @@ write_network_file(const NetplanNetDefinition* def, const char* rootdir, const c if (def->ip6_addresses) for (unsigned i = 0; i < def->ip6_addresses->len; ++i) g_string_append_printf(network, "Address=%s\n", g_array_index(def->ip6_addresses, char*, i)); + if (def->ip6_addr_gen_mode) { + /* TODO: Figure out how we can configure ipv6-address-generation for networkd. + * IPv6Token= seems to be the corresponding option, but it doesn't do + * exactly what we need and has quite some restrictions, c.f.: + * https://github.com/systemd/systemd/issues/4625 + * https://github.com/systemd/systemd/pull/14415 */ + g_fprintf(stderr, "ERROR: %s: ipv6-address-generation is not supported by networkd\n", def->id); + exit(1); + } if (def->accept_ra == NETPLAN_RA_MODE_ENABLED) g_string_append_printf(network, "IPv6AcceptRA=yes\n"); else if (def->accept_ra == NETPLAN_RA_MODE_DISABLED) |