forked from TrueCloudLab/frostfs-node
[#1125] objectSvc: Add EC header APE check
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
368218f0cc
commit
0144117cc9
6 changed files with 272 additions and 23 deletions
|
@ -122,7 +122,7 @@ func (c SenderClassifier) isContainerKey(
|
|||
return false, err
|
||||
}
|
||||
|
||||
in, err := lookupKeyInContainer(nm, owner, idCnr, cnr)
|
||||
in, err := LookupKeyInContainer(nm, owner, idCnr, cnr)
|
||||
if err != nil {
|
||||
return false, err
|
||||
} else if in {
|
||||
|
@ -136,12 +136,12 @@ func (c SenderClassifier) isContainerKey(
|
|||
return false, err
|
||||
}
|
||||
|
||||
return lookupKeyInContainer(nm, owner, idCnr, cnr)
|
||||
return LookupKeyInContainer(nm, owner, idCnr, cnr)
|
||||
}
|
||||
|
||||
func lookupKeyInContainer(
|
||||
func LookupKeyInContainer(
|
||||
nm *netmap.NetMap,
|
||||
owner, idCnr []byte,
|
||||
pkey, idCnr []byte,
|
||||
cnr container.Container,
|
||||
) (bool, error) {
|
||||
cnrVectors, err := nm.ContainerNodes(cnr.PlacementPolicy(), idCnr)
|
||||
|
@ -151,7 +151,7 @@ func lookupKeyInContainer(
|
|||
|
||||
for i := range cnrVectors {
|
||||
for j := range cnrVectors[i] {
|
||||
if bytes.Equal(cnrVectors[i][j].PublicKey(), owner) {
|
||||
if bytes.Equal(cnrVectors[i][j].PublicKey(), pkey) {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue