diff options
| author | Eric Dumazet <[email protected]> | 2023-08-02 13:14:55 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-08-03 17:58:24 +0000 |
| commit | e6638094d7af6c7b9dcca05ad009e79e31b4f670 (patch) | |
| tree | 1a31f498654408e4f1ed2928a39890a68500f397 /rust/helpers.c | |
| parent | prestera: fix fallback to previous version on same major version (diff) | |
| download | kernel-e6638094d7af6c7b9dcca05ad009e79e31b4f670.tar.gz kernel-e6638094d7af6c7b9dcca05ad009e79e31b4f670.zip | |
tcp_metrics: fix addr_same() helper
Because v4 and v6 families use separate inetpeer trees (respectively
net->ipv4.peers and net->ipv6.peers), inetpeer_addr_cmp(a, b) assumes
a & b share the same family.
tcp_metrics use a common hash table, where entries can have different
families.
We must therefore make sure to not call inetpeer_addr_cmp()
if the families do not match.
Fixes: d39d14ffa24c ("net: Add helper function to compare inetpeer addresses")
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions
