You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
424 B

  1. --- a/addrmap.c
  2. +++ b/addrmap.c
  3. @@ -44,7 +44,9 @@ int validate_ip4_addr(const struct in_ad
  4. int validate_ip6_addr(const struct in6_addr *a)
  5. {
  6. /* Well-known prefix for NAT64 */
  7. - if (a->s6_addr32[0] == WKPF && !a->s6_addr32[1] && !a->s6_addr32[2])
  8. + if (a->s6_addr32[0] == WKPF &&
  9. + (!a->s6_addr32[1] || (a->s6_addr16[2] == htonl(0x0001)))
  10. + && !a->s6_addr32[2])
  11. return 0;
  12. /* Reserved per RFC 2373 */