Skip to content

Commit

Permalink
libmultipath: pgcmp(): compare number of paths
Browse files Browse the repository at this point in the history
pathcmp() makes sure that all paths in pgp have a match in cpgp, but not
vice-versa. Check the number of paths, too.

Fixes: 90773ba ("libmultipath: resolve hash collisions in pgcmp()")
Signed-off-by: Martin Wilck <[email protected]>
  • Loading branch information
mwilck committed Nov 25, 2024
1 parent ec83f4b commit 0ca2e61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libmultipath/configure.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ pgcmp (struct multipath * mpp, struct multipath * cmpp)

vector_foreach_slot (cmpp->pg, cpgp, j) {
if (pgp->id == cpgp->id &&
VECTOR_SIZE(pgp->paths) == VECTOR_SIZE(cpgp->paths) &&
!pathcmp(pgp, cpgp)) {
r = 0;
break;
Expand Down

0 comments on commit 0ca2e61

Please sign in to comment.