Skip to content

ftp: use global sequence counter to prevent stale response loops#2760

Merged
julianoes merged 1 commit intomainfrom
pr-ftp-seq-fix
Feb 3, 2026
Merged

ftp: use global sequence counter to prevent stale response loops#2760
julianoes merged 1 commit intomainfrom
pr-ftp-seq-fix

Conversation

@julianoes
Copy link
Copy Markdown
Collaborator

PX4's FTP server caches its last reply and uses seq+1 matching to detect retransmissions. When the client's seq counter reset to 0 for each new work item, PX4 would match against its cached reply and resend the old response instead of processing the new request. This caused sequential operations to time out.

Move last_sent_seq_number from per-work-item to class-level so seq numbers increase monotonically. Also increment seq on retries so the client can escape stale cached replies from previous sessions.

PX4's FTP server caches its last reply and uses seq+1 matching
to detect retransmissions. When the client's seq counter reset
to 0 for each new work item, PX4 would match against its cached
reply and resend the old response instead of processing the new
request. This caused sequential operations to time out.

Move last_sent_seq_number from per-work-item to class-level so
seq numbers increase monotonically. Also increment seq on retries
so the client can escape stale cached replies from previous
sessions.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 3, 2026

@julianoes julianoes merged commit 31d20d9 into main Feb 3, 2026
56 checks passed
@julianoes julianoes deleted the pr-ftp-seq-fix branch February 3, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant