Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-13 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:  fixed
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:  dgoulet  |Sponsor:
-+-

Comment (by nickm):

 To give my rationale for making the AF_UNSPEC change: I think it's
 harmless to have AF_UNSPEC be a constant in the current usage, but it's
 fragile.  When we promise a keyed hash, we ought to implement one, or we
 might find ourselves surprised later on.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-12 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:  fixed
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:  dgoulet  |Sponsor:
-+-
Changes (by dgoulet):

 * status:  needs_revision => closed
 * resolution:   => fixed


Comment:

 nickm just fixed both above in `nickm/ticket24902_029_05`.

 I've pushed those two commits in my `ticket24902_029_05` branch.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-12 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:
 |  needs_revision
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:  dgoulet  |Sponsor:
-+-

Comment (by dgoulet):

 Replying to [comment:7 teor]:
 > Also, if we ever store an AF_UNSPEC address, these lines should probably
 hash the constant:
 > {{{
 >   case AF_UNSPEC:
 > return 0x4e4d5342;
 > }}}
 >
 > For consistency, we should hash the constant in both the keyed and
 unkeyed versions of the function.

 Not sure here... First, I don't think it should ever be called with
 `AF_UNSPEC` but apart from that, imo we want to save CPU cycles as much as
 possible since this is called very very often. Hashing a constant value
 will just make us be less efficient without any gain. I would probably go
 for a comment explaining why we do return that value or wrap it in some
 macro with a semantic that describes it as a "hash value".

 And I believe the goal behind having a constant value for the `AF_UNSPEC`
 here is that if we ever store one or a billion, the function is to return
 *quickly* "yes we do have an unspecified address". I honestly don't see a
 use case for that apart from very efficiently ignoring any of them if they
 ever go through that function.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-09 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:
 |  needs_revision
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:  dgoulet  |Sponsor:
-+-

Comment (by teor):

 Also, if we ever store an AF_UNSPEC address, these lines should probably
 hash the constant:
 {{{
   case AF_UNSPEC:
 return 0x4e4d5342;
 }}}

 For consistency, we should hash the constant in both the keyed and unkeyed
 versions of the function.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-09 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:
 |  needs_revision
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:  dgoulet  |Sponsor:
-+-
Changes (by teor):

 * status:  reopened => needs_revision


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-09 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:
 |  reopened
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:  dgoulet  |Sponsor:
-+-
Changes (by teor):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 There's a comment typo in address_set.c:
 {{{
 since we split the siphash outcome two 32-bit values
 }}}
 {{{
 since we split the siphash outcome into two 32-bit values
 }}}

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-09 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:  fixed
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:  dgoulet  |Sponsor:
-+-
Changes (by dgoulet):

 * status:  accepted => closed
 * reviewer:   => dgoulet
 * resolution:   => fixed


Comment:

 Merged into master. Will be backported through #24902.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-08 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  dgoulet
 Type:  defect   | Status:
 |  accepted
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by dgoulet):

 * status:  needs_review => accepted
 * owner:  nickm => dgoulet


Comment:

 Got a `lgtm` by nickm on IRC.

 So we'll make this part of #24902 so this is now merged in branch
 `ticket24902_029_05`.

 Going back in `accepted` and we'll close it once #24902 is closed and
 backported.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-08 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  nickm
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by dgoulet):

 * status:  assigned => needs_review


Comment:

 I've written unit tests for both using `address_set_t` and the integration
 with the nodelist.

 Quick thing though, I've renamed `addressset.c` to `address_set.c` because
 that triple 's' was kind of intense and difficult to brain-parse on what
 it is exactly. Furthermore, the namespace for this file is `address_set_*`
 so that just makes sense I think.

 Branch: `ticket25183_029_01`

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25183 [Core Tor/Tor]: Implement a way to tell if an IP address is a known relay

2018-02-08 Thread Tor Bug Tracker & Wiki
#25183: Implement a way to tell if an IP address is a known relay
-+-
 Reporter:  dgoulet  |  Owner:  nickm
 Type:  defect   | Status:
 |  assigned
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay, tor-dos, 029-backport,|  Actual Points:
  031-backport, 032-backport |
Parent ID:  #24902   | Points:
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 I've added some "is this a known relay" code to that branch too.  Still
 needs tests though; dgoulet has offered to write them.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs