Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit d1ea33c

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request #48801 from FengyunPan/fix-panic
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243) Fix panic of DeleteRoute() Fix #48800 It should be 'addr_pairs', not 'routes'. **Release note**: ```release-note NONE ```
2 parents ee69d22 + b336ef0 commit d1ea33c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/cloudprovider/providers/openstack/openstack_routes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ func (r *Routes) DeleteRoute(clusterName string, route *cloudprovider.Route) err
262262

263263
if index != -1 {
264264
// Delete element `index`
265-
addr_pairs[index] = addr_pairs[len(routes)-1]
266-
addr_pairs = addr_pairs[:len(routes)-1]
265+
addr_pairs[index] = addr_pairs[len(addr_pairs)-1]
266+
addr_pairs = addr_pairs[:len(addr_pairs)-1]
267267

268268
unwind, err := updateAllowedAddressPairs(r.network, &port, addr_pairs)
269269
if err != nil {

0 commit comments

Comments
 (0)