modemmanager: add sourcefilter option support

This make source based IPv6 routing option available for
modemmanager when using modem SLAAC.

Signed-off-by: Ryan Press <ryan@presslab.us>
This commit is contained in:
Ryan Press
2025-05-20 08:04:02 -07:00
committed by Florian Eckert
parent b82574b31c
commit 7efed7ff9f
2 changed files with 6 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=modemmanager
PKG_VERSION:=1.24.0
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git

View File

@@ -245,7 +245,11 @@ modemmanager_connected_method_static_ipv6() {
[ -n "${gateway}" ] && {
echo "adding default IPv6 route via ${gateway}"
proto_add_ipv6_route "${gateway}" "128"
proto_add_ipv6_route "::0" "0" "${gateway}" "" "" "${address}/${prefix}"
[ "$sourcefilter" = "0" ] && {
proto_add_ipv6_route "::0" "0" "${gateway}"
} || {
proto_add_ipv6_route "::0" "0" "${gateway}" "" "" "${address}/${prefix}"
}
}
[ -n "${dns1}" ] && {
echo "adding primary DNS at ${dns1}"