Skip to content

Handle unbracketed IPv6 daemon operands - #951

Merged
oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync
Oct 23, 2025
Merged

oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync

Conversation

@oferchen

@oferchen oferchen commented Oct 23, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • reject legacy daemon operands that embed raw IPv6 literals without brackets
  • surface a focused diagnostic explaining that IPv6 daemon addresses must be bracketed
  • ensure the legacy parser continues to accept bracketed IPv6 operands and cover the case with tests

Testing

  • cargo test

@oferchen
oferchen merged commit b9377a3 into master Oct 23, 2025
@oferchen
oferchen deleted the implement-missing-components-for-oc-rsync branch October 23, 2025 16:30
oferchen added a commit that referenced this pull request Jun 10, 2026
…path

Three independent fixes shake out interop failures from upstream rsync
3.4.3's testsuite that exercise daemon-side wire format on the receiver:

- daemon-delete-stats (UTS-6): the daemon never set `do_stats` from the
  client's `--stats` flag, so the generator skipped emitting
  `NDX_DEL_STATS` during the goodbye phase and the sender's stats
  showed "Number of deleted files: 0". Wire `--stats` into both the
  daemon's long-form arg parser and the server-mode flag parser.

- daemon-delete-stats (UTS-6): `delete_extraneous_files()` formed the
  filter check and itemize path as `dir_relative.join(name)`, which at
  the deletion root produced `./<name>`. A daemon-side `exclude = ?`
  rule then matched the `.` as a single-character directory component
  (via the descendant matcher `?/**`), suppressing legitimate top-level
  deletes. Strip the implicit `.` prefix when `dir_relative == "."`.

- compress-zlib-insert (UTS-18): `ZlibTokenEncoder::see_token()` called
  `compress(..., Z_SYNC_FLUSH)` exactly once per 0xFFFF chunk. A 64 KiB
  incompressible matched-block insert emits stored-block output >
  `compress_buf` (CHUNK_SIZE * 2), leaving residue inside the deflate
  state. The next literal write picks up the trapped output and
  desynchronises the stream, matching upstream rsync's issue #951.
  Loop the Sync flush, discarding output until the chunk is consumed
  and the compressor partially fills the buffer (signalling no more
  pending output).

