mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
Merge pull request #50236 from corhere/libn/overlay-really-delete-neigh
libn/d/overlay: delete FDB entry from AF_BRIDGE
This commit is contained in:
@@ -306,7 +306,7 @@ func (d *driver) peerDeleteOp(nid, eid string, peerIP netip.Prefix, peerMac net.
|
|||||||
return fmt.Errorf("could not find the subnet %q in network %q", peerIP.String(), n.id)
|
return fmt.Errorf("could not find the subnet %q in network %q", peerIP.String(), n.id)
|
||||||
}
|
}
|
||||||
// Remove fdb entry to the bridge for the peer mac
|
// Remove fdb entry to the bridge for the peer mac
|
||||||
if err := sbox.DeleteNeighbor(vtep.AsSlice(), peerMac, osl.WithLinkName(s.vxlanName)); err != nil {
|
if err := sbox.DeleteNeighbor(vtep.AsSlice(), peerMac, osl.WithLinkName(s.vxlanName), osl.WithFamily(syscall.AF_BRIDGE)); err != nil {
|
||||||
if _, ok := err.(osl.NeighborSearchError); ok && dbEntries > 0 {
|
if _, ok := err.(osl.NeighborSearchError); ok && dbEntries > 0 {
|
||||||
// We fall in here if there is a transient state and if the neighbor that is being deleted
|
// We fall in here if there is a transient state and if the neighbor that is being deleted
|
||||||
// was never been configured into the kernel (we allow only 1 configuration at the time per <ip,mac> mapping)
|
// was never been configured into the kernel (we allow only 1 configuration at the time per <ip,mac> mapping)
|
||||||
@@ -316,7 +316,7 @@ func (d *driver) peerDeleteOp(nid, eid string, peerIP netip.Prefix, peerMac net.
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete neighbor entry for the peer IP
|
// Delete neighbor entry for the peer IP
|
||||||
if err := sbox.DeleteNeighbor(peerIP.Addr().AsSlice(), peerMac, osl.WithLinkName(s.vxlanName), osl.WithFamily(syscall.AF_BRIDGE)); err != nil {
|
if err := sbox.DeleteNeighbor(peerIP.Addr().AsSlice(), peerMac, osl.WithLinkName(s.vxlanName)); err != nil {
|
||||||
return fmt.Errorf("could not delete neighbor entry for nid:%s eid:%s into the sandbox:%v", nid, eid, err)
|
return fmt.Errorf("could not delete neighbor entry for nid:%s eid:%s into the sandbox:%v", nid, eid, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user