[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [or-cvs] r17790: {tor} Refactor tor_addr_t manipulation functions so that as few as (tor/trunk/src/common)



On Fri, Dec 26, 2008 at 1:26 PM,  <nickm@xxxxxxxx> wrote:
>...
>       } else if (ent->h_addrtype == AF_INET6) {
> -        memcpy(&addr->addr.in6_addr, ent->h_addr, sizeof(struct in6_addr));
> +        tor_addr_from_in(addr, (struct in6_addr*) ent->h_addr);

hi nick, a slight typo.  this should be tor_addr_from_in6:
diff -Naur orig-tor/src/common/address.c mod-tor/src/common/address.c
--- orig-tor/src/common/address.c	2008-12-26 21:26:05.484122000 +0000
+++ mod-tor/src/common/address.c	2008-12-27 05:03:31.497964848 +0000
@@ -225,7 +225,7 @@
       if (ent->h_addrtype == AF_INET) {
         tor_addr_from_in(addr, (struct in_addr*) ent->h_addr);
       } else if (ent->h_addrtype == AF_INET6) {
-        tor_addr_from_in(addr, (struct in6_addr*) ent->h_addr);
+        tor_addr_from_in6(addr, (struct in6_addr*) ent->h_addr);
       } else {
         tor_assert(0); /* gethostbyname() returned a bizarre addrtype */
       }