Regression tests cover the daemon-side filter behaviour, the
single-char-glob deletion case, and the large incompressible insert.
oferchen added a commit that referenced this pull request Jun 10, 2026
…path (#5520)

* fix: forward --stats into daemon, drain Sync flush, normalize delete path

Three independent fixes shake out interop failures from upstream rsync
3.4.3's testsuite that exercise daemon-side wire format on the receiver:

- daemon-delete-stats (UTS-6): the daemon never set `do_stats` from the
  client's `--stats` flag, so the generator skipped emitting
  `NDX_DEL_STATS` during the goodbye phase and the sender's stats
  showed "Number of deleted files: 0". Wire `--stats` into both the
  daemon's long-form arg parser and the server-mode flag parser.

- daemon-delete-stats (UTS-6): `delete_extraneous_files()` formed the
  filter check and itemize path as `dir_relative.join(name)`, which at
  the deletion root produced `./<name>`. A daemon-side `exclude = ?`
  rule then matched the `.` as a single-character directory component
  (via the descendant matcher `?/**`), suppressing legitimate top-level
  deletes. Strip the implicit `.` prefix when `dir_relative == "."`.

- compress-zlib-insert (UTS-18): `ZlibTokenEncoder::see_token()` called
  `compress(..., Z_SYNC_FLUSH)` exactly once per 0xFFFF chunk. A 64 KiB
  incompressible matched-block insert emits stored-block output >
  `compress_buf` (CHUNK_SIZE * 2), leaving residue inside the deflate
  state. The next literal write picks up the trapped output and
  desynchronises the stream, matching upstream rsync's issue #951.
  Loop the Sync flush, discarding output until the chunk is consumed
  and the compressor partially fills the buffer (signalling no more
  pending output).

Regression tests cover the daemon-side filter behaviour, the
single-char-glob deletion case, and the large incompressible insert.

* style: cargo fmt fix

* fix: drop shadowed PathBuf import from deletion module

* style: regroup hex literal digits to satisfy clippy
oferchen added a commit that referenced this pull request Jun 17, 2026
Pins the BufferedMap window-length clamp (UTS-18.g.1/.g.2/.g.3) via
the public map_file API. Mirrors the upstream
testsuite/compress-zlib-insert_test.py scenario (issue #951) at
unit-test scope: a sub-MAX_MAP_SIZE basis must round-trip through
map_ptr without tripping the "exceeds buffer length" guard, and the
clamp must hold on cached re-entry, sliding-window walks, and the
exact-fit boundary.

Inline tests in crates/transfer/src/map_file/buffered.rs already cover
the clamp invariant against fabricated state. This integration test
pins the contract the four production map_ptr call sites depend on
(token_loop.rs, response.rs, sync.rs, applicator.rs).
oferchen added a commit that referenced this pull request Jun 17, 2026
…5893)

Pins the BufferedMap window-length clamp (UTS-18.g.1/.g.2/.g.3) via
the public map_file API. Mirrors the upstream
testsuite/compress-zlib-insert_test.py scenario (issue #951) at
unit-test scope: a sub-MAX_MAP_SIZE basis must round-trip through
map_ptr without tripping the "exceeds buffer length" guard, and the
clamp must hold on cached re-entry, sliding-window walks, and the
exact-fit boundary.

Inline tests in crates/transfer/src/map_file/buffered.rs already cover
the clamp invariant against fabricated state. This integration test
pins the contract the four production map_ptr call sites depend on
(token_loop.rs, response.rs, sync.rs, applicator.rs).
oferchen added a commit that referenced this pull request Aug 24, 2026
…path (#5520)

* fix: forward --stats into daemon, drain Sync flush, normalize delete path

Three independent fixes shake out interop failures from upstream rsync
3.4.3's testsuite that exercise daemon-side wire format on the receiver:

- daemon-delete-stats (UTS-6): the daemon never set `do_stats` from the
  client's `--stats` flag, so the generator skipped emitting
  `NDX_DEL_STATS` during the goodbye phase and the sender's stats
  showed "Number of deleted files: 0". Wire `--stats` into both the
  daemon's long-form arg parser and the server-mode flag parser.

- daemon-delete-stats (UTS-6): `delete_extraneous_files()` formed the
  filter check and itemize path as `dir_relative.join(name)`, which at
  the deletion root produced `./<name>`. A daemon-side `exclude = ?`
  rule then matched the `.` as a single-character directory component
  (via the descendant matcher `?/**`), suppressing legitimate top-level
  deletes. Strip the implicit `.` prefix when `dir_relative == "."`.

- compress-zlib-insert (UTS-18): `ZlibTokenEncoder::see_token()` called
  `compress(..., Z_SYNC_FLUSH)` exactly once per 0xFFFF chunk. A 64 KiB
  incompressible matched-block insert emits stored-block output >
  `compress_buf` (CHUNK_SIZE * 2), leaving residue inside the deflate
  state. The next literal write picks up the trapped output and
  desynchronises the stream, matching upstream rsync's issue #951.
  Loop the Sync flush, discarding output until the chunk is consumed
  and the compressor partially fills the buffer (signalling no more
  pending output).

Regression tests cover the daemon-side filter behaviour, the
single-char-glob deletion case, and the large incompressible insert.

* style: cargo fmt fix

* fix: drop shadowed PathBuf import from deletion module

* style: regroup hex literal digits to satisfy clippy
oferchen added a commit that referenced this pull request Aug 24, 2026
…5893)

Pins the BufferedMap window-length clamp (UTS-18.g.1/.g.2/.g.3) via
the public map_file API. Mirrors the upstream
testsuite/compress-zlib-insert_test.py scenario (issue #951) at
unit-test scope: a sub-MAX_MAP_SIZE basis must round-trip through
map_ptr without tripping the "exceeds buffer length" guard, and the
clamp must hold on cached re-entry, sliding-window walks, and the
exact-fit boundary.

Inline tests in crates/transfer/src/map_file/buffered.rs already cover
the clamp invariant against fabricated state. This integration test
pins the contract the four production map_ptr call sites depend on
(token_loop.rs, response.rs, sync.rs, applicator.rs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant