Skip to content

Conversation

hashemi
Copy link
Contributor

@hashemi hashemi commented Jan 6, 2023

Motivation:

Empty UDP datagrams could be used to have a meaning. Empty datagrams were being silently dropped on write. Receiving an empty diagram causes an assertion failure (possible DDoS).

Modifications:

Remove early exit when writing empty datagrams and non-empty assertion when reading them.

Result:

We can now write and read empty datagrams.

@swift-server-bot
Copy link

Can one of the admins verify this patch?

10 similar comments
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Jan 6, 2023
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Fantastic patch, thanks so much! ✨

@Lukasa
Copy link
Contributor

Lukasa commented Jan 6, 2023

@swift-server-bot test this please

@Lukasa Lukasa enabled auto-merge (squash) January 6, 2023 17:30
Motivation:

Empty UDP datagrams could be used to have a meaning.
Empty datagrams were being silently dropped on write.
Receiving an empty diagram causes an assertion failure (possible DDoS).

Modifications:

Remove early exit when writing empty datagrams and non-empty assertion when reading them.

Result:

We can now write and read empty datagrams.
auto-merge was automatically disabled January 6, 2023 19:45

Head branch was pushed to by a user without write access

@hashemi hashemi force-pushed the allow-empty-datagrams branch from 6acb5ff to ec05d2c Compare January 6, 2023 19:45
@hashemi
Copy link
Contributor Author

hashemi commented Jan 6, 2023

Thanks @Lukasa. For some reason, the first time I ran the automated linux tests manifest generator it output the wrong year in the copyright field. I just fixed that 2022 to 2023.

@weissi
Copy link
Member

weissi commented Jan 8, 2023

@swift-nio-bot test this please

@weissi weissi enabled auto-merge (squash) January 8, 2023 10:22
@Lukasa
Copy link
Contributor

Lukasa commented Jan 9, 2023

Congratulations on being the first committer of 2023! Unfortunate that means you ran into some tooling limitations: I'll merge #2342 and then we can rebase this on top of it and get it landed.

@Lukasa
Copy link
Contributor

Lukasa commented Jan 9, 2023

@swift-server-bot test this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants