From 13275f350079c8ee56133e4b535c246b8dcadaee Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Wed, 15 Nov 2023 18:41:29 -0600 Subject: [PATCH 1/2] Enable IPv6 link-local addressing to unbreak SLAAC/DHCPv6 Fixes #55. I've left link-local addressing disabled for IPv4 as that matches the systemd behavior when `LinkLocalAddressing` is omitted from the `.network` file. --- jlmkr.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jlmkr.py b/jlmkr.py index c69d4b9..83e69f0 100755 --- a/jlmkr.py +++ b/jlmkr.py @@ -765,10 +765,10 @@ def create_jail(jail_name, distro='debian', release='bookworm'): # Override the default 80-container-host0.network file (by using the same name) # This config applies when using the --network-bridge option of systemd-nspawn - # Disable LinkLocalAddressing or else the container won't get IP address via DHCP - # Enable DHCP only for ipv4 else systemd-networkd will complain that LinkLocalAddressing is disabled + # Disable LinkLocalAddressing on IPv4, or else the container won't get IP address via DHCP + # But keep it enabled on IPv6, as SLAAC and DHCPv6 both require a local-link address to function print(Path(default_host0_network_file).read_text().replace("LinkLocalAddressing=yes", - "LinkLocalAddressing=no").replace("DHCP=yes", "DHCP=ipv4"), file=open(override_network_file, 'w')) + "LinkLocalAddressing=ipv6"), file=open(override_network_file, 'w')) # Setup DHCP for macvlan network interfaces # This config applies when using the --network-macvlan option of systemd-nspawn @@ -779,8 +779,8 @@ def create_jail(jail_name, distro='debian', release='bookworm'): Name=mv-* [Network] - DHCP=ipv4 - LinkLocalAddressing=no + DHCP=yes + LinkLocalAddressing=ipv6 [DHCPv4] UseDNS=true From 0e7bedda80082ea327cf4c02baa3b58d2bafb127 Mon Sep 17 00:00:00 2001 From: Jip-Hop <2871973+Jip-Hop@users.noreply.github.com> Date: Sat, 18 Nov 2023 18:20:07 +0100 Subject: [PATCH 2/2] Bump version to 1.0.1 --- jlmkr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jlmkr.py b/jlmkr.py index 83e69f0..11d7f5e 100755 --- a/jlmkr.py +++ b/jlmkr.py @@ -39,7 +39,7 @@ IT COMES WITHOUT WARRANTY AND IS NOT SUPPORTED BY IXSYSTEMS.{NORMAL}""" DESCRIPTION = "Create persistent Linux 'jails' on TrueNAS SCALE, with full access to all files \ via bind mounts, thanks to systemd-nspawn!" -VERSION = '1.0.0' +VERSION = '1.0.1' JAILS_DIR_PATH = 'jails' JAIL_CONFIG_NAME = 'config'