Merge pull request #50703 from thaJeztah/libnet_fix_delete

daemon/libnet/drv/bridge: stubPortMapper.UnmapPorts: fix slices.Delete
This commit is contained in:
Sebastiaan van Stijn
2025-08-12 11:34:59 +02:00
committed by GitHub

View File

@@ -1015,7 +1015,7 @@ func (pm *stubPortMapper) UnmapPorts(_ context.Context, reqs []portmapperapi.Por
if idx == -1 {
return fmt.Errorf("stubPortMapper.UnmapPorts: pb doesn't exist %v", req)
}
pm.mapped = slices.Delete(pm.mapped, idx, idx)
pm.mapped = slices.Delete(pm.mapped, idx, idx+1)
}
return nil
}