mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 13:08:30 +04:00
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>