--- rfc1035/rfc1035.h.orig Mon Aug 5 12:14:39 2002 +++ rfc1035/rfc1035.h Sat Aug 3 21:07:42 2002 @@ -514,6 +514,12 @@ #define RFC1035_NTOABUFSIZE 16 #endif +/* sin6_scope_id (RFC2553) by NISHI Takao */ +#if RFC1035_IPV6 +#define HAVE_SIN6_SCOPE_ID 1 +#define SIZEOF_SIN6_SCOPE_ID sizeof(uint32_t) +#endif + void rfc1035_ntoa(const RFC1035_ADDR *, char *); int rfc1035_aton(const char *, RFC1035_ADDR *); --- rfc1035/rfc1035sockaddrip.c.orig Mon Aug 5 12:15:12 2002 +++ rfc1035/rfc1035sockaddrip.c Mon Aug 5 12:41:34 2002 @@ -34,7 +34,13 @@ if ( af == AF_INET6 ) { - if (al >= sizeof(struct sockaddr_in6)) + if ((al == sizeof(struct sockaddr_in6))|| +#if HAVE_SIN6_SCOPE_ID + (al == sizeof(struct sockaddr_in6)-SIZEOF_SIN6_SCOPE_ID) +#else + (al == sizeof(struct sockaddr_in6)+SIZEOF_SIN6_SCOPE_ID) +#endif + ) { *ip=((const struct sockaddr_in6 *)a)->sin6_addr; return (0); --- rfc1035/rfc1035sockaddrport.c.orig Mon Aug 5 12:15:36 2002 +++ rfc1035/rfc1035sockaddrport.c Mon Aug 5 12:45:09 2002 @@ -28,7 +28,13 @@ if ( af == AF_INET6 ) { - if (al >= sizeof(struct sockaddr_in6)) + if ((al == sizeof(struct sockaddr_in6))|| +#if HAVE_SIN6_SCOPE_ID + (al == sizeof(struct sockaddr_in6)-SIZEOF_SIN6_SCOPE_ID) +#else + (al == sizeof(struct sockaddr_in6)+SIZEOF_SIN6_SCOPE_ID) +#endif + ) { *port=((const struct sockaddr_in6 *)a)->sin6_port; return (0);