Validate encoded TP-OA length, TOA extension bit and declared TP-UD length before decoding. Preserve valid GSM addresses, timestamps and binary payloads. Remove score-based filtering, arbitrary resynchronization and raw-PDU errors. Add a synthetic length-8 SMSC regression that reproduces the original 145-character sender.
Some QMI backends prepend a few bytes to the SMS PDU, which shifts the
whole TPDU and makes every candidate decode into an impossible address
and timestamp. That produced the same garbage sender even when the PDU
itself was intact.
When no candidate reaches the plausibility score, retry decoding at byte
offsets 1..12, including starts that skip a second SMSC-style header.
Return the highest-scoring decode and drop the message only when every
offset fails.
Refs #130
A QMI SMS PDU used to be accepted as soon as its first byte looked like a
TPDU (low two bits clear). A full PDU that still carries the SMSC header
starts with 0x08 and passes that test, so the SMSC TOA byte 0x91 was read
as a 145-semi-octet TP-OA: the message landed in the database with a
145-character "sender" and a bogus 2005 SCTS.
Score every decoded candidate on TP-OA plausibility, SCTS range and body
validity, keep the best one, and only return it at minSMSDecodeScore.
When nothing passes, include the raw PDU in the error so the next
occurrence can be diagnosed from the log.
Refs #130
- Stop starts one release task and every caller waits for it with its own ctx
- Report ErrRunnerNotExited at the deadline and ErrCleanupFailed for local cleanup failures
- Bound the IMS stop in the release task to 5 seconds
- Ignore session, service and voice handles that arrive after Stop
- Add SessionManager.StopAsync and StopAndWait that wait for session goroutines and local cleanup
- Make StopSlot wait for its session
- Stop ePDG sessions with StopAsync in runtimecore and keep the original cleanup order
- Keep local cleanup failures in the runner result after cancellation
- Make the cellular tunnel adapter publish and wait for its stopped session
- Cancel and wait for P-CSCF recoveries on IMS stop
- Stop the IMS service only once
- Log IMS service stop failures
- Add StartWithRunnerForTest for host tests
- clear only the card's MWI failure count and local wait, keeping network waits and stop states
- act only on a switch to on or the redetect button, not on saving on again
- reconnect or wake only running runtimes that hold the card, never start one
- reset in the host-held state before the hideck#101 reconnect
- wake the running runtime to re-check MWI when no reconnect is needed
- restart an MWI usage the SIM setting stopped once the setting allows it
- do a proxy change's reconnect first, then reset and wake without a second reconnect
- split the retry state out of SubscriptionRegistrationStore into SubscriptionRetryStore
- keep one store in vowifihost.Manager and pass it to every runtime start
- wire it into both the default runtimecore path and the custom-tunnel path
- narrow the protocol alignment doc to what is kept and for how long
- Classify a reset or close from the old port_pc during retirement as sa_retired
- Keep a timeout on the old flow as a failure
- Clear the pending retirement only after its flows are marked
- Ignore a retire timer that fires after the retirement finished
- Log raw_close_kind, sa_retired_via, remote and current on port-s close
- Test reset, close and timeout from the old port_pc and a reset during cleanup
- retry the reg event package after 30 s, 1, 2 and 4 minutes, then every 5 minutes
- retry MWI after 5, 10 and 20 minutes, then every 30 minutes
- keep Retry-After and retry-after as the minimum wait
- keep the failure count per identity and event package across Service rebuilds
- clear the count only on a matching active or pending NOTIFY
- let the reg event package subscribe once after a new initial registration
- keep MWI stopped after rejected, noresource or invariant across registrations
- count a transaction timeout followed by Timer N as one failure
- Add disable_mwi_subscription to carrier presets and enable it for Vodafone DE 26202
- Carry the new field through preset merge, override clone, JSON override and runtime conversion
- Add an optional MWISubscriptionPolicyStore with auto, on and off per SIM
- Check the policy in the send callback of every initial, refresh and 481 retry SUBSCRIBE(mwi)
- Record a network 405 or 489 as a persistent rejection and skip 480, timeouts and locally routed 405
- End the subscription when a refresh is blocked instead of keeping its timer
- Stop an active MWI subscription found disabled at registration
- Do not treat a policy block as a signaling failure
- Wire the store through runtimehost and runtimecore, including the cellular start path
- Add carry-over tests at each conversion boundary
- Copy AllowHandoverPDNWLANAndEPS in cloneCarrierOverridePointers like the other pointer fields
- Add a reflection test that fails when a cloned override still shares a pointer
- Open a fresh SOCKS5 UDP ASSOCIATE to the ePDG on 4500 after NAT detection
- Keep the old association when the new one cannot be opened
- Move a running IKE control loop to the new association
- Bound the SOCKS5 handshake with the dial timeout
- Drop duplicate IKE responses instead of blocking the dispatcher
- Share the proxy transport config between setup and MOBIKE
- Probe with a REGISTER after a Lebara UK port-s timeout and wait for the P-CSCF to reopen port-s once it succeeds
- Keep SMS readiness true with its own reasons while probing and waiting
- Bind the wait and the probe grace to the timed-out port-s generation and P-CSCF, and drop them on a new registration
- Send another probe REGISTER when port-s timed out while an earlier REGISTER was in flight
- End the wait when a REGISTER fails or a refresh negotiates an outbound flow, and the probe grace when recovery backs off
- Count a peer reopen during the wait as on-demand evidence only when no REGISTER is in flight
- Mirror sipOutbound into an atomic and clear the post-REGISTER wait flag on every port-s close
- Log entering, declining and ending the wait, each REGISTER during it and probe retries with the carrier preset and peer reconnect history
- Show in the web UI that SMS reception waits for the carrier to reopen port-s
- Add tests for the Lebara UK wait, probes, failures, stale states, outbound and carriers outside the list
- Report from the runtime IMS network whether its IPsec installer can add a set beside the active one
- Keep the refresh REGISTER as on main when it cannot or when an external transport carries the registration
- Log the skipped offer with the missing capability
- Test the userspace, system and missing installers and both skipped cases
- Classify the close of a port-s flow whose SAs a refresh switch deleted as sa_retired
- Await the P-CSCF reopening port-s over the new SAs instead of treating it as a local close
- Install the new SA set alongside the active one for SM7
- Send SM7 on its own flow from the offered port-c with the new Security-Verify
- Keep other requests on the old SAs until the 200
- Make the new SAs and flow active on the 200 and move dialogs onto them
- Retire the old SAs and their flows after a message over the new SAs once no transaction is pending, or at their lifetime end
- Delete the new SAs and keep the binding and old SAs when SM7 gets no response or any final non-2xx answer, including 403 and an IP+Port conflict
- Decline any further challenge to SM7 before AKA
- Check the new Security-Server before AKA and refuse it without answering the challenge
- Keep an SM7 write failure or flow close away from the active flow
- Leave an old flow close during the switch to the switch outcome
- Fail the refresh when the new flow closes before the switch completes
- Route protected UDP by sending port-c while both SA sets exist
- Add alongside install, abort, commit and retire to the IPsec installers
- Retire a replaced SA set on stop, a P-CSCF switch and a fresh registration
- Log which registration flow closed
- Gate a refresh only once its offer is reserved, so a failed reservation refreshes as on main
- Run the initial-reject fallback on refreshes with an offer and rewrite only the offered Security-Client
- Log the fallback retry of an offer and the actual delay before the old SAs retire
- Cite TS 24.229 5.1.1.5.1 for keeping the old SAs and mark our own choices in comments
Probe TCP_MAXSEG on Linux MPTCP listeners and retry with TCP only for EOPNOTSUPP. Retain compatible MPTCP sockets, propagate other errors, and provide a switch to disable the retry. Stabilize the related registration, subscription, and UDP test fixtures.
Validated real IPv4/IPv6 connections on Linux 5.18 and a Linux 7.0 VM. The 179 IMS suite passed 699 tests and local race checks passed five rounds. The VM MPTCP tests passed; its full suite still hits short-deadline test timeouts, as documented.
- Add refresh_offers_new_security_client to the IMS register template and every conversion layer
- Enable it in the 2degrees NZ preset
- Reserve a new protected client port on TCP and UDP and draw unused SPIs for each refresh, keeping port-s
- Keep the active SAs, Security-Verify and Authorization on the refresh
- Leave the REGISTER that completes an outbound flow out of the offer
- Decline a challenge that would set up new SAs before AKA and keep the existing binding
- Answer a challenge without Security-Server over the active SAs as before
- Release the offer's reservations on every outcome and log its disposition
- Skip the initial-reject fallback on such refreshes so the active Security-Client is not rewritten
- Log REGISTER response latency
- Add tests for the offer, declined and reused challenges, the key off, outbound completion and binding preservation
- Skip the sms_ready state update when IMSReady is false
- Skip SMS readiness snapshots while the runtime is interrupted, retrying, restarting, failed or stopped
- Log each skipped update with the runtime phase
- Test a late snapshot and sms_ready after each down phase
- Report a registration whose port-s closed or timed out as awaiting the P-CSCF reconnect
- Report it as not ready again once Vodafone UK validation finds the downlink broken
- Keep reporting not ready after a failed RP report or on another P-CSCF
- Count an RP report failure on the registration flow even when port-s closed during its retries
- Show the awaiting state as pending with its own detail instead of failed in the web UI
- Test the close kinds, every prerequisite, failed validation, report failures, another P-CSCF and the web state
- Add DiffieHellman.Wipe for the MODP private key, the shared secret and the ECDH key reference
- Use it for every KE a CHILD_SA rekey offered but did not install
- Test refused, mismatched and NONE answers, and that the installed KE is kept
- Offer the IKE SA D-H group and NONE with KEi when the CHILD_SA has no PFS
- Accept either selection and install the CHILD_SA with or without PFS
- Retry a refused optional-PFS offer once with D-H left out, and the reverse
- Start the next no-PFS rekey with the form that last worked
- Keep D-H transforms ahead of ESN in the rekey proposal
- Reject a D-H selection that carries attributes
- Accept a peer rekey that adds PFS in the IKE SA group
- Name the offer on transport failures and the answer on rejected responses
- Log the offered and selected D-H groups
- Test both D-H forms in both directions, the remembered form, the second rejection and an unretried INVALID_KE_PAYLOAD