Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mdns): don't suspend task forever upon reading non-mDNS packet #4861

Merged

Conversation

stormshield-frb
Copy link
Contributor

@stormshield-frb stormshield-frb commented Nov 14, 2023

Description

Fixes: #4860.

Notes & open questions

We are not completely sure if we should loop back again (ie. going through priorities 1, 2 and 3 all over again) or if we should add another loop around priority 4. From our understanding of the poll implementation, we should loop back at the top but we might be incorrect.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

Impressive work on finding this! Thank you!

I've left a few minor comments.

protocols/mdns/src/behaviour/iface.rs Outdated Show resolved Hide resolved
protocols/mdns/src/behaviour/iface.rs Outdated Show resolved Hide resolved
protocols/mdns/src/behaviour/iface.rs Show resolved Hide resolved
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Thank you for the debugging work!

protocols/mdns/src/behaviour/iface.rs Show resolved Hide resolved
@thomaseizinger thomaseizinger changed the title fix(mdns): mdns interface-state polling fix(mdns): don't suspend task forever upon reading non-mDNS packet Nov 15, 2023
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

🙏

@mergify mergify bot merged commit c718835 into libp2p:master Nov 22, 2023
71 checks passed
@mxinden
Copy link
Member

mxinden commented Nov 22, 2023

Published and tagged.

@thomaseizinger
Copy link
Contributor

Published and tagged.

How good is it to just release from master whenever you want 😁

@mxinden
Copy link
Member

mxinden commented Nov 23, 2023

😄 oddly satisfying! @thomaseizinger

@stormshield-frb stormshield-frb deleted the fix/mdns-interface-state-polling branch November 27, 2023 15:42
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.

Mdns InterfaceState never being called again after returning Poll::Pending
3 participants