Change in simtrace2[master]: cardem: fix spurious NULL bytes during transfers

Hoernchen 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-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I15b0b83b7d93b8e5589f3640bd6eb2fc82f93394
Gerrit-Change-Number: 25171
Gerrit-PatchSet: 1
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
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210808/3e3a5211/attachment.htm>


More information about the gerrit-log mailing list