Skip to content

Conversation

@yuwata
Copy link
Member

@yuwata yuwata commented Jan 16, 2024

Closes #7873.

@poettering
Copy link
Member

looks superficially good to me.

@poettering poettering added good-to-merge/waiting-for-reporter-feedback 👍 and removed please-review PR is ready for (re-)review by a maintainer labels Jan 16, 2024
@mrc0mmand mrc0mmand added the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label Jan 16, 2024
@yuwata yuwata force-pushed the nspawn-network-pass-wifi branch from 1da5f8a to 2fc6667 Compare January 17, 2024 05:17
@github-actions github-actions bot added udev util-lib tests sd-netlink please-review PR is ready for (re-)review by a maintainer and removed ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR labels Jan 17, 2024
@yuwata
Copy link
Member Author

yuwata commented Jan 17, 2024

This becomes much bigger than I initially expected. But, now renaming is also supported, and test cases are added. PTAL.

@yuwata yuwata force-pushed the nspawn-network-pass-wifi branch from 2fc6667 to 373018b Compare January 17, 2024 05:19
@yuwata
Copy link
Member Author

yuwata commented Jan 17, 2024

@Edu4rdSHL Please test again.

@yuwata
Copy link
Member Author

yuwata commented Jan 17, 2024

(BTW, this is nice article: https://www.suse.com/c/creating-virtual-wlan-interfaces/)

@Edu4rdSHL
Copy link
Contributor

I have tested it and everything works as expected. I did a few tests:

  • Passing the interface just to get network access: OK
  • Passing the interface to do WiFi pentesting tests (which include putting the interface in monitor mode, etc): OK
  • Passing the interface to create custom network configs inside the container: OK

@poettering poettering added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed please-review PR is ready for (re-)review by a maintainer labels Jan 17, 2024
@yuwata yuwata force-pushed the nspawn-network-pass-wifi branch from 373018b to aaf4211 Compare January 19, 2024 05:33
@yuwata yuwata force-pushed the nspawn-network-pass-wifi branch from c50a459 to d7bb49b Compare January 19, 2024 06:05
@poettering
Copy link
Member

lgtm, just some superficial comments about function names.

@poettering poettering added good-to-merge/with-minor-suggestions and removed please-review PR is ready for (re-)review by a maintainer labels Jan 19, 2024
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.
@yuwata yuwata force-pushed the nspawn-network-pass-wifi branch from d7bb49b to e8736fb Compare January 19, 2024 10:06
@yuwata
Copy link
Member Author

yuwata commented Jan 19, 2024

@poettering Thank you for the review. The functions are renamed. Upgrading the green label.

@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed good-to-merge/with-minor-suggestions labels Jan 19, 2024
@bluca bluca merged commit 0d2e660 into systemd:main Jan 19, 2024
@github-actions github-actions bot removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Jan 19, 2024
@yuwata yuwata deleted the nspawn-network-pass-wifi branch January 19, 2024 12:06
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

nspawn should support passing wifi adapters to containers, like other environments (LXC, …) apparently can do

5 participants