mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Fix panic of DeleteRoute()
Fix #48800 It should be 'addr_pairs', not 'routes'.
This commit is contained in:
@@ -262,8 +262,8 @@ func (r *Routes) DeleteRoute(clusterName string, route *cloudprovider.Route) err
|
|||||||
|
|
||||||
if index != -1 {
|
if index != -1 {
|
||||||
// Delete element `index`
|
// Delete element `index`
|
||||||
addr_pairs[index] = addr_pairs[len(routes)-1]
|
addr_pairs[index] = addr_pairs[len(addr_pairs)-1]
|
||||||
addr_pairs = addr_pairs[:len(routes)-1]
|
addr_pairs = addr_pairs[:len(addr_pairs)-1]
|
||||||
|
|
||||||
unwind, err := updateAllowedAddressPairs(r.network, &port, addr_pairs)
|
unwind, err := updateAllowedAddressPairs(r.network, &port, addr_pairs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user