From 55944e5e40b1be2afc4855d8d2baf4b73d1876b5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:49:52 +0200 Subject: Adding upstream version 255.4. Signed-off-by: Daniel Baumann --- network/80-6rd-tunnel.network | 22 ++++++++++++++++ network/80-auto-link-local.network.example | 20 +++++++++++++++ network/80-container-host0.network | 30 ++++++++++++++++++++++ network/80-container-vb.network | 26 +++++++++++++++++++ network/80-container-ve.network | 31 +++++++++++++++++++++++ network/80-container-vz.network | 30 ++++++++++++++++++++++ network/80-vm-vt.network | 30 ++++++++++++++++++++++ network/80-wifi-adhoc.network | 21 ++++++++++++++++ network/80-wifi-ap.network.example | 21 ++++++++++++++++ network/80-wifi-station.network.example | 17 +++++++++++++ network/89-ethernet.network.example | 18 ++++++++++++++ network/99-default.link | 20 +++++++++++++++ network/meson.build | 40 ++++++++++++++++++++++++++++++ 13 files changed, 326 insertions(+) create mode 100644 network/80-6rd-tunnel.network create mode 100644 network/80-auto-link-local.network.example create mode 100644 network/80-container-host0.network create mode 100644 network/80-container-vb.network create mode 100644 network/80-container-ve.network create mode 100644 network/80-container-vz.network create mode 100644 network/80-vm-vt.network create mode 100644 network/80-wifi-adhoc.network create mode 100644 network/80-wifi-ap.network.example create mode 100644 network/80-wifi-station.network.example create mode 100644 network/89-ethernet.network.example create mode 100644 network/99-default.link create mode 100644 network/meson.build (limited to 'network') diff --git a/network/80-6rd-tunnel.network b/network/80-6rd-tunnel.network new file mode 100644 index 0000000..5374ec5 --- /dev/null +++ b/network/80-6rd-tunnel.network @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT-0 +# +# This config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To make local modifications, one of the following methods may be used: +# 1. add a drop-in file that extends this file by creating the +# /etc/systemd/network/80-6rd-tunnel.network.d/ directory and creating a +# new .conf file there. +# 2. copy this file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +# This network file matches 6rd-* SIT devices which is automatically created by +# systemd-networkd when DHCPv4 6RD option is received. + +[Match] +Kind=sit +Name=6rd-* + +[Network] +DHCPPrefixDelegation=yes diff --git a/network/80-auto-link-local.network.example b/network/80-auto-link-local.network.example new file mode 100644 index 0000000..286b532 --- /dev/null +++ b/network/80-auto-link-local.network.example @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: MIT-0 +# +# This example config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To use the file, one of the following methods may be used: +# 1. add a symlink from /etc/systemd/network to the current location of this file, +# 2. copy the file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +# Enable IPv4LL + IPv6LL (but no DHCP/IPv6RA) for local links +[Match] +Type=ether +Property=ID_NET_AUTO_LINK_LOCAL_ONLY=1 + +[Network] +LinkLocalAddressing=yes +IPv6AcceptRA=no +MulticastDNS=yes diff --git a/network/80-container-host0.network b/network/80-container-host0.network new file mode 100644 index 0000000..b79e701 --- /dev/null +++ b/network/80-container-host0.network @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: MIT-0 +# +# This config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To make local modifications, one of the following methods may be used: +# 1. add a drop-in file that extends this file by creating the +# /etc/systemd/network/80-container-host0.network.d/ directory and creating a +# new .conf file there. +# 2. copy this file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +# This network file matches the container-side of the virtual Ethernet link +# created by systemd-nspawn's --network-veth switch. See systemd-nspawn(1) for +# details. + +[Match] +Kind=veth +Name=host0 +Virtualization=container + +[Network] +DHCP=yes +LinkLocalAddressing=yes +LLDP=yes +EmitLLDP=customer-bridge + +[DHCP] +UseTimezone=yes diff --git a/network/80-container-vb.network b/network/80-container-vb.network new file mode 100644 index 0000000..806f834 --- /dev/null +++ b/network/80-container-vb.network @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: MIT-0 +# +# This config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To make local modifications, one of the following methods may be used: +# 1. add a drop-in file that extends this file by creating the +# /etc/systemd/network/80-container-vb.network.d/ directory and creating a +# new .conf file there. +# 2. copy this file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +# This network file matches the host-side of the virtual Ethernet link +# created by systemd-nspawn's --network-veth switch with --network-bridge or +# --network-zone switch. See systemd-nspawn(1) for details. + +[Match] +Kind=veth +Name=vb-* + +[Network] +KeepMaster=yes +LinkLocalAddressing=no +LLDP=yes +EmitLLDP=nearest-bridge diff --git a/network/80-container-ve.network b/network/80-container-ve.network new file mode 100644 index 0000000..076213a --- /dev/null +++ b/network/80-container-ve.network @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: MIT-0 +# +# This config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To make local modifications, one of the following methods may be used: +# 1. add a drop-in file that extends this file by creating the +# /etc/systemd/network/80-container-ve.network.d/ directory and creating a +# new .conf file there. +# 2. copy this file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +# This network file matches the host-side of the virtual Ethernet link +# created by systemd-nspawn's --network-veth switch. See systemd-nspawn(1) for +# details. + +[Match] +Kind=veth +Name=ve-* + +[Network] +# Default to using a /28 prefix, giving up to 13 addresses per container. +Address=0.0.0.0/28 +LinkLocalAddressing=yes +DHCPServer=yes +IPMasquerade=both +LLDP=yes +EmitLLDP=customer-bridge +IPv6AcceptRA=no +IPv6SendRA=yes diff --git a/network/80-container-vz.network b/network/80-container-vz.network new file mode 100644 index 0000000..7d570b2 --- /dev/null +++ b/network/80-container-vz.network @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: MIT-0 +# +# This config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To make local modifications, one of the following methods may be used: +# 1. add a drop-in file that extends this file by creating the +# /etc/systemd/network/80-container-vz.network.d/ directory and creating a +# new .conf file there. +# 2. copy this file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +# This network file matches the bridge interface created by systemd-nspawn's +# --network-zone= switch. See systemd-nspawn(1) for details. + +[Match] +Kind=bridge +Name=vz-* + +[Network] +# Default to using a /24 prefix, giving up to 253 addresses per virtual network. +Address=0.0.0.0/24 +LinkLocalAddressing=yes +DHCPServer=yes +IPMasquerade=both +LLDP=yes +EmitLLDP=customer-bridge +IPv6AcceptRA=no +IPv6SendRA=yes diff --git a/network/80-vm-vt.network b/network/80-vm-vt.network new file mode 100644 index 0000000..bb7942a --- /dev/null +++ b/network/80-vm-vt.network @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: MIT-0 +# +# This config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To make local modifications, one of the following methods may be used: +# 1. add a drop-in file that extends this file by creating the +# /etc/systemd/network/80-vm-vt.network.d/ directory and creating a +# new .conf file there. +# 2. copy this file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +# This network file matches vt-* TUN/TAP devices and applies a similar +# configuration as ve-* to provide NAT/DHCP to VMs. + +[Match] +Kind=tun +Name=vt-* + +[Network] +# Default to using a /28 prefix, giving up to 13 addresses per VM. +Address=0.0.0.0/28 +LinkLocalAddressing=yes +DHCPServer=yes +IPMasquerade=both +LLDP=yes +EmitLLDP=customer-bridge +IPv6AcceptRA=no +IPv6SendRA=yes diff --git a/network/80-wifi-adhoc.network b/network/80-wifi-adhoc.network new file mode 100644 index 0000000..fd3faca --- /dev/null +++ b/network/80-wifi-adhoc.network @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: MIT-0 +# +# This config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To make local modifications, one of the following methods may be used: +# 1. add a drop-in file that extends this file by creating the +# /etc/systemd/network/80-wifi-adhoc.network.d/ directory and creating a +# new .conf file there. +# 2. copy this file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +[Match] +Type=wlan +WLANInterfaceType=ad-hoc + +[Network] +LinkLocalAddressing=yes +IPv6AcceptRA=no +MulticastDNS=yes diff --git a/network/80-wifi-ap.network.example b/network/80-wifi-ap.network.example new file mode 100644 index 0000000..09de919 --- /dev/null +++ b/network/80-wifi-ap.network.example @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: MIT-0 +# +# This example config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To use the file, one of the following methods may be used: +# 1. add a symlink from /etc/systemd/network to the current location of this file, +# 2. copy the file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +[Match] +Type=wlan +WLANInterfaceType=ap + +[Network] +Address=0.0.0.0/24 +DHCPServer=yes +IPMasquerade=both +IPv6AcceptRA=no +IPv6SendRA=yes diff --git a/network/80-wifi-station.network.example b/network/80-wifi-station.network.example new file mode 100644 index 0000000..160b4eb --- /dev/null +++ b/network/80-wifi-station.network.example @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: MIT-0 +# +# This example config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To use the file, one of the following methods may be used: +# 1. add a symlink from /etc/systemd/network to the current location of this file, +# 2. copy the file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +[Match] +Type=wlan +WLANInterfaceType=station + +[Network] +DHCP=yes diff --git a/network/89-ethernet.network.example b/network/89-ethernet.network.example new file mode 100644 index 0000000..58b323d --- /dev/null +++ b/network/89-ethernet.network.example @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: MIT-0 +# +# This example config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To use the file, one of the following methods may be used: +# 1. add a symlink from /etc/systemd/network to the current location of this file, +# 2. copy the file into /etc/systemd/network or one of the other paths checked +# by systemd-networkd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +# Enable DHCPv4 and DHCPv6 on all physical ethernet links +[Match] +Kind=!* +Type=ether + +[Network] +DHCP=yes diff --git a/network/99-default.link b/network/99-default.link new file mode 100644 index 0000000..429ac31 --- /dev/null +++ b/network/99-default.link @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: MIT-0 +# +# This config file is installed as part of systemd. +# It may be freely copied and edited (following the MIT No Attribution license). +# +# To make local modifications, one of the following methods may be used: +# 1. add a drop-in file that extends this file by creating the +# /etc/systemd/network/99-default.link.d/ directory and creating a +# new .conf file there. +# 2. copy this file into /etc/systemd/network or one of the other paths checked +# by systemd-udevd and edit it there. +# This file should not be edited in place, because it'll be overwritten on upgrades. + +[Match] +OriginalName=* + +[Link] +NamePolicy=keep kernel database onboard slot path +AlternativeNamesPolicy=database onboard slot path +MACAddressPolicy=persistent diff --git a/network/meson.build b/network/meson.build new file mode 100644 index 0000000..2a472f4 --- /dev/null +++ b/network/meson.build @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +if conf.get('ENABLE_NETWORKD') == 1 + install_data( + '80-6rd-tunnel.network', + '80-container-host0.network', + '80-container-vb.network', + '80-container-ve.network', + '80-container-vz.network', + '80-vm-vt.network', + '80-wifi-adhoc.network', + install_dir : networkdir) + + example_network_files = files( + '80-auto-link-local.network.example', + '89-ethernet.network.example', + '80-wifi-ap.network.example', + '80-wifi-station.network.example', + ) + + install_data( + example_network_files, + install_dir : networkdir) + + if get_option('default-network') + foreach f : example_network_files + install_data( + f, + rename : fs.replace_suffix(fs.name(f), ''), + install_dir : networkdir) + endforeach + endif +endif + +install_data('99-default.link', + install_dir : networkdir) + +if install_sysconfdir + install_emptydir(sysconfdir / 'systemd/network') +endif -- cgit v1.2.3