Attention is currently required from: Frank Filz.
Lior Suliman would like Frank Filz to review this change.
network: unify ipv4 and ipv6-mapped address handling
Fix sockaddr comparison and hashing to treat native IPv4 addresses
and their IPv6-mapped counterparts as identical logical endpoints.
Previously, comparing native IPv4 and IPv6-mapped addresses could
yield inconsistent ordering, breaking sorted structures like AVL trees.
The comparison logic now normalizes both addresses to a consistent
format before evaluation to ensure a strict weak ordering.
Additionally, update the hashing function to return identical keys
for IPv4 and equivalent mapped IPv6 addresses, preventing duplicate
entries in hash-based data structures.
Change-Id: I90966c115da059087da5cdeb4ed7b5c1be45dd54
Signed-off-by: Lior Suliman <liorsu@gmail.com>
---
M src/include/ip_utils.h
M src/support/ip_utils.c
2 files changed, 74 insertions(+), 34 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/29/1235929/1
To view, visit change 1235929. To unsubscribe, or for help writing mail filters, visit settings.