Opened 4 years ago

Closed 4 years ago

#18065 closed defect (worksforme)

arm can't handle v6 addresses

Reported by: cimnine Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Nyx Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When I tried to use arm with my configuration, which contains IPv6 addresses in the ExitPolicy, it fails to start:

Traceback (most recent call last):
  File "/usr/share/arm/starter.py", line 534, in <module>
    controller.init(conn)
  File "/usr/share/arm/util/torTools.py", line 670, in init
    self._exitPolicyChecker = self.getExitPolicy()
  File "/usr/share/arm/util/torTools.py", line 1345, in getExitPolicy
    result = ExitPolicy(entry, result)
  File "/usr/share/arm/util/torTools.py", line 2611, in __init__
    self.ipAddressBin += "".join([str((int(octet) >> y) & 1) for y in range(7, -1, -1)])
ValueError: invalid literal for int() with base 10: '[2002'

$ arm -v
arm version 1.4.5.0 (released April 28, 2012)

Child Tickets

Change History (8)

comment:1 Changed 4 years ago by gk

Component: - Select a componentNyx
Owner: set to atagar

comment:2 Changed 4 years ago by ohheyalan@…

Here is what I'm getting when I try to launch Arm:

sudo -u debian-tor arm

And it returns

Traceback (most recent call last):
  File "/usr/share/arm/starter.py", line 534, in <module>
    controller.init(conn)
  File "/usr/share/arm/util/torTools.py", line 670, in init
    self._exitPolicyChecker = self.getExitPolicy()
  File "/usr/share/arm/util/torTools.py", line 1345, in getExitPolicy
    result = ExitPolicy(entry, result)
  File "/usr/share/arm/util/torTools.py", line 2611, in __init__
    self.ipAddressBin += "".join([str((int(octet) >> y) & 1) for y in range(7, -1, -1)])
ValueError: invalid literal for int() with base 10: '*4'

Is there a known solution?

Last edited 4 years ago by ohheyalan@… (previous) (diff)

comment:3 Changed 4 years ago by cypherpunks

last month there were a few ipv6-related patches

not sure if they'll fix your problem but maybe you should try a non-archaic version anyway ;-)

https://gitweb.torproject.org/nyx.git

the project was even renamed (twice i think) around a year ago, it's called nyx now, a name much harder to type in qwerty, thanks atagar! -_-

anyway, you should probably pester atagar to make a release soon; if you do, tell him he's a lame sedder, his regex was case sensitive and left a bunch of "Arm" unchanged, silly person...

comment:4 Changed 4 years ago by atagar

if you do, tell him he's a lame sedder, his regex was case sensitive and left a bunch of "Arm" unchanged, silly person...

Where in particular did you have in mind?

% grep -Ri arm nyx/*
nyx/__init__.py:__url__ = 'http://www.atagar.com/arm/'

anyway, you should probably pester atagar to make a release soon

Not done yet but I'm guessing it'll be around June.

Cheers! -The Lame Sedder

comment:5 in reply to:  2 Changed 4 years ago by ohheyalan@…

Replying to ohheyalan@…:

Here is what I'm getting when I try to launch Arm:

sudo -u debian-tor arm

And it returns

Traceback (most recent call last):
  File "/usr/share/arm/starter.py", line 534, in <module>
    controller.init(conn)
  File "/usr/share/arm/util/torTools.py", line 670, in init
    self._exitPolicyChecker = self.getExitPolicy()
  File "/usr/share/arm/util/torTools.py", line 1345, in getExitPolicy
    result = ExitPolicy(entry, result)
  File "/usr/share/arm/util/torTools.py", line 2611, in __init__
    self.ipAddressBin += "".join([str((int(octet) >> y) & 1) for y in range(7, -1, -1)])
ValueError: invalid literal for int() with base 10: '*4'

Is there a known solution?


Update:

I removed all mentions of ipv6 from my torrc and then ran the command

sudo pkill -sighup tor

Now everything works again.

comment:6 in reply to:  4 Changed 4 years ago by cypherpunks

Replying to atagar:

if you do, tell him he's a lame sedder, his regex was case sensitive and left a bunch of "Arm" unchanged, silly person...

Where in particular did you have in mind?

% grep -Ri arm nyx/*
nyx/__init__.py:__url__ = 'ht tp://www.atagar.com/arm/'

grep the root ;-)

Last edited 4 years ago by cypherpunks (previous) (diff)

comment:7 Changed 4 years ago by atagar

grep the root ;-)

Did that too. There's a lot of noise due to the changelog (which I'm leaving alone) but I now see the two spots in the readme you mean. Thanks.

comment:8 Changed 4 years ago by atagar

Resolution: worksforme
Status: newclosed

Cleaning up old tickets. Nyx is undergoing a rewrite, if this is still relevant then feel free to reopen.

Note: See TracTickets for help on using tickets.