File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ build_network_config() {
121121
122122 printf " MulticastDNS=%s\nLLMNR=%s\n" " ${mdns} " " ${llmnr} "
123123 printf " LinkLocalAddressing=yes\nIPv6AcceptRA=yes\nConfigureWithoutCarrier=yes\n"
124- printf " IPForward=yes\n"
124+ # shellcheck disable=SC2059
125+ printf " ${RXNM_NETWORKD_KEY_IPFORWARD} \n"
125126
126127 if [ -n " $ipv6_privacy " ]; then
127128 printf " IPv6PrivacyExtensions=%s\n" " ${ipv6_privacy} "
@@ -268,13 +269,15 @@ build_gateway_config() {
268269
269270 if [ " $share " = " true" ]; then
270271 # v255.8 Compliant Forwarding (NAT is handled externally by rxnm-system)
271- printf " IPForward=yes\nIPv6SendRA=yes\n"
272+ # shellcheck disable=SC2059
273+ printf " ${RXNM_NETWORKD_KEY_IPFORWARD} \nIPv6SendRA=yes\n"
272274 if [ " $ipv6_pd " != " no" ]; then printf " DHCPPrefixDelegation=yes\n" ; fi
273275
274276 printf " Address=fd00:cafe:feed::a7ca:de/64\n"
275277
276278 printf " DHCPServer=yes\n\n[DHCPServer]\nPoolOffset=100\nEmitDNS=yes\nEmitRouter=yes\n"
277- printf " [IPv6SendRA]\nManaged=no\nOtherConfig=no\n"
279+ # shellcheck disable=SC2059
280+ printf " [IPv6SendRA]\nManaged=no\n${RXNM_NETWORKD_KEY_RA_OTHER} =no\n"
278281 else
279282 printf " Address=fd00:cafe:feed::a7ca:de/64\n"
280283 printf " IPv6AcceptRA=no\nDHCPServer=yes\n\n[DHCPServer]\nEmitDNS=yes\nEmitRouter=no\n"
Original file line number Diff line number Diff line change 9292
9393: " ${IWD_DBUS_MAX_KB:= 512} "
9494
95+ # --- systemd-networkd Version-Aware Config Keys ---
96+ # IPForward= was deprecated in systemd 256, replaced by IPv4Forwarding=/IPv6Forwarding=.
97+ # Detect the running networkd version and emit the correct key for dynamic configs.
98+ # Shipped .network templates use IPForward= (works on all versions, deprecated warning on 256+).
99+ if [ -z " ${RXNM_NETWORKD_KEY_IPFORWARD:- } " ]; then
100+ _sd_ver=" "
101+ if command -v networkctl > /dev/null 2>&1 ; then
102+ _sd_ver=$( networkctl --version 2> /dev/null | awk ' /^systemd / {print $2; exit}' )
103+ fi
104+ _sd_ver=" ${_sd_ver:- 255} "
105+ if [ " $_sd_ver " -ge 256 ] 2> /dev/null; then
106+ RXNM_NETWORKD_KEY_IPFORWARD=" IPv4Forwarding=yes\nIPv6Forwarding=yes"
107+ else
108+ RXNM_NETWORKD_KEY_IPFORWARD=" IPForward=yes"
109+ fi
110+ fi
111+ # OtherInformation= is correct for all systemd versions (OtherConfig was never valid)
112+ : " ${RXNM_NETWORKD_KEY_RA_OTHER:= OtherInformation} "
113+
95114# --- FD Reservations ---
96115RXNM_FD_GLOBAL_LOCK=8
97116RXNM_FD_IFACE_LOCK=9
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ Description=Rocknix Wi-Fi P2P Group Owner
88# Standard P2P subnet (Commonly used in Android/Linux P2P)
99Address =192.168.49.1/24
1010DHCPServer =yes
11- # IP Forwarding (v255.8 compliant). NAT is handled externally by rxnm-system.
11+ # IP Forwarding. NAT is handled externally by rxnm-system.
12+ # Uses IPForward= for systemd 255 (ROCKNIX) compatibility.
1213IPForward =yes
1314# Ensure local name resolution works for the group
1415MulticastDNS =no
Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ Name=bnep*
66Description =Rocknix Bluetooth PAN Host
77Address =192.168.44.1/24
88DHCPServer =yes
9- # IP Forwarding (v255.8 compliant). NAT is handled externally by rxnm-system.
9+ # IP Forwarding. NAT is handled externally by rxnm-system.
10+ # Uses IPForward= for systemd 255 (ROCKNIX) compatibility.
11+ # systemd 256+ deprecates this in favour of IPv4Forwarding=/IPv6Forwarding=
1012IPForward =yes
1113# Disabled to avoid conflict with Avahi
1214MulticastDNS =no
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ LinkLocalAddressing=yes
1313# ULA for local IPv6
1414Address =fd00:a7c:ade:50::1/64
1515IPv6SendRA =yes
16- # IP Forwarding (v255.8 compliant). NAT is handled externally by rxnm-system.
16+ # IP Forwarding. NAT is handled externally by rxnm-system.
17+ # Uses IPForward= for systemd 255 (ROCKNIX) compatibility.
1718IPForward =yes
1819# Multicast handled by Avahi
1920MulticastDNS =no
@@ -27,4 +28,4 @@ EmitRouter=yes
2728
2829[IPv6SendRA]
2930Managed =no
30- OtherConfig =no
31+ OtherInformation =no
You can’t perform that action at this time.
0 commit comments