<html>
    <head>
      <base href="https://bugs.dpdk.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8" class="bz_new_table">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - rte_ipv6_addr_is_v4mapped wrong logic"
   href="https://bugs.dpdk.org/show_bug.cgi?id=1664">1664</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>rte_ipv6_addr_is_v4mapped wrong logic
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DPDK
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ethdev
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dev@dpdk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sunnylandh@gmail.com
          </td>
        </tr>

        <tr>
          <th>Target Milestone</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div class="bz_comment_block">
          <pre class="bz_comment_text">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.
<a href="https://git.dpdk.org/dpdk/tree/lib/net/rte_ip6.h?id=fba9875559906e04eaeb74532f4cfd51194259a2#n313">https://git.dpdk.org/dpdk/tree/lib/net/rte_ip6.h?id=fba9875559906e04eaeb74532f4cfd51194259a2#n313</a>

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.
          </pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
      <div itemscope itemtype="http://schema.org/EmailMessage">
        <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
          
          <link itemprop="url" href="https://bugs.dpdk.org/show_bug.cgi?id=1664">
          <meta itemprop="name" content="View bug">
        </div>
        <meta itemprop="description" content="Bugzilla bug update notification">
      </div>
    </body>
</html>