Age | Commit message (Collapse) | Author | Files | Lines |
|
If e.g. qmi-proxy is started by ModemManager and we send a Ctrl+C to
it, the signal would be propagated to the qmi-proxy process and we
would kill it right away, while leaving ModemManager still around
wondering why the socket to the proxy got a HUP.
Avoid this, by making sure the qmi-proxy gets its own process group.
(cherry picked from commit 88ca109f9ca29fcff9651e2ac8930e6c3600ac64)
|
|
(cherry picked from commit fed84d99cd5e155be41dc55e599a3f5f5881cc7a)
|
|
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ffff79c9105 in transaction_cancelled (cancellable=0x7fffe4009420, ctx=0x669a30) at qmi-device.c:268
268 tr->cancellable_id = 0;
The g_cancellable_connect() method will also call the given callback
when the input cancellable is already cancelled. This means that the
cancellation callback should also handle the case where the transaction
hasn't been stored in the tracking table yet.
Thanks to Benoît Donnette <benoit.donnette@21net.com> for the report and
the suggested fix.
https://bugs.freedesktop.org/show_bug.cgi?id=98283
(cherry picked from commit e57f062e666b9a0686e38e3722664b4b2ac9658c)
|
|
(cherry picked from commit f7e2a3c5981e2a743aad4b986355fe1de632e67e)
|
|
Will print the IPv4 and IPv6 settings when connected. This information can be
used to statically set the network interface configuration, instead of relying
on a DHCP client.
(cherry picked from commit 543cf5c93984139865f919e7348bff2b54c16f39)
|
|
The current definition of QMI_*_BAND_CAPABILITY_BC_15 gets converted to a
negative value (0xffffffff80000000) which causes false positives for BC15
to be returned from dms_add_qmi_bands() and nas_add_qmi_bands() in
ModemManager/src/mm-modem-helpers-qmi.c when a matching QMI band (e.g.
WCDMA900) is present in qmi_bands like in this example
https://lists.freedesktop.org/archives/libqmi-devel/2016-March/001572.html .
Replace 1 << 31 with ((guint64) 1) << 31 for QMI_*_BAND_CAPABILITY_BC_15
to avoid incorrect mmcli "Bands | supported: 'cdma-bc15-aws, ...'" output.
Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
(cherry picked from commit 0f7849ce05f3e26283652c20e5392161c1cfeeaf)
|
|
|
|
|
|
|
|
Commit 7ca279e9a42 introduced a couple of method renames that shouldn't have
been done, because they were done in the 1.12.x stable series and soname wasn't
bumped. We try to recover from that issue, by providing a set of stub methods
that keep the old API methods that were available in 1.12.6, while also keeping
the new API methods introduced in 1.12.8.
Reported by: Michael Biebl <biebl@debian.org>
|
|
Based on an equivalent patch from Philip Withnall <philip@tecnocode.co.uk>
for libmbim; see:
https://bugs.freedesktop.org/show_bug.cgi?id=94639
(cherry picked from commit 2b9ed332357d0ddf8a4fc4ffd7a5c0ec8c3126eb)
|
|
The @enum_name@_build_string_from_mask template in
qmi-flags64-types-template.c uses a local gulong number variable.
On platforms where sizeof(gulong) < sizeof(Qmi*BandCapability) this
may cause bands to be missing from qmicli output or incorrect bands
to be contained in the output. Replace gulong number with guint64
number to fix this.
Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
(cherry picked from commit 3df66e941cfd1c14fdcf7dac67c17c6eb0de6ca6)
|
|
(cherry picked from commit 3465107153e373adfd4e50ac90259ed25d556bed)
|
|
|
|
|
|
Found by John.
https://bugs.freedesktop.org/show_bug.cgi?id=94083
(cherry picked from commit fea234dd1ea6f8d558b32d93e127a5bd73e5ae04)
|
|
BCD PLMNs with 2 digit MNCs will have an 'F' digit between
the MCC and the MNC. This maps to \0, which would cause
a truncated result string with only the MCC.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
(cherry picked from commit 6f988368fdac492fa4289ae1c633c84d7abc39c6)
|
|
(cherry picked from commit 43b95747226e34b2b5e66cb60061ed39035d421d)
|
|
(cherry picked from commit 2f70d96a022e9c5ce960ecc8e915f814f1303ee6)
|
|
Reported-by: Tom Schuring
(cherry picked from commit 97aaa6855d071f64ec2e28df1b9f816da02a3e07)
|
|
|
|
|
|
tlv->length is little-endian, so access to it must be protected
with GUINT16_FROM_LE/GUINT16_TO_LE. Fixes testcase failures
on PPC32.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778346
(cherry picked from commit 33df1d40d02ea453e8b0b31343fc64f185eef479)
|
|
|
|
|
|
Dell-branded Sierra modems, like the Dell DW5570 (Sierra Wireless MC8805) need
this specific command before they can be put in 'online' mode:
$ sudo qmicli -d /dev/cdc-wdm1 --dms-get-operating-mode
[/dev/cdc-wdm1] Operating mode retrieved:
Mode: 'low-power'
HW restricted: 'no'
$ sudo qmicli -d /dev/cdc-wdm1 --dms-set-fcc-authentication
[/dev/cdc-wdm1] Successfully set FCC authentication
$ sudo qmicli -d /dev/cdc-wdm1 --dms-get-operating-mode
[/dev/cdc-wdm1] Operating mode retrieved:
Mode: 'online'
HW restricted: 'no'
https://bugzilla.kernel.org/show_bug.cgi?id=92101
|
|
These values may be given along with a QMI error (e.g. out-of-call), so don't
assume that a success operation is a prerequisite to read them.
[04 Feb 2015, 20:55:07] [Debug] [/dev/cdc-wdm1] Received message...
>>>>>> RAW:
>>>>>> length = 42
>>>>>> data = 01:29:00:80:01:08:02:0D:00:24:00:1D:00:02:04:00:01:00:0F:00:1C:08:00:2B:17:00:00:00:00:00:00:1B:08:00:87:28:00:00:00:00:00:00
[04 Feb 2015, 20:55:07] [Debug] [/dev/cdc-wdm1] Received message (translated)...
>>>>>> QMUX:
>>>>>> length = 41
>>>>>> flags = 0x80
>>>>>> service = "wds"
>>>>>> client = 8
>>>>>> QMI:
>>>>>> flags = "response"
>>>>>> transaction = 13
>>>>>> tlv_length = 29
>>>>>> message = "Get Packet Statistics" (0x0024)
>>>>>> TLV:
>>>>>> type = "Result" (0x02)
>>>>>> length = 4
>>>>>> value = 01:00:0F:00
>>>>>> translated = FAILURE: OutOfCall
>>>>>> TLV:
>>>>>> type = "Last Call Rx Bytes Ok" (0x1c)
>>>>>> length = 8
>>>>>> value = 2B:17:00:00:00:00:00:00
>>>>>> translated = 5931
>>>>>> TLV:
>>>>>> type = "Last Call Tx Bytes Ok" (0x1b)
>>>>>> length = 8
>>>>>> value = 87:28:00:00:00:00:00:00
>>>>>> translated = 10375
|
|
|
|
|
|
get_version_introduced()
|
|
|
|
CC test_message-test-message.o
cc1: warnings being treated as errors
test-message.c: In function 'test_message_tlv_rw_64':
test-message.c:702: error: integer constant is too large for 'long' type
test-message.c:707: error: integer constant is too large for 'long' type
test-message.c:712: error: integer constant is too large for 'long' type
test-message.c:717: error: integer constant is too large for 'long' type
test-message.c:745: error: integer constant is too large for 'long' type
test-message.c:750: error: integer constant is too large for 'long' type
test-message.c:755: error: integer constant is too large for 'long' type
test-message.c:760: error: integer constant is too large for 'long' type
test-message.c: In function 'test_message_tlv_rw_sized':
test-message.c:790: error: integer constant is too large for 'long' type
test-message.c: In function 'test_message_tlv_rw_mixed':
test-message.c:1037: error: integer constant is too large for 'long' type
test-message.c:1042: error: integer constant is too large for 'long' type
test-message.c:1106: error: integer constant is too large for 'long' type
test-message.c:1111: error: integer constant is too large for 'long' type
test-message.c: In function 'test_message_tlv_write_overflow':
test-message.c:1169: error: integer constant is too large for 'long' type
test-message.c:1174: error: integer constant is too large for 'long' type
make[4]: *** [test_message-test-message.o] Error 1
|
|
|
|
|
|
|
|
|
|
Even if QMI_USERNAME is defined to a non-root user, root should always be able
to access the proxy. E.g. ModemManager (run as root) must be able to launch and
access the proxy even if QMI_USERNAME was set to a non-root user.
|
|
|
|
Commit b9c3701e337198 introduced an API break, where we would change a pointer
to a heap allocated string and instead use a fixed size char array. This commit
will instead recover the pointer to the string when used in a public struct, so
that API isn't broken w.r.t. previous stable libqmi versions.
The string is now properly allocated before reading and deallocated as part of
the struct deallocation.
|
|
|
|
If --enable-qmi-username isn't explicitly used, we should just check
for the root user UID, without using getpwnam(). See e.g. these SELinux warnings:
SELinux is preventing /usr/bin/bash from read access on the file /etc/passwd.
***** Plugin catchall (100. confidence) suggests **************************
If you believe that bash should be allowed read access on the passwd file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do allow this access for now by executing:
# grep qmi-proxy /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp
|
|
|
|
See downstream bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772328
|
|
|
|
Include the udev rules template in the distribution tarball even if the
`--enable-qmi-username' option wasn't specified.
|
|
Adding a udev rule to change ownership of all QMI devices to the
configured user specified at compile time using --enable-qmi-username
flag.
|
|
If the fixed sized string contains no characters or is shorter than the explicit
size, NUL bytes will be included. If we try to append exactly the size of the
string, we'll end up with embedded NULs in our string to print, so the actual
output will be cut, even if the string is longer after the embedded NUL bytes.
E.g.:
>>>>>> TLV:
>>>>>> type = "GERAN Info" (0x10)
>>>>>> length = 61
>>>>>> value = 00:00:00:00:00:00:00:00:00:00:00:00:FF:FF:FF:FF:28:00:03:7D:6F:00:00:32:F4:51:B3:00:4D:00:11:2A:00:8A:3C:00:00:32:F4:51:B3:00:63:00:30:14:00:89:3C:00:00:32:F4:51:B3:00:59:00:11:0D:00
>>>>>> translated = [ cell_id = '0' plmn = '
With this fix, we avoid this by explicitly finishing ourselves the fixed sized
string with a NUL byte, and then adding the C string as the non-fixed sized
ones, i.e. until the first NUL byte is found.
E.g.:
>>>>>> TLV:
>>>>>> type = "GERAN Info" (0x10)
>>>>>> length = 61
>>>>>> value = 00:00:00:00:00:00:00:00:00:00:00:00:FF:FF:FF:FF:28:00:03:7D:6F:00:00:32:F4:51:B3:00:4D:00:11:2A:00:8A:3C:00:00:32:F4:51:B3:00:63:00:30:14:00:89:3C:00:00:32:F4:51:B3:00:59:00:11:0D:00
>>>>>> translated = [ cell_id = '0' plmn = '' lac = '0' geran_absolute_rf_channel_number = '0' base_station_identity_code = '0' timing_advance = '4294967295' rx_level = '40' cell = '{ [0] = '[ cell_id = '28541' plmn = '2\xf4Q' lac = '179' geran_absolute_rf_channel_number = '77' base_station_identity_code = '17' rx_level = '42' ] ' [1] = '[ cell_id = '15498' plmn = '2\xf4Q' lac = '179' geran_absolute_rf_channel_number = '99' base_station_identity_code = '48' rx_level = '20' ] ' [2] = '[ cell_id = '15497' plmn = '2\xf4Q' lac = '179' geran_absolute_rf_channel_number = '89' base_station_identity_code = '17' rx_level = '13' ] '}' ]
|
|
This change triggers an API break.
When building structs to be included in the public header, we were just relying
on using the 'public_format' of each variable. This is an error, as the variable
may be more complex than just public/private. E.g. could be another struct, or
an array, or a fixed sized string, as in the example.
In particular, this bug currently affects one public type, where one of its
elements changes from being just a pointer to a string to a fixed sized array of
4 bytes.
The following type is changed from:
typedef struct _QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement {
guint32 cell_id;
gchar * plmn;
guint16 lac;
guint16 geran_absolute_rf_channel_number;
guint8 base_station_identity_code;
guint16 rx_level;
} QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement;
To:
typedef struct _QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement {
guint32 cell_id;
gchar plmn[4];
guint16 lac;
guint16 geran_absolute_rf_channel_number;
guint8 base_station_identity_code;
guint16 rx_level;
} QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement;
Thanks to Joseba Sanjuan <joseba.sanjuan@gmail.com> for finding the bug.
|
|
Which currently fails:
{*LOG(error):{Qmi-FATAL-CRITICAL: qmi_message_tlv_read_fixed_size_string: assertion 'out != NULL' failed}:LOG*}
(/home/aleksander/Development/foss/libqmi/src/libqmi-glib/test/.libs/test-generated:12179): Qmi-CRITICAL **: qmi_message_tlv_read_fixed_size_string: assertion 'out != NULL' failed
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff717eae0 in g_logv () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0x00007ffff717eae0 in g_logv () from /usr/lib/libglib-2.0.so.0
#1 0x00007ffff717ed1f in g_log () from /usr/lib/libglib-2.0.so.0
#2 0x00007ffff7a5381e in qmi_message_tlv_read_fixed_size_string (self=0x7fffe8007d30, tlv_offset=20, offset=0x7fffffffdcc8, string_length=3, out=0x0, error=0x0) at qmi-message.c:1817
#3 0x00007ffff7acce60 in __qmi_message_nas_get_cell_location_info_response_parse (message=0x7fffe8007d30, error=0x7fffffffded8) at qmi-nas.c:26772
#4 0x00007ffff7af46fa in get_cell_location_info_ready (device=0x64e8b0, res=0x65d990, simple=0x65d920) at qmi-nas.c:47982
#5 0x00007ffff76ff6d7 in g_simple_async_result_complete () from /usr/lib/libgio-2.0.so.0
#6 0x00007ffff76ff739 in ?? () from /usr/lib/libgio-2.0.so.0
#7 0x00007ffff717791d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#8 0x00007ffff7177cf8 in ?? () from /usr/lib/libglib-2.0.so.0
#9 0x00007ffff7178022 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#10 0x0000000000403e9b in test_fixture_loop_run (fixture=0x63c800) at test-fixture.c:321
#11 0x0000000000406da4 in test_generated_nas_get_cell_location_info (fixture=0x63c800) at test-generated.c:562
#12 0x00007ffff719d0f3 in ?? () from /usr/lib/libglib-2.0.so.0
#13 0x00007ffff719d2c2 in ?? () from /usr/lib/libglib-2.0.so.0
#14 0x00007ffff719d2c2 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00007ffff719d2c2 in ?? () from /usr/lib/libglib-2.0.so.0
#16 0x00007ffff719d62b in g_test_run_suite () from /usr/lib/libglib-2.0.so.0
#17 0x00007ffff719d661 in g_test_run () from /usr/lib/libglib-2.0.so.0
#18 0x0000000000406ef0 in main (argc=1, argv=0x7fffffffe678) at test-generated.c:584
(gdb) fr 3
#3 0x00007ffff7acce60 in __qmi_message_nas_get_cell_location_info_response_parse (message=0x7fffe8007d30, error=0x7fffffffded8) at qmi-nas.c:26772
warning: Source file is more recent than executable.
26772 if (!qmi_message_tlv_read_fixed_size_string (message, init_offset, &offset, 3, &cell_aux.plmn[0], NULL))
(gdb) p cell_aux
$1 = {cell_id = 28541, plmn = 0x0, lac = 0, geran_absolute_rf_channel_number = 0, base_station_identity_code = 0 '\000', rx_level = 0}
|
|
Equivalent to the fix done in mbim-network, see:
https://bugs.freedesktop.org/show_bug.cgi?id=87093
|