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(webrtc): Don't emit addresses from other interfaces #3142

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

thomaseizinger
Copy link
Contributor

Description

Previously, we would always run IfWatcher, even if we were only listening on a specific interface. This patch fixes this behaviour and aligns it with how libp2p-quic operates.

Notes

cc @melekes

Links to any relevant issues

Open Questions

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

@rkuhn rkuhn left a comment

Choose a reason for hiding this comment

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

nice catch and thanks for the upgrade to version 3!

let if_watcher = match self.if_watcher.as_mut() {
Some(w) => w,
None => return Poll::Pending,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

once we move to Rust 1.65 this can become nicer :-)

let Some(if_watcher) = self.if_watcher.as_mut() else { return Poll::Pending };

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, looking forward to this, I just didn't want to bump it yet. At least not until we have #3090 where we will start to properly verify our MSRV.

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

👍

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.

Thanks @thomaseizinger!

@mergify mergify bot merged commit 05c0794 into master Nov 18, 2022
@thomaseizinger thomaseizinger deleted the webrtc-if-watcher branch February 24, 2023 14:46
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.

4 participants