Skip to content

Commit

Permalink
feat(pool): add check for describe secondary ip
Browse files Browse the repository at this point in the history
  • Loading branch information
fioncat committed Jun 12, 2024
1 parent 2ed071c commit a3c5c35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/ipamd/uapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,10 @@ func (s *ipamServer) checkSecondaryIpExist(ip, mac string) (bool, error) {
ulog.Errorf("DescribeSecondaryIp %s error: %v, request id %s", ip, err, resp.GetRequestUUID())
return false, err
}
if len(resp.DataSet) > 0 {
return true, nil
for _, data := range resp.DataSet {
if data.Ip == ip {
return true, nil
}
}
return false, nil
}
Expand Down

0 comments on commit a3c5c35

Please sign in to comment.