Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#2757 closed defect (fixed)

Bug: Duplicate call to connection_mark_for_close

Reported by: tornewbie Owned by: nickm
Priority: Medium Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Debian SID , x86 machine

Tor 0.2.3.0-alpha-dev (git-d52a99dc77dc7700)
OpenSSL 1.0.0c ( experimental )
libevent 2.0.10 ( experimental )

Self compiled , shared libraries , tor running as a client only.

I found this warnings in tor logs :

[warn] Rejecting request for anonymous connection to private address [scrubbed] on a TransPort or NATDPort. Possible loop in your NAT rules?
[warn] Bug: Duplicate call to connection_mark_for_close at connection.c:1225 (first at connection_edge.c:1680)

The first warn is pretty normal because I was running tor as a
transparent proxy for a single user on a single machine in my local
net and I was connected to it by ssh with X forwarding : of course
tor refused to forward X protocol ( indeed , I have a specific iptables rule for permitting that , which I forgot to set in this case) but the call for closing the connection is duplicated/redundant.

Child Tickets

Change History (8)

comment:1 Changed 8 years ago by arma

Looks like a duplicate of #2279.

Except, you seem to be running a git version from after #2279 thinks it solved it?

comment:2 Changed 8 years ago by nickm

Owner: set to nickm
Status: newassigned

oho, except that there was a bug in the #2279 fix, it seems:

  if (connection_init_accepted_conn(newconn, conn->type) < 0) {
    if (! conn->marked_for_close)
      connection_mark_for_close(newconn);
    return 0;
  }

One of these conns is not like the others...

(writing patch now)

comment:3 Changed 8 years ago by nickm

Milestone: Tor: 0.2.2.x-final
Status: assignedneeds_review

see branch bug2757 in my public repository.

comment:4 in reply to:  3 Changed 8 years ago by tornewbie

Replying to nickm:

see branch bug2757 in my public repository.

Your patch fixed the issue ( for me at least )

comment:5 Changed 8 years ago by arma

Looks ok to me. (This time for sure!)

comment:6 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged with gusto. thanks!

("Oh, that trick never works!")

comment:7 Changed 7 years ago by nickm

Keywords: tor-client added

comment:8 Changed 7 years ago by nickm

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