Files
openwrt/package
Carlo Szelinsky d0df2ab604 comgt: ncm: strip CR when detecting the modem on teardown
proto_ncm_setup() parses the AT+CGMI reply with RS='\r?\n',
proto_ncm_teardown() does not. The manufacturer ends up as "quectel\r",
json_select fails with "Unsupported modem" and teardown returns before
sending the disconnect command, leaving the data call up on the modem.

A blank CRLF line hits the same path: \r is not whitespace for the
default FS, so a record holding only \r still has NF == 1 and is taken
as the manufacturer.

This affects every vendor whose reply is a single token. "zte" comes out
the same either way, its reply is "ZTE INCORPORATED" so the CR sits past
$1.

Note that teardown now reaches the disconnect command on modems where it
silently never did, so those commands actually get sent on ifdown.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/24689
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-17 18:19:16 +02:00
..
2026-09-13 20:46:35 +01:00
…