[tor-bugs] #1900 [Tor Client]: Create tor-fw-helper.c

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Sep 29 23:06:32 UTC 2010


#1900: Create tor-fw-helper.c
-------------------------+--------------------------------------------------
 Reporter:  ioerror      |       Owner:                     
     Type:  enhancement  |      Status:  needs_review       
 Priority:  normal       |   Milestone:  Deliverable-Sep2010
Component:  Tor Client   |     Version:  Tor: unspecified   
 Keywords:  natpmp upnp  |      Parent:  #1775              
-------------------------+--------------------------------------------------

Comment(by ioerror):

 Things left to do from your code review:
  1. ''Throughout the C: This needs to get ported to windows.''
  2. ''Throughout the C: Functions, structures, and structure members
 should get documented. Without documentation, it is hard to infer intent,
 and so is difficult to see whether behavior matches intent.''
  3. ''In tor_natpmp_add_tcp_mapping, and anywhere else you use select():
 unix fd_set uses a fixed-width bitfield internally. If you are going to do
 an FD_SET to manipulate it, you MUST first make sure that natpmp.s is les
 than FD_SETSIZE, or you will trash the stack.''
  4. ''In tor-fw-helper-upnp.c:
 All the UPNP_ERR_* defines seem to be potentially returnable to code
 outside of tor-fw-helper.c. Does that mean they should move into the
 header so that the caller can know which error they got?''
  5. ''In tor-fw-helper-natpmp.c:
 Probably there should be a function to make NATPMP_* errors into strings.
 You will not enjoy a future of debugging users who come up to you saying,
 "I got this log message saying E: readnatpmpresponseorretry failed -93".''

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1900#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list