Skip to content

64-bit casting issue #10

Closed
Closed

Description

@leleobhz

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

Activity

  1. ldx commented on Aug 16, 2012

    @ldx
    Owner

    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?

  2. leleobhz commented on Aug 23, 2012

    @leleobhz
    Author

    I need to install it again. Some recomendation?

  3. ldx commented on Jan 3, 2013

    @ldx
    Owner

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

  4. ldx commented on Jan 25, 2013

    @ldx
    Owner

    Any news? Thanks

  5. ldx commented on Feb 21, 2013

    @ldx
    Owner

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions