Change in simtrace2[master]: cardem: fix spurious NULL bytes during transfers
gerrit-no-reply at lists.osmocom.org
Sun Aug 8 14:54:34 UTC 2021
Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/25171 )
Change subject: cardem: fix spurious NULL bytes during transfers
Patch Set 1:
This patch fixes the problem for me, but it pretty much just resets the timer after txing a byte by assuming that it actually was sent, which is a reasonable assumption.
There is however still the problem that this might still cause 0x60 bytes if we run out of data, even though the 0x60 byte is only acceptable as PB. If we run out of data afterwards during the tx phase a NULL byte is not gonna help us, the transfer is broken anyway.
A proper(er) fix might be to disable the timeout in set_tpdu_state in case of TPDU_S_WAIT_TX and/or to disable the null byte sending in case of TPDU_S_WAIT_TX in card_emu_wtime_half_expired since I can't imagine a situation where a NULL byte helps after ending up in the post-PB TX phase.. except for the single byte INS ^ FF case that then continues with another PB...
I suppose this fix here is the safest way to do it.
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/25171
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Comment-Date: Sun, 08 Aug 2021 14:54:34 +0000
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log