GithubHelp home page GithubHelp logo

Comments (10)

Caligatio avatar Caligatio commented on June 18, 2024

I believe you mean iptables v1.4.7

It appears that afinfo is defined as static in 1.4.7 and earlier so the state switching that LDX implemented recently is unhappy.

from python-iptables.

ldx avatar ldx commented on June 18, 2024

Indeed. The long term solution is to load and keep track of extensions ourselves without libxtables - should not be too difficult, actually we already use a hack to load a module manually if it has been loaded for another protocol family before.

The only gotcha I see here is that extensions use parser routines from libxtables - but if we load all available extensions first to register with us (provide the hooks register_match() and register_target() in python-iptables via ctypes), and libxtables after that to provide the parser routines then we should be fine.

from python-iptables.

Caligatio avatar Caligatio commented on June 18, 2024

So as a workaround, would it be possible for it to try to access afinfo and then, if it fails, just load in the correct value when the context switches? If I recall correctly, there's a setter function but no getter.

I really rather not have to use an older version of your library to get my stuff to work :(

from python-iptables.

ldx avatar ldx commented on June 18, 2024

I'll look into this as soon as I have some free time.

from python-iptables.

ldx avatar ldx commented on June 18, 2024

@Caligatio thanks for the idea - we just use the setter function now, and the extension name prefixes are hardcoded for the two supported protocols (IPv4, IPv6).

Can you guys check that the current HEAD has fixed this? Works here with iptables 1.4.12.

from python-iptables.

ldx avatar ldx commented on June 18, 2024

Closing as there has been no feedback for >month. Please feel free to reopen this if the problem still exists.

from python-iptables.

countrygeek avatar countrygeek commented on June 18, 2024

I experienced this same problem just today:
File "/usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg/iptc/init.py", line 10, in
from ip4tc import Table, Chain, Rule, Match, Target, Policy, IPTCError
File "/usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg/iptc/ip4tc.py", line 11, in
from xtables import (XT_INV_PROTO, NFPROTO_IPV4, XTablesError, xtables,
File "/usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg/iptc/xtables.py", line 744, in
class xtables(object):
File "/usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg/iptc/xtables.py", line 757, in xtables
_xtables_afinfo = ct.c_void_p.in_dll(_lib_xtables, "afinfo")
ValueError: /lib/libxtables.so.5: undefined symbol: afinfo

Running version:
python-iptables in /usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg

And: iptables v1.4.10

Any suggestions? I really didn't want to recompile iptables for this library to work. :/

from python-iptables.

ldx avatar ldx commented on June 18, 2024

Do you use the latest version of python-iptables from git?

from python-iptables.

devicenull avatar devicenull commented on June 18, 2024

I also just experienced this issue this issue:

Used 0.2.0 version of the module
CentOS 6 x64
iptables-1.4.7

I'll give it a shot with the git version as well.

from python-iptables.

devicenull avatar devicenull commented on June 18, 2024

Version from git works okay, though #45 causes issues on CentOS.

from python-iptables.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.