-
Notifications
You must be signed in to change notification settings - Fork 582
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 too restrictive network interface name checking #228
Conversation
Pull Request Test Coverage Report for Build 685
💛 - Coveralls |
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.
Thanks for the PR @thediveo -- just a quick note to say that there will probably be delay before the maintainers get together to review this PR / other PRs during the upcoming holidays.
The code comment about allowed characters is not actually correct. The kernel validates the ifname like so:
|
Also some examples in practice: https://paste.fedoraproject.org/paste/Cm2556XZYIO9IPbZaIWDoQ |
In the light of |
Yes, I do, so please move to WIP, as I want to bring my PR in sync with the better knowledge about what valid interfaces names in Linux are. |
…le "@" in ifnames, but no need to handle "/".
@rkamudhan I've updated my PR to now take For the tests I noticed that it seems to be acceptable to have an empty namespace and network name, and only a network interface name, such as in "@eth42": is this correct? If it is, then I would suspect my PR to be ready. |
1b0b39d
to
c319f6b
Compare
@rkamudhan @dcbw @dougbtv any interest in merging this after I've implemented the suggestions raised before? |
let me close it because RFC1123 is not same as linux kernel interface name convention. |
Fix too restrictive network interface name checking
parsePodNetworkObjectName()
had too restrictive network interface name checking, trying to enforce RFC 1123 DNS label syntax. However, https://github.com/K8sNetworkPlumbingWG/multi-net-spec/blob/master/%5Bv1%5D%20Kubernetes%20Network%20Custom%20Resource%20Definition%20De-facto%20Standard.md states:Fixes #213 and adds tests for correct parsing behavior.