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 ovs fdb for the local bridge port #2014

Merged
merged 1 commit into from
Nov 7, 2022
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
10 changes: 5 additions & 5 deletions pkg/daemon/ovs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,6 @@ func configProviderNic(nicName, brName string) (int, error) {
return 0, fmt.Errorf("failed to get routes on nic %s: %v", nicName, err)
}

if _, err = ovs.Exec(ovs.MayExist, "add-port", brName, nicName,
"--", "set", "port", nicName, "external_ids:vendor="+util.CniTypeName); err != nil {
return 0, fmt.Errorf("failed to add %s to OVS bridge %s: %v", nicName, brName, err)
}

for _, addr := range addrs {
if addr.IP.IsLinkLocalUnicast() {
// skip 169.254.0.0/16 and fe80::/10
Expand Down Expand Up @@ -604,6 +599,11 @@ func configProviderNic(nicName, brName string) (int, error) {
}
}

if _, err = ovs.Exec(ovs.MayExist, "add-port", brName, nicName,
"--", "set", "port", nicName, "external_ids:vendor="+util.CniTypeName); err != nil {
return 0, fmt.Errorf("failed to add %s to OVS bridge %s: %v", nicName, brName, err)
}

if err = netlink.LinkSetUp(nic); err != nil {
return 0, fmt.Errorf("failed to set link %s up: %v", nicName, err)
}
Expand Down