[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)
- To: or-dev@xxxxxxxxxxxxx
- Subject: Re: [or-cvs] r17790: {tor} Refactor tor_addr_t manipulation functions so that as few as (tor/trunk/src/common)
- From: coderman <coderman@xxxxxxxxx>
- Date: Fri, 26 Dec 2008 21:09:05 -0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: or-dev-outgoing@xxxxxxxx
- Delivered-to: or-dev@xxxxxxxx
- Delivery-date: Sat, 27 Dec 2008 00:09:11 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=vb87BD7CPhqjuTGeFPZMXjtweAGK7tjDlpIDQRv/VGw=; b=xJ4XQY42RDp8CjaL0MRihL3G/BRescpvkgRTmcCyctP81B/WdjF0J04KOCjeURcjRq ZzNmM1EU+SjokwIgrIcgYZBMZ447OyUqW5Vn51OhE8sXpADqdm5F000WLLONUh99fzdh s+i7+YH36wpxLecHAV/nDpZdKbaFyrovJm3dM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=MBUgqMbtKnVEN+e48mVVtr7WSkZXUpNFfU52Dgty7bMzL5N7GnSEuwH4OWlAMO3vrh C0I4sQFjc3PVzwgxyr+1rD1xVNHODFeyiczep79DdZU9Rtg82VCjphzhjLtLCzMaZyFq rL36AOw98lMhLl9lnBIXIHWKXbFaKd3ViuGEI=
- In-reply-to: <20081226212605.EBC6F140AC21@xxxxxxxxxxxxxx>
- References: <20081226212605.EBC6F140AC21@xxxxxxxxxxxxxx>
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-dev@xxxxxxxxxxxxx
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 */
}