-
Notifications
You must be signed in to change notification settings - Fork 757
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
Two functions: one for adding bond slave, one for getting veth peer index #307
Conversation
ioctl_linux.go
Outdated
// IfreqSlave is a struct for ioctl bond manipulation syscalls. | ||
// It is used to assign slave to bond interface with Name. | ||
type IfreqSlave struct { | ||
Name [syscall.IFNAMSIZ]byte |
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.
Can you switch to the unix
pkg instead of syscall
?
link_linux.go
Outdated
func VethPeerIndex(link *Veth) (int, error) { | ||
fd, err := getSocketUDP() | ||
if err != nil { | ||
return 0, err |
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.
why not returning -1
as in all other error cases below
Thanks for the contributions. Couple of minor comments. Also, ideally this should be two commits: One for |
Thanks @aboch for review. I have fixed the two files you requested :) |
Please do not add a new commit to take care of the review comments. |
89843bb
to
320750e
Compare
@aboch I have put everything into one commit. |
Thanks @jjastrze-ovh / @phob0s-pl LGTM |
As in topic. Please review this.