Skip to content

Commit

Permalink
Merge pull request #989 from bzsuni/fix/ipv6-allocation
Browse files Browse the repository at this point in the history
Fix IP repetition when testing IPv6 allocation
  • Loading branch information
weizhoublue authored Nov 17, 2023
2 parents d29fe3a + 616100d commit 88ea483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/egressgateway/egress_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ func setEipStatus(ipv4, ipv6 string, nodeName string, policy egress.Policy, node
newEipStatus := egress.EgressIPStatus{}

for _, eip := range eipStatus.Eips {
if ipv4 == eip.IPv4 {
if (len(ipv4) != 0 && ipv4 == eip.IPv4) || (len(ipv6) != 0 && ipv6 == eip.IPv6) {
eip.Policies = append(eip.Policies, policy)

isExist = true
Expand Down

0 comments on commit 88ea483

Please sign in to comment.