Skip to content
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

ipvlan: Send Gratuitous ARP after IPs are set #675

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

TothFerenc
Copy link
Contributor

This PR fixes the missing Gratuitous ARP functionality in the IPVLAN plugin.
The code is copied from the MACVLAN plugin:

if err := ipam.ConfigureIface(args.IfName, result); err != nil {
return err
}
contVeth, err := net.InterfaceByName(args.IfName)
if err != nil {
return fmt.Errorf("failed to look up %q: %v", args.IfName, err)
}
for _, ipc := range result.IPs {
if ipc.Address.IP.To4() != nil {
_ = arping.GratuitousArpOverIface(ipc.Address.IP, *contVeth)
}
}
return nil

Fixes #673

Copy link
Member

@mars1024 mars1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm, thanks!

@dcbw
Copy link
Member

dcbw commented Nov 24, 2021

/lgtm

1 similar comment
@mccv1r0
Copy link
Member

mccv1r0 commented Nov 24, 2021

/lgtm

@dcbw dcbw merged commit 0920090 into containernetworking:master Nov 24, 2021
@TothFerenc TothFerenc deleted the ipvlan-garp branch November 24, 2021 17:00
@TothFerenc
Copy link
Contributor Author

@dcbw Thanks for the merge!
Do you plan a release anytime soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IPVLAN does not support GARP
5 participants