mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 23:09:45 +01:00
uqmi: stop proto handler if verify pin count is not 3
Check pin count value from pin status and stop verification the pin if
the value is less then 3. This should prevent the proto-handler to
lock the SIM. If SIM is locked then the PUK is needed.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from 0c9d06b5b2)
This commit is contained in:
parent
4f02bee9bb
commit
bcf824a479
1 changed files with 7 additions and 0 deletions
|
|
@ -96,6 +96,7 @@ proto_qmi_setup() {
|
|||
. /usr/share/libubox/jshn.sh
|
||||
json_load "$(uqmi -s -d "$device" --get-pin-status)"
|
||||
json_get_var pin1_status pin1_status
|
||||
json_get_var pin1_verify_tries pin1_verify_tries
|
||||
|
||||
case "$pin1_status" in
|
||||
disabled)
|
||||
|
|
@ -108,6 +109,12 @@ proto_qmi_setup() {
|
|||
return 1
|
||||
;;
|
||||
not_verified)
|
||||
[ "$pin1_verify_tries" -lt "3" ] && {
|
||||
echo "PIN verify count value is $pin1_verify_tries this is below the limit of 3"
|
||||
proto_notify_error "$interface" PIN_TRIES_BELOW_LIMIT
|
||||
proto_block_restart "$interface"
|
||||
return 1
|
||||
}
|
||||
if [ -n "$pincode" ]; then
|
||||
uqmi -s -d "$device" --verify-pin1 "$pincode" > /dev/null 2>&1 || uqmi -s -d "$device" --uim-verify-pin1 "$pincode" > /dev/null 2>&1 || {
|
||||
echo "Unable to verify PIN"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue