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

Avoid hard coding network address for bridge #4

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

Avoid hard coding network address for bridge #4

wants to merge 1 commit into from

Conversation

swills
Copy link

@swills swills commented Nov 2, 2016

Add functions to examine local subnets and avoid using a network that is
already in use locally. More may be needed, but this avoids a local issue for
now. Note this will only work on 11.0 and later since it uses the libxo support
in netstat.

Add functions to examine local subnets and avoid using a network that is
already in use locally. More may be needed, but this avoids a local issue for
now. Note this will only work on 11.0 and later since it uses the libxo support
in netstat.
@jesa7955
Copy link
Owner

jesa7955 commented Nov 2, 2016

Thank you for your great work! This commit looks good, but I think not all bhyve users have updated their FreeBSD to 11.0. Shouldn't we add a version check before searching an available subnet?

@swills
Copy link
Author

swills commented Nov 2, 2016

Yeah, probably not everyone has upgraded, so we should support 10.x too. But instead of adding a version check and falling back to the hard coded value for 10.x, we can just add a way to get the netstat output that works on 10.x to _find_local_subnets. And that method would probably work on 11.x as well. I just didn't want to write the code to parse netstat output right now. Maybe I'll get motivated and do it tomorrow. Or maybe someone else will get there first. :)

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