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 Nov 21, 2020
1 parent ebff88d commit ac56fc7
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 @@ -685,12 +685,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.l3ToGWFlow(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 ac56fc7

Please sign in to comment.