-
Notifications
You must be signed in to change notification settings - Fork 790
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
Tap plugin #784
Tap plugin #784
Conversation
ac1e7ca
to
20b47b6
Compare
55fa761
to
2c65844
Compare
cc: @mccv1r0 too |
2fc8ec3
to
14ac542
Compare
Conceptually it seems good to me! |
32a31ff
to
5d37272
Compare
NB: The test failure on this PR appears to be unrelated to these changes. Please see #793 for a potential fix. |
Thanks for the tip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
two small nits
fa2eccd
to
6a616b0
Compare
Summarizing some discussion we had in the maintainer's meeting:
|
@squeed Could you please take a look again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work.
Most of what I have are opinionated nits, but I would like to see a README with info on how to use this particular plugin, and I question the proposed API (providing the MAC address of the tap via something named IPAMArgs
.
f8bb33f
to
81307ea
Compare
I'm OK with the updates WRT selinux stuff and the /sbin/ip vs. netlink issues. |
@squeed how about now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still missing the README, but I'm OK with having it as a follow-up.
Great work, thank you.
@squeed Can you please have a look again? |
This PR adds a plugin to create tap devices. The plugin adds a tap device to the container. The plugin has a workaround for a golang netlink library which does not allow for tap devices with no owner/group to be created. When no tap owner/group is requested, the plugin will fall back to using the ip tool for creating the tap device. A fix to the golang netlink lib is pending. Signed-off-by: mmirecki <[email protected]>
} | ||
} | ||
|
||
func createTap(conf *NetConf, ifName string, netns ns.NetNS) (*current.Interface, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mmirecki,
thank you for your greate job. Is it possible to export this func we may need to refacto container rootlesskit code. If LGTY I can take care thanks
This PR adds a plugin to create tap devices.
The plugin adds a tap device to the container.
The plugin has a workaround for a golang netlink library
which does not allow for tap devices with no owner/group
to be created. When no tap owner/group is requested, the
plugin will fall back to using the ip tool for creating
the tap device. A fix to the golang netlink lib is pending:
vishvananda/netlink#835