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

Interface specific addresses #26

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Interface specific addresses #26

wants to merge 6 commits into from

Conversation

richardschneider
Copy link
Owner

See issue #25

if (mask != null)
{
var network = IPNetwork.Parse(local, mask);
return network.Contains(remote);
Copy link

Choose a reason for hiding this comment

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

When testing this on multi-interface setup, I was still seeing some weird results, like my local Hyper-V interface addresses being used in answers to queries sent from remote machines on a completely different network, which I'd expect would be filtered out.

}

// Can not determine reachability, assume that network routing can do it.
return true;
Copy link

@jbrestan jbrestan Sep 3, 2019

Choose a reason for hiding this comment

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

Are there no further heuristics we could use if all else fails? Maybe something like local.AddressFamily == remote.AddressFamily? In my multi-interface test setup I was seeing a lot of IPv6 responses that get removed if I add that additional comparison, but I'm not sure if that's right or wrong...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants