Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#2030 closed defect (fixed)

Make tor_check_port_forwarding more generic

Reported by: sjmurdoch Owned by: sjmurdoch
Priority: Low Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: #1775 Points:
Reviewer: Sponsor:


tor_check_port_forwarding() in util.c contains both code specific to tor-fw-helper as well as generic code for launching a child process. It might be useful to make this more generic so it could be used for launching other processes.

On this topic, in bug #1903, nickm said:

It seems that the code here does two things: one is a general task "Launch a
child process and see what it says" and another is a more specific task
"Launch a tor-fw-helper instance and act based on its output.)" It might be a
good idea to disentangle these eventually, in case we ever want to launch
anything else.

It might be cleaner to move the static variables from
tor_check_port_forwarding into some kind of struct, in case we ever want to
launch two things in the future.

Child Tickets

Change History (6)

comment:1 Changed 9 years ago by nickm

Another reason to to this is to be more testable. It's easier to test a generic "launch a program and see what it says" function than one the expects to get output in a particular format and act on it in particular ways.

comment:2 Changed 9 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:3 Changed 8 years ago by sjmurdoch

Nick, would you say that the patches for #1983 resolve this bug too?

comment:4 Changed 8 years ago by nickm

Resolution: fixed
Status: newclosed

I think so. Closing this.

comment:5 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:6 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.