Commit Graph

125 Commits

Author SHA1 Message Date
Nick Mathewson
94507f1b6d Fix bug in recent address.c patch: actually set the value of address * to 0.0.0.0 as we did before. This makes CMP_EXACT comparisons with bitmask 0 work on address * again.
svn:r17801
2008-12-29 01:30:35 +00:00
Nick Mathewson
ccda4e481c Fix compilation under gethostbyname-based systems.
svn:r17800
2008-12-27 15:46:16 +00:00
Nick Mathewson
374c1e979f Refactor tor_addr_t manipulation functions so that as few as possible look at the tor_addr_t representation.
svn:r17790
2008-12-26 21:26:05 +00:00
Nick Mathewson
616f6643ef get_interface_addr6(), and by extension get_interface_addr(), were pretty borked. Copying a tor_addr_t from a sockaddr_storage using memcpy is a poor notion.
svn:r17789
2008-12-26 21:26:03 +00:00
Nick Mathewson
61722638ea Refactor tor_addr_compare_masked() so that CMP_SEMANTIC makes more sense, and has decent semantics for maskbits; and so that CMP_EXACT works right for bits==0.
svn:r17788
2008-12-26 20:37:18 +00:00
Roger Dingledine
a12c3f2c86 some fixes i found in my sandbox
svn:r17771
2008-12-25 15:37:47 +00:00
Nick Mathewson
d7f55dafe0 Properly zero-out addresses when setting them. Probably this was not hurting anything.
svn:r17749
2008-12-23 14:21:34 +00:00
Nick Mathewson
55348884b5 Fix all of the doxygen warnings not pertaining to missing documentation.
svn:r17727
2008-12-22 14:56:16 +00:00
Nick Mathewson
029be5ad02 Move in-addr.arpa parsing and generation into address.c, and simplify the code that does it elsewhere. Incidentally, this lets exit servers answer requests for ip6.arpa addresses.
svn:r17707
2008-12-19 18:52:00 +00:00
Nick Mathewson
122170c1d3 Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this patch.
svn:r17686
2008-12-18 16:11:24 +00:00
Nick Mathewson
6693f32530 Resolve many DOCDOCs.
svn:r17662
2008-12-17 22:58:20 +00:00
Nick Mathewson
361086005c Fix a possible negative shift in address comparison. May fix bug 845 and bug 811
svn:r17169
2008-10-29 13:29:54 +00:00
Roger Dingledine
982a22a121 fix typo
svn:r16949
2008-09-24 00:49:29 +00:00
Nick Mathewson
c33dde4ac1 Fix mingw build with --enable-gcc-warnings set.
svn:r16759
2008-09-04 21:58:09 +00:00
Nick Mathewson
fa2f72ded7 An asterisk makes a difference sometimes. Fixes bug 809.
svn:r16758
2008-09-04 20:42:02 +00:00
Roger Dingledine
04eded4a5c take out a line that i think is extraneous. come on, what could
go wrong?


svn:r16714
2008-09-01 08:01:40 +00:00
Nick Mathewson
f6879caa04 Try once again to make BSD compilation happy.
svn:r16474
2008-08-08 12:58:17 +00:00
Nick Mathewson
d9601c65e0 r17666@tombo: nickm | 2008-08-07 15:12:30 -0400
Make tor_addr_from_sockaddr also give away the port in a useful format


svn:r16458
2008-08-07 19:13:35 +00:00
Nick Mathewson
645cbd690b r17643@31-33-44: nickm | 2008-08-05 16:18:25 -0400
Oops.  Remove code to set (nonportable) sin_len fields.  Added it to try to fix a bug that turned out to be something else.


svn:r16436
2008-08-05 20:18:28 +00:00
Nick Mathewson
960a0f0a99 r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400
Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types.  Most of the Tor wire formats using these new types are in, but the code to generate and use it is not.  This is a big patch.  Let me know what it breaks for you.


svn:r16435
2008-08-05 20:08:19 +00:00
Karsten Loesing
626fafe563 Make compiler with GCC warnings enabled happy.
svn:r16300
2008-07-31 10:33:02 +00:00
Nick Mathewson
e5bc5f11b8 r17434@tombo: nickm | 2008-07-29 10:58:36 -0400
Refactor tor_addr_from_string: it didnt need most of parse_addr_mask_port_range, and its dependence on that latter function made it less flexible.


svn:r16255
2008-07-30 13:04:26 +00:00
Nick Mathewson
507b01357a r17426@tombo: nickm | 2008-07-28 20:34:03 -0400
More test coverage for tor_addr_t; fix a couple of bugs.


svn:r16234
2008-07-29 00:34:50 +00:00
Nick Mathewson
056d97da0c r17391@pc-10-8-1-079: nickm | 2008-07-25 17:11:17 +0200
Tor_addr_compare did a semantic comparison, such that ::1.2.3.4 and 1.2.3.4 were "equal".  we sometimes need an exact comparison.  Add a feature to do that.


svn:r16210
2008-07-25 15:11:21 +00:00
Nick Mathewson
9da0482007 r17358@pc-10-8-1-079: nickm | 2008-07-25 16:41:03 +0200
Split out the address manipulation functions from compat and util: they were about 21% of the total of those, and spread out too much.


svn:r16208
2008-07-25 14:43:24 +00:00