Skip to content

Commit

Permalink
Fix ARP flow not installed issue in networkpolicy only mode (#1575)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dyanngg authored and antoninbas committed Dec 23, 2020
1 parent a6261aa commit 05e5fbc
Showing 1 changed file with 5 additions and 6 deletions.
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

0 comments on commit 05e5fbc

Please sign in to comment.