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

Re: [tor-bugs] #4645 [Tor]: Deprecate and remove is_internal_IP



#4645: Deprecate and remove is_internal_IP
-------------------------+--------------------------------
     Reporter:  rransom  |      Owner:
         Type:  defect   |     Status:  needs_revision
     Priority:  normal   |  Milestone:  Tor: 0.2.5.x-final
    Component:  Tor      |    Version:
   Resolution:           |   Keywords:  easy tor-client
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+--------------------------------
Changes (by nickm):

 * status:  needs_review => needs_revision
 * milestone:  Tor: unspecified => Tor: 0.2.5.x-final


Comment:

 Thanks!  This needs some tweaks to be mergeable.

 First, use tor_addr_from_ipv4n() or tor_addr_from_ipv4h() as appropriate
 to set up a tor_addr_t  from a 32-bit IPv4 address.  Use
 tor_addr_from_in() to set up a tor_addr_t from a struct in_addr.

 Second, make sure that the patch builds when "--enable-gcc-warnings" has
 been passed on the command line.  That tells the compiler to enforce some
 style and correctness checks that we try to make our code follow.

 Third, the directory.c change seems weird, given how it converts the
 string to a 'struct in_addr' and then converts the 'struct in_addr' into a
 tor_addr_t.  Why not use an appropriate conversion function to convert the
 string to a tor_addr_t directly, if that's the type we want?

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4645#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs