Skip to content

fix(quic): invert may_fragment polarity - #1071

Merged
Berrysoft merged 2 commits into
compio-rs:masterfrom
amandeavor:fix/quic-may-fragment-and-empty-datagram
Oct 23, 2026
Merged

Berrysoft merged 2 commits into
compio-rs:masterfrom
amandeavor:fix/quic-may-fragment-and-empty-datagram

Conversation

@amandeavor

@amandeavor amandeavor commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

may_fragment polarity (#1068): set_socket_option! returns true on success. Quinn-udp sets may_fragment when the don't-fragment / PMTUD option is unsupported (|= !…). Compio had the invert missing.

Fixes #1068

Copilot AI lite review requested due to automatic review settings September 25, 2026 07:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added bug Something isn't working package: quic Related to compio-quic labels Sep 25, 2026
@AsakuraMizu

Copy link
Copy Markdown
Member

Thanks for the contribution! The changes look good to me.

But I'd like to ask: was this PR automatically created in batches by an AI agent? I see #1070 was also created at the same time, and they both cover the same #1069. According to our Code of Conduct, AI tools should be used with disclosure. I'll let other maintainers judge this.

@amandeavor

Copy link
Copy Markdown
Contributor Author

Thanks for the review and for checking in, @AsakuraMizu! To disclose in line with the Code of Conduct: yes, AI coding assistance was used to help explore the code paths and draft the initial patch, which was then tested against local reproduction cases. #1070 and #1071 addressed two distinct aspects of #1069 (empty packet handling vs inverted polarity) rather than being an automated duplicate blast, but I understand the concern and appreciate the team's diligence. Completely happy to follow whatever review or disclosure process the compio maintainers prefer.

@Berrysoft

Copy link
Copy Markdown
Member

@amandeavor Could you rebase the PR?

@amandeavor
amandeavor force-pushed the fix/quic-may-fragment-and-empty-datagram branch from f038edc to 2b9cd01 Compare October 23, 2026 15:27
may_fragment was set true when don't-fragment options succeeded,
the opposite of quinn-udp. Invert so MTU discovery is enabled only
when fragmentation is actually forbidden (compio-rs#1068).

Also return early when meta.len == 0 so chunks(0) does not panic on
empty UDP datagrams (compio-rs#1069).
@AsakuraMizu

Copy link
Copy Markdown
Member

Please update the PR title and description accordingly.

@amandeavor

Copy link
Copy Markdown
Contributor Author

hey @Berrysoft, rebased onto master and dropped the endpoint.rs part since that already landed in #1070, so this just keeps the may_fragment fix now. thanks!

@Berrysoft Berrysoft changed the title fix(quic): invert may_fragment polarity; skip empty UDP datagrams fix(quic): invert may_fragment polarity Oct 23, 2026
@Berrysoft
Berrysoft merged commit c2b6d69 into compio-rs:master Oct 23, 2026
91 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working package: quic Related to compio-quic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

may_fragment is inverted

4 participants