-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
add interface name validation #712
add interface name validation #712
Conversation
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
efc4476
to
d8845e8
Compare
@jellonek all updated, ptal, thanks ~ |
d8845e8
to
71bebbc
Compare
71bebbc
to
b9917fa
Compare
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.
lgtm
For reference, from net/core/dev.c:
|
Aha, interesting. @mars1024 can you block "." and ".." too? |
If we want to follow this kernel code - we should also block ":". |
b9917fa
to
5db3111
Compare
Updated! |
…some comments Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
5db3111
to
eefc069
Compare
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.
LGTM
Interface name in linux is not unrestricted, so bad interface name will break CNI plugin.
This pr will add interface name validation to libcni and skel.
validation rules ref to https://github.com/torvalds/linux/blob/master/net/core/dev.c#L1024