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

Filter duplicate interfaces from incoming #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christianbundy
Copy link
Contributor

@staltz
Copy link
Member

staltz commented Jan 15, 2020

If this is an important hotfix, feel free to merge, I reviewed and I think it's good to go.

Note for the future, though, see my comments inline.

// legacy configuration didn't have a scopes concept,
// so interpret that as every scope at once.
// I think there is probably a better way to do this,
// but am fairly sure this will probably work.
Copy link
Member

Choose a reason for hiding this comment

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

Code style changes are best done in their own commit, it makes it significantly easier to review (I can browse the commits and focus my attention only on the non-style commits), and makes the git blame process easier too.

acc.push(cur)
}

return acc
Copy link
Member

Choose a reason for hiding this comment

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

To simplify this code, I would probably refactor this arrow function to be a named function uniqueAddresses that's defined as a top-level function and then I'd use it as reduce(uniqueAddresses). I would do the same for the other parts of this chain of array methods.

@christianbundy christianbundy removed their assignment Jan 31, 2021
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.

Infinite scuttling with repeated IP addresses on different interfaces
2 participants