Skip to content

fix: activate receiver input multiplex for proto 28/29 daemon pulls - #2749

Merged
oferchen merged 1 commit into
masterfrom
fix/protocol-28-29-daemon
Mar 17, 2026
Merged

oferchen merged 1 commit into
masterfrom
fix/protocol-28-29-daemon

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Fix daemon pull transfers failing with forced protocol 28 or 29 by activating the receiver input multiplex at protocol >= 23 in client mode (matching upstream main.c:1342-1343), instead of only at >= 30
  • Extract should_activate_input_multiplex() on ReceiverContext (mirroring the generator existing method) for mode-aware activation: client mode >= 23, server mode >= 30
  • Add 8 unit tests covering all mode/protocol combinations for receiver input multiplex activation

Root Cause

The receiver setup_transfer() unconditionally checked uses_binary_negotiation() (>= 30) to decide whether to activate input multiplex. In server mode this is correct (upstream main.c:1167-1168 only activates for >= 30), but in client mode (daemon pull) upstream activates at protocol >= 23 (main.c:1342-1343). Without input multiplex, the client receiver could not parse the server sender multiplexed output frames, causing the transfer to fail with protocol decoding errors.

Test plan

  • CI passes: fmt+clippy, nextest, all platforms
  • New unit tests verify correct activation thresholds for all protocol/mode combinations
  • Interop tests with upstream rsync daemon at protocol 28/29 (CI interop suite)

@github-actions github-actions Bot added the bug Something isn't working label Mar 16, 2026
@oferchen
oferchen force-pushed the fix/protocol-28-29-daemon branch from 2e30f35 to 00ae064 Compare March 16, 2026 23:07
The receiver input multiplex activation was gated on
uses_binary_negotiation() (protocol >= 30) regardless of mode. This
caused daemon pull transfers with protocol 28/29 to fail because the
client receiver could not demultiplex the server sender multiplexed
output frames.

Upstream rsync activates input multiplex differently by mode:
- Client receiver (pull): protocol >= 23 (main.c:1342-1343)
- Server receiver (push): protocol >= 30 (main.c:1167-1168)

Extract should_activate_input_multiplex() on ReceiverContext mirroring
the generator existing method, and use it in setup_transfer().
@oferchen
oferchen force-pushed the fix/protocol-28-29-daemon branch from 00ae064 to 740163b Compare March 17, 2026 01:21
@oferchen
oferchen merged commit 0be7554 into master Mar 17, 2026
31 checks passed
@oferchen
oferchen deleted the fix/protocol-28-29-daemon branch March 17, 2026 04:48
oferchen added a commit that referenced this pull request May 1, 2026
…2749)

The receiver input multiplex activation was gated on
uses_binary_negotiation() (protocol >= 30) regardless of mode. This
caused daemon pull transfers with protocol 28/29 to fail because the
client receiver could not demultiplex the server sender multiplexed
output frames.

Upstream rsync activates input multiplex differently by mode:
- Client receiver (pull): protocol >= 23 (main.c:1342-1343)
- Server receiver (push): protocol >= 30 (main.c:1167-1168)

Extract should_activate_input_multiplex() on ReceiverContext mirroring
the generator existing method, and use it in setup_transfer().
oferchen added a commit that referenced this pull request May 5, 2026
…2749)

The receiver input multiplex activation was gated on
uses_binary_negotiation() (protocol >= 30) regardless of mode. This
caused daemon pull transfers with protocol 28/29 to fail because the
client receiver could not demultiplex the server sender multiplexed
output frames.

Upstream rsync activates input multiplex differently by mode:
- Client receiver (pull): protocol >= 23 (main.c:1342-1343)
- Server receiver (push): protocol >= 30 (main.c:1167-1168)

Extract should_activate_input_multiplex() on ReceiverContext mirroring
the generator existing method, and use it in setup_transfer().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant