Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary files possible filename conflict #334

Open
2 tasks done
hugormluis opened this issue Oct 14, 2022 · 0 comments
Open
2 tasks done

Temporary files possible filename conflict #334

hugormluis opened this issue Oct 14, 2022 · 0 comments
Labels

Comments

@hugormluis
Copy link

hugormluis commented Oct 14, 2022

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
The temporary filenames are created based on the sequence number in the PDU (in the CF_CFDP_R_Init()).

Imagine that two different CFDP entities are sending a PDU with the same sequence number (which can happen since this number is managed by each CFDP entity and it can be the same) to the same CFDP destination entity. For instance, the sequence number in this case is 'x'. For the first PDU the CF app would create the x.tmp file and store it in the temporary folder. Upon arriving the second PDU the CF app would also create a x.tmp file and then would store it in the temporary folder. This would create a conflict.

Wouldn't it be better if the temporary filename is the concatenation of the source entity ID and the sequence number? This would guarantee that each temporary file would be unique since each sequence number is unique for each entity ID.

@dzbaker dzbaker added the bug label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants