rte_ipv6_addr_is_v4mapped wrong logic
https://bugs.dpdk.org/show_bug.cgi?id=1664
Bug ID: 1664
Summary: rte_ipv6_addr_is_v4mapped wrong logic
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
rte_ipv6_addr_is_v4mapped() is implemented by comparing the first 32 bits of an IPv6 address with the ::ffff:0.0.0.0/96 prefix.
https://git.dpdk.org/dpdk/tree/lib/net/rte_ip6.h?id=fba9875559906e04eaeb74532f4cfd51194259a2#n313
The following snippet prints "1", but the loopback address is not a v4mapped address.
#include <stdio.h>
#include <rte_ip6.h>
int main() {
struct rte_ipv6_addr a = RTE_IPV6_ADDR_LOOPBACK; printf("%d\n", rte_ipv6_addr_is_v4mapped(&a));
}
The function should compare the first 96 bits instead.
rte_ipv6_addr_is_v4compat() has the same mistake.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
https://bugs.dpdk.org/show_bug.cgi?id=1664
David Marchand ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
CC| |[email protected]
Status|IN_PROGRESS |RESOLVED--- Comment #3 from David Marchand ([email protected]) --- Fixed in commit bd221bea7080 ("net: fix IPv6 check for IPv4 compat").
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.