-
Notifications
You must be signed in to change notification settings - Fork 183
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
xtables v11 support #177
xtables v11 support #177
Conversation
Hi @seglberg the issue is the same. Your commit was already in PR #173, and I also tried it. The code that raises an error is: import iptc
table = iptc.Table(iptc.Table.NAT)
chain = iptc.Chain(table, "PREROUTING")
print "name: ", chain.name
print "rules: ", chain.rules As you can see, it is very simple code, and it fails in two different ubuntu 16.04: server and desktop |
Thanks @dealfonso, I was able to reproduce the issue. |
Library verisons greater than 10 have an added member in the xtables_global struct.
Okay give it a try now. I missed a change to the |
class xt_xlate(ct.Structure): | ||
_fields_ = [] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this structure is not needed anymore
👍 Cleaned up by removing the unused class. |
Hi, I have been checking this commit in a complex app (https://github.com/dealfonso/ipfloater) and it is working properly. |
Okay great to hear. @ldx any chance of getting this merged in and getting a new version published to pypi? |
Sure, let me also test this first though. |
Thanks for this, everyone. Looks good, merging. 👍 |
Hi @ldx, are you uploading this version to pypi? |
@dealfonso I just did. Thanks to everyone who contributed! |
Adds support for xtables v11 support + fix for segfault. This supercedes and thus closes #173.
This change is