Skip to content

Commit

Permalink
incusd/network/ovn: Limit MAC_Binding explosion
Browse files Browse the repository at this point in the history
This configures OVN so it doesn't fill the MAC_Binding table with every
single MAC address it sees through ARP.

Instead MAC_Binding entries will be generated for the default gateway
only, leading to two entries per network.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Sponsored-by: Buddy (https://buddy.works)
  • Loading branch information
stgraber committed Aug 27, 2024
1 parent 3ddbdcc commit 38071d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/server/network/ovn/ovn_nb_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ func (o *NB) CreateLogicalRouter(ctx context.Context, routerName OVNRouter, mayE
return ErrExists
}

// Set some options.
logicalRouter.Options = map[string]string{
"always_learn_from_arp_request": "false",
"dynamic_neigh_routers": "true",
}

// Create the record.
operations, err := o.client.Create(&logicalRouter)
if err != nil {
Expand Down

0 comments on commit 38071d7

Please sign in to comment.