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

Fix ARP flow not installed issue in networkpolicy-only mode #1575

Merged
merged 1 commit into from
Nov 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions pkg/agent/openflow/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,12 +687,11 @@ func (c *client) DeleteStaleFlows() error {
func (c *client) setupPolicyOnlyFlows() error {
// Rewrites MAC to gw port if the packet received is unmatched by local Pod flows.
flows := c.l3FwdFlowRouteToGW(c.nodeConfig.GatewayConfig.MAC, cookie.Default)
if c.IsIPv4Enabled() {
flows = append(flows,
// Replies any ARP request with the same global virtual MAC.
c.arpResponderStaticFlow(cookie.Default),
)
}
// If IPv6 is enabled, this flow will never get hit.
flows = append(flows,
// Replies any ARP request with the same global virtual MAC.
c.arpResponderStaticFlow(cookie.Default),
)
if err := c.ofEntryOperations.AddAll(flows); err != nil {
return fmt.Errorf("failed to setup policy-only flows: %w", err)
}
Expand Down