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 netmask #5006

Closed
wants to merge 1 commit into from
Closed

fix netmask #5006

wants to merge 1 commit into from

Conversation

jneilliii
Copy link
Contributor

  • Your changes are not possible to do through a plugin and relevant
    to a large audience (ideally all users of OctoPrint)
  • If your changes are large or otherwise disruptive: You have
    made sure your changes don't interfere with current development by
    talking it through with the maintainers, e.g. through a
    Brainstorming ticket
  • Your PR targets OctoPrint's devel branch if it's a completely
    new feature, or maintenance if it's a bug fix or improvement of
    existing functionality for the current stable version (no PRs
    against master or anything else please)
  • Your PR was opened from a custom branch on your repository
    (no PRs from your version of master, maintenance, or devel
    please), e.g. dev/my_new_feature or fix/my_bugfix
  • Your PR only contains relevant changes: no unrelated files,
    no dead code, ideally only one commit - rebase and squash your PR
    if necessary!
  • Your changes follow the existing coding style
  • If your changes include style sheets: You have modified the
    .less source files, not the .css files (those are generated
    with lessc)
  • You have tested your changes (please state how!) - ideally you
    have added unit tests
  • You have run the existing unit tests against your changes and
    nothing broke
  • You have added yourself to the AUTHORS.md file :)

What does this PR do and why is it necessary?

in netifaces2 netmask was replaced with mask

How was it tested? How can it be tested by the reviewer?

manually modified in local deployment and ran OctoPrint

Any background context you want to provide?

What are the relevant tickets if any?

#5005

Screenshots (if appropriate)

Further notes

in netifaces2 netmask was replaced with mask, #5005
@github-actions github-actions bot added the approved Issue has been approved by the bot or manually for further processing label May 1, 2024
@steve1515
Copy link

I have a couple of comments for this PR...

  1. I think you might also want to update references to netmask in the function here:

    def patched_ifaddresses(addr):

  2. I'm unclear what happens when both netifaces and netifaces2 exists and how netifaces2 is insured to be loaded.
    Should we have a check for mask and netmask and use the one that exists? Or are we sure netifaces2 will always be used when both exist?

@foosel
Copy link
Member

foosel commented May 6, 2024

I've decided against going with the easiest approach here, exactly because I'm not sure either if it's not possible to still load netifaces out there if it is installed in parallel. So instead, we'll go with 7d80170, which is more resilient against parallel loading (and also has the unit tests adjusted as needed).

@foosel foosel closed this May 6, 2024
@foosel foosel mentioned this pull request May 6, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Issue has been approved by the bot or manually for further processing
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants