nspawn: support passing wireless interface to container#30956
Merged
bluca merged 14 commits intosystemd:mainfrom Jan 19, 2024
Merged
nspawn: support passing wireless interface to container#30956bluca merged 14 commits intosystemd:mainfrom
bluca merged 14 commits intosystemd:mainfrom
Conversation
Member
|
looks superficially good to me. |
1da5f8a to
2fc6667
Compare
Member
Author
|
This becomes much bigger than I initially expected. But, now renaming is also supported, and test cases are added. PTAL. |
2fc6667 to
373018b
Compare
Member
Author
|
@Edu4rdSHL Please test again. |
Member
Author
|
(BTW, this is nice article: https://www.suse.com/c/creating-virtual-wlan-interfaces/) |
Contributor
|
I have tested it and everything works as expected. I did a few tests:
|
Edu4rdSHL
approved these changes
Jan 17, 2024
poettering
reviewed
Jan 17, 2024
poettering
reviewed
Jan 17, 2024
poettering
reviewed
Jan 17, 2024
373018b to
aaf4211
Compare
c50a459 to
d7bb49b
Compare
Also reorder opening namespace fd to make it match with the order of the arguments.
Also use -EBADF when unspecified.
On failure, the caller logs the error in LOG_ERR.
Similar to FORK_NEW_MOUNTNS or FORK_NEW_USERNS.
Similar to userns_acquire(), but for network namespace.
poettering
reviewed
Jan 19, 2024
poettering
reviewed
Jan 19, 2024
Member
|
lgtm, just some superficial comments about function names. |
No functional change, just refactoring and preparation for later commits.
This also changes to use sd_device to get some attributes. So, on moving interfaces back to the parent, we need to populate sysfs associated to the client netns. That may look redundant and complicated, but it makes later change easier, and hopefully faster.
If the requested new name for a network interface is already assigned as a alternative name, then it is not necessary to and cannot rename the interface.
- test interface renaming that conflicts with the current alternative network interface name, - test passing wlan interfaces.
d7bb49b to
e8736fb
Compare
Member
Author
|
@poettering Thank you for the review. The functions are renamed. Upgrading the green label. |
Edu4rdSHL
added a commit
to nspawn/nspawn.github.io
that referenced
this pull request
Jan 25, 2024
Mention systemd/systemd#30956 which will fix this problem and we will not need workarounds.
This was referenced Jan 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7873.