Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/configs/releng/airootfs/etc/systemd/network
diff options
context:
space:
mode:
Diffstat (limited to 'configs/releng/airootfs/etc/systemd/network')
-rw-r--r--configs/releng/airootfs/etc/systemd/network/20-ethernet.network12
-rw-r--r--configs/releng/airootfs/etc/systemd/network/20-wireless.network10
-rw-r--r--configs/releng/airootfs/etc/systemd/network/20-wlan.network17
-rw-r--r--configs/releng/airootfs/etc/systemd/network/20-wwan.network17
4 files changed, 44 insertions, 12 deletions
diff --git a/configs/releng/airootfs/etc/systemd/network/20-ethernet.network b/configs/releng/airootfs/etc/systemd/network/20-ethernet.network
index 37878b0..f2a7d60 100644
--- a/configs/releng/airootfs/etc/systemd/network/20-ethernet.network
+++ b/configs/releng/airootfs/etc/systemd/network/20-ethernet.network
@@ -6,5 +6,13 @@ Name=eth*
DHCP=yes
IPv6PrivacyExtensions=yes
-[DHCP]
-RouteMetric=512
+# systemd-networkd does not set per-interface-type default route metrics
+# https://github.com/systemd/systemd/issues/17698
+# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband.
+# Use values from NetworkManager. From nm_device_get_route_metric_default in
+# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c
+[DHCPv4]
+RouteMetric=100
+
+[IPv6AcceptRA]
+RouteMetric=100
diff --git a/configs/releng/airootfs/etc/systemd/network/20-wireless.network b/configs/releng/airootfs/etc/systemd/network/20-wireless.network
deleted file mode 100644
index e1d624c..0000000
--- a/configs/releng/airootfs/etc/systemd/network/20-wireless.network
+++ /dev/null
@@ -1,10 +0,0 @@
-[Match]
-Name=wlp*
-Name=wlan*
-
-[Network]
-DHCP=yes
-IPv6PrivacyExtensions=yes
-
-[DHCP]
-RouteMetric=1024
diff --git a/configs/releng/airootfs/etc/systemd/network/20-wlan.network b/configs/releng/airootfs/etc/systemd/network/20-wlan.network
new file mode 100644
index 0000000..601d5b8
--- /dev/null
+++ b/configs/releng/airootfs/etc/systemd/network/20-wlan.network
@@ -0,0 +1,17 @@
+[Match]
+Name=wl*
+
+[Network]
+DHCP=yes
+IPv6PrivacyExtensions=yes
+
+# systemd-networkd does not set per-interface-type default route metrics
+# https://github.com/systemd/systemd/issues/17698
+# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband.
+# Use values from NetworkManager. From nm_device_get_route_metric_default in
+# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c
+[DHCPv4]
+RouteMetric=600
+
+[IPv6AcceptRA]
+RouteMetric=600
diff --git a/configs/releng/airootfs/etc/systemd/network/20-wwan.network b/configs/releng/airootfs/etc/systemd/network/20-wwan.network
new file mode 100644
index 0000000..9104c24
--- /dev/null
+++ b/configs/releng/airootfs/etc/systemd/network/20-wwan.network
@@ -0,0 +1,17 @@
+[Match]
+Name=ww*
+
+[Network]
+DHCP=yes
+IPv6PrivacyExtensions=yes
+
+# systemd-networkd does not set per-interface-type default route metrics
+# https://github.com/systemd/systemd/issues/17698
+# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband.
+# Use values from NetworkManager. From nm_device_get_route_metric_default in
+# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c
+[DHCPv4]
+RouteMetric=700
+
+[IPv6AcceptRA]
+RouteMetric=700