Repository navigation
Fix IPv6 zone identifier parsing in module list requests - #1657
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let Some((host, port)) = split_host_port(input) { | ||
| let port = port | ||
| .parse::<u16>() | ||
| .map_err(|_| daemon_error("invalid daemon port", FEATURE_UNAVAILABLE_EXIT_CODE))?; | ||
| let host = decode_host_component(host)?; | ||
| let address = DaemonAddress::new(host, port)?; | ||
| return Ok(ParsedDaemonTarget { address, username }); | ||
| let host_contains_colon = host.contains(':'); | ||
| let port_is_digits = !port.is_empty() && port.chars().all(|ch| ch.is_ascii_digit()); | ||
|
|
||
| if port_is_digits { | ||
| if host_contains_colon { | ||
| return Err(daemon_error( | ||
| "IPv6 daemon addresses must be enclosed in brackets", | ||
| FEATURE_UNAVAILABLE_EXIT_CODE, |
There was a problem hiding this comment.
Reject numeric-suffixed IPv6 literals without ports
The explicit-port detection in parse_host_port now looks at the substring after the last : and treats it as a port whenever it contains only digits. For an unbracketed IPv6 literal whose final segment is numeric (rsync://2001:db8::1/, rsync://::1/, etc.), split_host_port returns that last segment as the port, port_is_digits becomes true, and the code errors with “IPv6 daemon addresses must be enclosed in brackets”. These addresses do not include an explicit port and previously resolved to the default port, so the new check rejects a valid form and only affects IPv6 hosts whose trailing segment happens to be decimal digits. IPv6 literals ending with hex letters still work, which makes the behavior inconsistent. The port detection should distinguish “IPv6 literal with no port” from “literal with a numeric port” rather than flagging all trailing decimal segments.
Useful? React with 👍 / 👎.
Static, code-grounded audit of the fast_io fallback on macOS compared to the Linux io_uring path and the post-#1868 Windows IOCP path. Inventories every public copy/write/probe entry point with file:LINE, documents the inferred per-file syscall budget, identifies which io_uring features have no macOS analogue, and ranks the near-term mitigations (#1657 pwritev+F_NOCACHE, #1385 kqueue backend, macOS sendfile arm) by inferred payoff per unit of effort.
…) (#3998) * feat(fast_io): add macOS F_NOCACHE + writev optimized write path (#1657) Add a macOS-specific file writer that combines two optimizations for large sequential writes: - F_NOCACHE via fcntl bypasses the unified buffer cache for files above 1 MB, reducing memory pressure without alignment requirements. - writev scatter-gather I/O batches multiple buffers into a single syscall, reducing transition overhead. Small files below the threshold use standard buffered I/O. Non-macOS platforms compile a stub that delegates to BufWriter. The module follows the same cfg-gated pattern as io_uring and IOCP with platform stubs. * fix: replace assertions on constants with value equality check Clippy flags `assert!(CONST > 0)` as `assert!(true)` since the compiler evaluates and optimizes it away. Use `assert_eq!` with the expected value instead.
Static, code-grounded audit of the fast_io fallback on macOS compared to the Linux io_uring path and the post-#1868 Windows IOCP path. Inventories every public copy/write/probe entry point with file:LINE, documents the inferred per-file syscall budget, identifies which io_uring features have no macOS analogue, and ranks the near-term mitigations (#1657 pwritev+F_NOCACHE, #1385 kqueue backend, macOS sendfile arm) by inferred payoff per unit of effort.
…) (#3998) * feat(fast_io): add macOS F_NOCACHE + writev optimized write path (#1657) Add a macOS-specific file writer that combines two optimizations for large sequential writes: - F_NOCACHE via fcntl bypasses the unified buffer cache for files above 1 MB, reducing memory pressure without alignment requirements. - writev scatter-gather I/O batches multiple buffers into a single syscall, reducing transition overhead. Small files below the threshold use standard buffered I/O. Non-macOS platforms compile a stub that delegates to BufWriter. The module follows the same cfg-gated pattern as io_uring and IOCP with platform stubs. * fix: replace assertions on constants with value equality check Clippy flags `assert!(CONST > 0)` as `assert!(true)` since the compiler evaluates and optimizes it away. Use `assert_eq!` with the expected value instead.
…) (#3998) * feat(fast_io): add macOS F_NOCACHE + writev optimized write path (#1657) Add a macOS-specific file writer that combines two optimizations for large sequential writes: - F_NOCACHE via fcntl bypasses the unified buffer cache for files above 1 MB, reducing memory pressure without alignment requirements. - writev scatter-gather I/O batches multiple buffers into a single syscall, reducing transition overhead. Small files below the threshold use standard buffered I/O. Non-macOS platforms compile a stub that delegates to BufWriter. The module follows the same cfg-gated pattern as io_uring and IOCP with platform stubs. * fix: replace assertions on constants with value equality check Clippy flags `assert!(CONST > 0)` as `assert!(true)` since the compiler evaluates and optimizes it away. Use `assert_eq!` with the expected value instead.
Static, code-grounded audit of the fast_io fallback on macOS compared to the Linux io_uring path and the post-#1868 Windows IOCP path. Inventories every public copy/write/probe entry point with file:LINE, documents the inferred per-file syscall budget, identifies which io_uring features have no macOS analogue, and ranks the near-term mitigations (#1657 pwritev+F_NOCACHE, #1385 kqueue backend, macOS sendfile arm) by inferred payoff per unit of effort.
…) (#3998) * feat(fast_io): add macOS F_NOCACHE + writev optimized write path (#1657) Add a macOS-specific file writer that combines two optimizations for large sequential writes: - F_NOCACHE via fcntl bypasses the unified buffer cache for files above 1 MB, reducing memory pressure without alignment requirements. - writev scatter-gather I/O batches multiple buffers into a single syscall, reducing transition overhead. Small files below the threshold use standard buffered I/O. Non-macOS platforms compile a stub that delegates to BufWriter. The module follows the same cfg-gated pattern as io_uring and IOCP with platform stubs. * fix: replace assertions on constants with value equality check Clippy flags `assert!(CONST > 0)` as `assert!(true)` since the compiler evaluates and optimizes it away. Use `assert_eq!` with the expected value instead.
Summary
Testing