Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64-bit casting issue #10

Closed
leleobhz opened this issue Jul 22, 2012 · 5 comments
Closed

64-bit casting issue #10

leleobhz opened this issue Jul 22, 2012 · 5 comments

Comments

@leleobhz
Copy link

Ive tryed to use match object in a 64-bit machine and got this:

In [62]: m.dport = "22"

ArgumentError Traceback (most recent call last)
/home/leonardo/bin/ in ()
----> 1 m.dport = "22"

/usr/lib/pymodules/python2.7/iptc/init.pyc in setattr(self, name, value)
358 def setattr(self, name, value):
359 if not name.startswith('') and name not in dir(self):
--> 360 self.parse(name.replace("
", "-"), value)
361 else:
362 object.setattr(self, name, value)

/usr/lib/pymodules/python2.7/iptc/init.pyc in parse(self, parameter, value)
318 rv = _wrap_parse(self._module.parse, opt.val, argv, inv,
319 ct.pointer(self._flags), entry,
--> 320 ct.cast(self._ptrptr, ct.POINTER(ct.c_void_p)))
321 if rv != 1:
322 raise ValueError("invalid value %s" % (value))

ArgumentError: argument 5: <type 'exceptions.TypeError'>: expected LP_c_ulong instance instead of LP_c_uint

This patch fixed the problem but i cant test it in 32bits.

EDIT: The patch misformated here: http://pastie.org/4302265

@ldx
Copy link
Owner

ldx commented Aug 16, 2012

Can you tell me what version of python-iptables you are using? Can you make sure that python-iptables and its C wrapper library match each other?

@leleobhz
Copy link
Author

I need to install it again. Some recomendation?

@ldx
Copy link
Owner

ldx commented Jan 3, 2013

For me it's installed under /usr/local/lib/python2.7/site-packages, just remove python-iptables and the library from there.

@ldx
Copy link
Owner

ldx commented Jan 25, 2013

Any news? Thanks

@ldx
Copy link
Owner

ldx commented Feb 21, 2013

I consider this fixed - if the problem still occurs please reopen this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants