Skip to content

Commit

Permalink
modify ipam v6 release ip problem
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Mar 3, 2022
1 parent 89aa241 commit 2183778
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ipam/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,10 @@ func (subnet *Subnet) releaseAddr(podName, nicName string) {
}
}
if ip, ok = subnet.V6NicToIP[nicName]; ok {
oldPods := strings.Split(subnet.V4IPToPod[ip], ",")
oldPods := strings.Split(subnet.V6IPToPod[ip], ",")
if len(oldPods) > 1 {
newPods := util.RemoveString(oldPods, podName)
subnet.V4IPToPod[ip] = strings.Join(newPods, ",")
subnet.V6IPToPod[ip] = strings.Join(newPods, ",")
} else {
delete(subnet.V6NicToIP, nicName)
delete(subnet.V6IPToPod, ip)
Expand Down

0 comments on commit 2183778

Please sign in to comment.