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 checking of existing bridges #54

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

Conversation

rostwald
Copy link
Contributor

The comment at line 92ff states "Check to see if >any< bridges exist[...]", while it actually checks for the hard-coded bridges "bridge0" and "bridge1". This causes iocell to always create those two bridges if present bridges on the system have other names.
Because the default route interface is being added to 'bridge0', the interface resets and drops all connections - on a jailhost this might be the default mgmt interface which carries the connection over which iocell was invoked and thus being terminated in the middle of starting the jail.

This Fix changes the grep'ing for bridge0|bridge1 to simply checking for interfaces belonging to the 'bridge' group via 'ifconfig -g bridge'.

Make sure to follow and check these boxes before submitting a PR! Thank you.

  • Supply documentation according to CONTRIBUTING.md
    bugfix; no update to documentation required

  • Explain the feature
    fixes the behavior of how iocell checks for bridges and decides if it creates the default bridge0 and bridge1

  • Read CONTRIBUTING.md

  • Only open the PR against the develop branch.

The comment states "Check to see if >any< bridges exist[...]", while
it actually checks for the hard-coded bridges "bridge0" and "bridge1".
This causes iocell to always create those two bridges if present bridges
on the system have other names.
Because the default route interface is being added to 'bridge0', the
interface resets and drops all connections - on a jailhost this might be
the default mgmt interface which carries the connection over which
iocell was invoked and thus being terminated in the middle of starting
the jail.

This Fix changes the grep'ing for bridge0|bridge1 to simply checking for
interfaces belonging to the 'bridge' group via 'ifconfig -g bridge'.
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.

1 participant