Opened 4 years ago

Closed 4 years ago

#20163 closed defect (fixed)

Keep the interface address order returned by the OS

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Normal Keywords: 029-proposed easy intro
Cc: Actual Points:
Parent ID: Points: 0.1
Reviewer: Sponsor:


#17027 unintentionally reorders interface addresses, by using SMARTLIST_DEL_CURRENT() in get_interface_address6_list() to delete unsuitable addresses, rather than SMARTLIST_DEL_CURRENT_KEEPORDER().

This makes address selection unstable, because it depends on not only the exact order in which the OS returns addresses, but the exact number of unsuitable addresses as well.

Child Tickets

Attachments (1)

0001-Avoid-reordering-IPv6-interface-addresses.patch (1.3 KB) - added by cypherpunks 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by nickm

Keywords: easy intro added

I can take a patch for this in 029 if somebody writes one on time.

comment:2 Changed 4 years ago by teor

This issue was reported by René Mayrhofer.

comment:3 Changed 4 years ago by teor

(Hmm, do we do unicode in our changelogs? Otherwise it's going to be hard to credit René without a misspelling.)

comment:4 Changed 4 years ago by nickm

UTF-8 unicode is fine.

Changed 4 years ago by cypherpunks

comment:5 Changed 4 years ago by cypherpunks

Here is a patch that I believe should work, but I would appreciate some additional testing.

comment:6 Changed 4 years ago by nickm

Milestone: Tor: 0.2.???Tor: 0.2.9.x-final
Status: newneeds_review

comment:7 Changed 4 years ago by teor

Status: needs_reviewmerge_ready

This looks fine to merge, it needs a changes file that says something like:

Stop reordering IP addresses returned by the OS.
This makes is more likely that Tor will guess the same relay IP address every time.
Fixes issue 20163; bugfix on, ticket 17027.
Reported by René Mayrhofer, patch by "cypherpunks".

comment:8 Changed 4 years ago by nickm

merging, with copy-pasted changes file.

comment:9 Changed 4 years ago by nickm

Resolution: fixed
Status: merge_readyclosed

(also, thanks!)

Note: See TracTickets for help on using tickets.