-
Notifications
You must be signed in to change notification settings - Fork 359
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
Set net.ipv4.conf.antrea-gw0.arp_announce to 1 #5657
Conversation
/test-flexible-ipam-e2e |
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.
Please add commit message to explain the changes.
Unit test failure should be related too.
pkg/agent/agent.go
Outdated
@@ -730,6 +730,11 @@ func (i *Initializer) setupGatewayInterface() error { | |||
if err := i.setInterfaceMTU(i.hostGateway, i.networkConfig.InterfaceMTU); err != nil { | |||
return err | |||
} | |||
if i.nodeConfig.GatewayConfig.IPv4 != nil { | |||
if err := i.setInterfaceARPAnnounce(gatewayIface.InterfaceName, 1); err != nil { |
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.
Please add comment why this is needed
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.
Added comment and PR description about this context.
b65af14
to
2c59098
Compare
/test-flexible-ipam-e2e |
pkg/agent/agent.go
Outdated
@@ -730,6 +730,15 @@ func (i *Initializer) setupGatewayInterface() error { | |||
if err := i.setInterfaceMTU(i.hostGateway, i.networkConfig.InterfaceMTU); err != nil { | |||
return err | |||
} | |||
// Fix #5451 |
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.
Typically no need to link issue in code file when the comment can explain the code. Otherwise the code file would be full of issue links.
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.
Removed issue link.
pkg/agent/agent.go
Outdated
// Set arp_announce to 1 on Linux platform to make the ARP requests from host to gateway | ||
// interface always use gateway IP as source IP. These ARP requests without gateway IP will |
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.
"the ARP requests from host to gateway interface" doesn't sound correct.
Set arp_announce to 1 on Linux platform to make the ARP requests sent on the gateway interface always use the gateway IP as the source IP, otherwise the ARP requests would be dropped by ARP SpoofGuard flow.
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.
Updated code comment, commit message and PR description.
Fix antrea-io#5451 Set arp_announce to 1 on Linux platform to make the ARP requests sent on the gateway interface always use the gateway IP as the source IP, otherwise the ARP requests would be dropped by ARP SpoofGuard flow. Signed-off-by: gran <gran@vmware.com>
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
/test-flexible-ipam-e2e |
/test-networkpolicy |
@gran-vmv please backport it to 1.12-1.14 |
Fix #5451
Set arp_announce to 1 on Linux platform to make the ARP requests sent on the gateway
interface always use the gateway IP as the source IP, otherwise the ARP requests would be
dropped by ARP SpoofGuard flow.