Skip to content

mm-netlink: only change IFF_UP flag

This fixes a bug affecting MBIM multiplexing with cdc_mbim.

With this fix:

root@OpenWrt:/# ip link show |egrep 'wwan0|mbimmux0'
5: wwan0: <BROADCAST,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 1000
root@OpenWrt:/# mmcli -m any --simple-connect=apn=telenor.smart,multiplex=requested
successfully connected the modem
root@OpenWrt:/# ip link show |egrep 'wwan0|mbimmux0'
5: wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
7: mbimmux0.1@wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
root@OpenWrt:/# mmcli -m any --simple-connect=apn=internet.public,multiplex=requested
successfully connected the modem
root@OpenWrt:/# ip link show |egrep 'wwan0|mbimmux0'
5: wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
7: mbimmux0.1@wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
8: mbimmux0.2@wwan0: <BROADCAST,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 1000

Without this fix:

root@OpenWrt:/# ip link show |egrep 'wwan0|mbimmux0'
5: wwan0: <BROADCAST,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 1000
root@OpenWrt:/# mmcli -m any --simple-connect=apn=telenor.smart,multiplex=requested
successfully connected the modem
root@OpenWrt:/# ip link show |egrep 'wwan0|mbimmux0'
5: wwan0: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
7: mbimmux0.1@wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
root@OpenWrt:/# mmcli -m any --simple-connect=apn=internet.public,multiplex=requested
successfully connected the modem
root@OpenWrt:/# ip link show |egrep 'wwan0|mbimmux0'
5: wwan0: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
7: mbimmux0.1@wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
8: mbimmux0.2@wwan0: <BROADCAST> mtu 1500 qdisc noop state DOWN qlen 1000

The missing NOARP makes the multiplexed sub-interface non-functional.

I still have no idea why the first sub-interface is brought up while the second isn't...

Also adding the netlink attribute length fix discussed in libmbim, although that has no effect here yet.

Merge request reports