modemmanager: set interface MTU based on bearer settings 12313/head
authorAleksander Morgado <aleksander@aleksander.es>
Mon, 25 May 2020 13:34:41 +0000 (15:34 +0200)
committerAleksander Morgado <aleksander@aleksander.es>
Tue, 26 May 2020 08:28:56 +0000 (10:28 +0200)
Using the same method used by other protocol handlers like uqmi.

Fixes https://github.com/openwrt/packages/issues/11383

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
(cherry picked from commit 41552c1cc225066bd1f35685ccd5dcf83a21b7e5)

net/modemmanager/Makefile
net/modemmanager/files/modemmanager.proto

index f38e3abf8b5ddc66983774243d3b7a99c077dbd3..5092ccd5cb7e31af6957e8c1b6377152035807d5 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=modemmanager
 PKG_VERSION:=1.12.10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager
index 536073dce4d2a3337daa43c12e51d6f4e45c285b..be1bcb3dfc71c00f1104cc6c1c6788f25a29389c 100755 (executable)
@@ -204,10 +204,9 @@ modemmanager_connected_method_static_ipv4() {
                proto_notify_error "${interface}" PREFIX_MISSING
                return
        }
-
        mask=$(cdr2mask "${prefix}")
 
-       # TODO: mtu reporting in proto handler
+       [ -n "${mtu}" ] && /sbin/ip link set dev "${wwan}" mtu "${mtu}"
 
        proto_init_update "${wwan}" 1
        proto_set_keep 1
@@ -270,7 +269,7 @@ modemmanager_connected_method_static_ipv6() {
                return
        }
 
-       # TODO: mtu reporting in proto handler
+       [ -n "${mtu}" ] && /sbin/ip link set dev "${wwan}" mtu "${mtu}"
 
        proto_init_update "${wwan}" 1
        proto_set_keep 1