Age | Commit message (Collapse) | Author |
|
If we ask for IPv4v6 is requested but the network only grants IPv4, we
end up receiving the 'Connect Set' response with nw_error set to
'pdp-type-ipv4-only-allowed'. In this case, we should still succeed
the connection attempt and only report the IPv4 info.
We therefore change the logic to skip processing the nw_error unless
the activation state is reported as ACTIVATED or ACTIVATING.
|
|
|
|
|
|
mm-bearer-mbim.c: In function ‘connect_context_step’:
mm-bearer-mbim.c:843:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
843 | ctx->step++;
| ~~~~~~~~~^~
mm-bearer-mbim.c:845:5: note: here
845 | case CONNECT_STEP_PACKET_SERVICE: {
| ^~~~
mm-bearer-mbim.c: In function ‘disconnect_context_step’:
mm-bearer-mbim.c:1269:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
1269 | ctx->step++;
| ~~~~~~~~~^~
mm-bearer-mbim.c:1271:5: note: here
1271 | case DISCONNECT_STEP_DISCONNECT: {
| ^~~~
|
|
mm-bearer-mbim.c: In function ‘connect_context_step’:
mm-bearer-mbim.c:840:5: error: switch missing default case [-Werror=switch-default]
840 | switch (ctx->step) {
| ^~~~~~
mm-bearer-mbim.c: In function ‘disconnect_context_step’:
mm-bearer-mbim.c:1266:5: error: switch missing default case [-Werror=switch-default]
1266 | switch (ctx->step) {
| ^~~~~~
...
|
|
When we try to disconnect a bearer and the bearer is already
disconnected (e.g. after a cancelled connection attempt), avoid reporting
that as an error:
<warn> [1575287560.433398] Error disconnecting bearer '/org/freedesktop/ModemManager1/Bearer/0': 'Couldn't disconnect QMI bearer: this bearer is not connected'. Will assume disconnected anyway.
|
|
|
|
|
|
It may be undesirable to issue a MBIM_CID_CONNECT
(MBIMActivationCommandDeactivate) command to deactivate an IP session
when the session isn't activated. For instance, it's been observed on
Huawei ME936 that it takes more than 30s for the modem to deactivate a
not-yet-activated session. This patch modifies MMBearerMbim to query if
a session is activated before trying to deactivate the session during a
connection attempt.
|
|
Since commit 0c7f3380a ("bearer-mbim: ensure session is disconnected
before trying to connect"), MMBearerMbim always issues a
MBIM_CID_CONNECT (MBIMActivationCommandDeactivate) command before a
MBIM_CID_CONNECT (MBIMActivationCommandActivate) command during a
connection attempt. That is to ensure that an IP session is actually
deactivated before we try to activate a new IP session.
Unfortunately, it's been observed on Huawei ME936 that it takes more
than 30s for the modem to respond to a MBIM_CID_CONNECT
(MBIMActivationCommandDeactivate) command when trying to deactivate a
session that hasn't been activated.
When the signal is weak, it's also possible that a modem takes more than
30s to deactivate an IP session during a disconnection attempt.
This patch increases the timeout for deactivating an IP session from 30s
to 60s in both connection and disconnection attempt.
|
|
|
|
When the Ericsson F5321 with firmware R3C11/R4D04 is told to make
an IPv6-only connection, it reports that it has IPv4 configuration
but then returns no actual addresses. Check both the flags and
actual data before trying to use them.
ModemManager[25850]: <debug> [1506958721.914717] IPv4 configuration available: 'address, gateway, dns, mtu'
ModemManager[25850]: <debug> [1506958721.914731] IP addresses (0)
ModemManager[25850]: <debug> [1506958721.914741] DNS addresses (0)
ModemManager[25850]: <debug> [1506958721.914748] MTU: '0'
ModemManager[25850]: <debug> [1506958721.914758] IPv6 configuration available: 'address, dns, mtu'
ModemManager[25850]: <debug> [1506958721.914767] IP addresses (1)
ModemManager[25850]: <debug> [1506958721.914852] IP [0]: 'fe80::39:f622:7d01/64'
ModemManager[25850]: <debug> [1506958721.914866] DNS addresses (2)
ModemManager[25850]: <debug> [1506958721.914883] DNS [0]: 'fd00:976a::9'
ModemManager[25850]: <debug> [1506958721.914896] MTU: '1500'
ModemManager[25850]: <debug> [1506958721.914947] (wwp0s20u1i6): port now connected
|
|
If a suspend/resume cycle happens or ModemManager is restarted (e.g.
after a crash) the modem may be left with a given session id
connected. With this change we're forcing a session disconnection
before we attempt a session connection.
https://bugs.freedesktop.org/show_bug.cgi?id=102231
|
|
The Sierra Wireless EM7345 reports OperationNotAllowed when trying to
load stats, just cancel stats reloading if so.
ModemManager[8318]: [/dev/cdc-wdm1] Received message (translated)...
>>>>>> Header:
>>>>>> length = 48
>>>>>> type = command-done (0x80000003)
>>>>>> transaction = 24
>>>>>> Fragment header:
>>>>>> total = 1
>>>>>> current = 0
>>>>>> Contents:
>>>>>> status error = 'OperationNotAllowed' (0x0000001c)
>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
>>>>>> cid = 'packet-statistics' (0x00000014)
|
|
Try to make it more clear which are the different branches in the
logic, and jump out as soon as the branch is finished.
|
|
|
|
This patch fixes an issue in disconnect_set_ready(). If
mbim_message_connect_response_parse(), `session_id' and `nw_error' are
not set to a valid value, and thus shouldn't be used.
|
|
|
|
|
|
A default implementation to monitor the ongoing connection is provided in the
generic MMBroadbandModem, based on AT+CGACT? to check whether the PDP context
of the connection (identified by the cached cid) is active or not.
This commit also disables the connection monitoring logic in those plugins that
have custom connection methods.
|
|
modem response
MM never passes MBIM_CONTEXT_IP_TYPE_DEFAULT which would require paying
attention to the ip_type in the reply to figure out what type the modem
activated. Instead, MM always specifies the ip_type it wants to activate,
and some modems (K5160) return a different type in the response. The modem
is required to activate the type MM asks for or return an error, so if
the activation was successful we can safely assume the modem activated
the ip_type we want, and we can ignore the ip_type in the response.
|
|
|
|
v4: modems/providers may not return DNS servers and not all modems
support DHCP, so lack of DNS servers should not indicate a bearer
IP method of "DHCP". IP config daemon/scripts already have to handle
missing DNS anyway.
v6: IPv6 requires SLAAC or DHCPv6 as part of the specification, so for
now we assume modems will support it. Provide all the info the modem
sent, but if there is any missing information use an IP method of
"DHCP" to indicate that info should be obtained via SLAAC/DHCPv6. Only
use an IP method of "STATIC" when all basic properties are given by
the modem.
|
|
|
|
mbim_message_response_get_result() is available in libmbim-glib 1.11.1.
|
|
disconnected
When the MBIM modem unexpectedly loses connection the port state never
gets set as disconnected thus when trying to reestablish a new
connection the bearer cannot find a port in the disconnected state.
Signed-off-by: Greg Suarez <gpsuarez2512@gmail.com>
|
|
It's been observed that modems may take a long time to disconnect from
the network under certain network conditions. This patch increases the
timeout for the MBIM_CID_CONNECT set command in the disconnect sequence
from 10s to 30s.
|
|
Just so that we don't have same header names in src/ and /libmm-glib.
|
|
|
|
The first case, with no error, needs to check that there was no original error.
Currently, if an error occurs and the resulting NwError is parsed correctly, the
case split treats it as a no-error case.
|
|
When trying to disconnect bearer, if the modem responds with
MBIM_STATUS_ERROR_CONTEXT_NOT_ACTIVATED, take it to mean that the bearer has
already been disconnected.
|
|
When only given a link-local address, then SLAAC must be used to
retrieve the real prefix.
|
|
|
|
|
|
This patch modifies MMBearerMbim to update the MTU value in the bearer
IPv4 and IPv6 config property when such information is available in the
MBIM_CID_IP_CONFIGURATION response.
|
|
|
|
|
|
|
|
|
|
|
|
mbim_device_command_finish() returns always a new reference to the response.
|
|
Based on a patch from: Bjørn Mork <bjorn@mork.no>
Some messages provide an additional NwError cause code from
the network in case of failure. This means that we need to
parse the reply even if the status indicates failure, to be
able to return the exact failure cause.
|
|
Some modems do require it, but some others won't (e.g. CDMA based ones), so
just make the operation optional, but only if the modem replies NoDeviceSupport.
https://bugzilla.gnome.org/show_bug.cgi?id=702419
|
|
We want to expose in the Modem interface the list of supported IP families, and
the easiest way to do so is to have the IP family as flags, and provide in the
interface a single enum.
Also, a value of 0 for a MMBearerIpFamily specifies that no flags are set, so
just rename it to 'NONE'.
And add a new 'ANY' value which sets all flags to 1.
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=701333
|
|
This patch adds a 'bearer-default-ip-family' property to MMBearer, which
specifies the default IP family to use for a bearer when no explicit
value is given via the simple connect properties. The default IP family
is set to IPv4 in MMBearer but can be overridden by a MMBearer subclass,
which allows a modem plugin to specify an appropriate default value.
|
|
|
|
|
|
|
|
|