From cf8b332a5ea6bb737066f78f3e83153afee4bace Mon Sep 17 00:00:00 2001 From: Evgeny Sinelnikov Date: Fri, 29 Oct 2021 03:45:36 +0400 Subject: [PATCH] Add support LinkLocalAddressing and IPv6AcceptRA systemd-networkd control functions --- alterator-net-functions/alterator-net-functions | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/alterator-net-functions/alterator-net-functions b/alterator-net-functions/alterator-net-functions index c9e9120..c900bf9 100644 --- a/alterator-net-functions/alterator-net-functions +++ b/alterator-net-functions/alterator-net-functions @@ -1142,15 +1142,20 @@ write_systemd_networkd_bootproto() local ipv4_static= ipv6_static= local ipv4_addresses= ipv6_addresses= local ipv4_gateway= ipv6_gateway= + local ipll= ra= case "$1" in dhcp) value=yes;; dhcp6) value=ipv6; ipv4_static=1;; - dhcp4) value=ipv4; ipv6_static=1;; - static) ipv4_static=1; ipv6_static=1;; + dhcp4) value=ipv4; ipll=no; ra=false; ipv6_static=1;; + ipv4ll) value=; ipll=ipv4; ra=false;; + ipv6ll) value=; ipll=ipv6; ra=false;; + ipll) value=; ipll=yes; ra=false;; + static) ipv4_static=1; ipv6_static=1; ra=false;; esac - echo overwrite_systemd_networkd_ini_option "$network_filename" "Network" "DHCP" "$value" overwrite_systemd_networkd_ini_option "$network_filename" "Network" "DHCP" "$value" + overwrite_systemd_networkd_ini_option "$network_filename" "Network" "LinkLocalAddressing" "$ipll" + overwrite_systemd_networkd_ini_option "$network_filename" "Network" "IPv6AcceptRA" "$ra" unset_systemd_networkd_ini_option "$network_filename" "Network" "Address" unset_systemd_networkd_ini_option "$network_filename" "Network" "Gateway"