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

xtables v11 support #177

Merged
merged 4 commits into from
May 13, 2016
Merged

xtables v11 support #177

merged 4 commits into from
May 13, 2016

Conversation

mmellison
Copy link
Contributor

@mmellison mmellison commented May 12, 2016

Adds support for xtables v11 support + fix for segfault. This supercedes and thus closes #173.


This change is Reviewable

peakwinter and others added 2 commits April 21, 2016 13:04
This builds on top of proposed ldx#173 but fixes the segfault issue when
interacting with xtables. The structure of the tables did not
change. Closes ldx#172.
@coveralls
Copy link

coveralls commented May 12, 2016

Coverage Status

Coverage increased (+0.02%) to 59.795% when pulling fdae2ef on seglberg:x11-support into a0cafb4 on ldx:master.

@dealfonso
Copy link

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

@mmellison
Copy link
Contributor Author

Thanks @dealfonso, I was able to reproduce the issue.
I have some spare time later this afternoon, I will take a look then.

Library verisons greater than 10 have an added member in the
xtables_global struct.
@mmellison
Copy link
Contributor Author

Okay give it a try now. I missed a change to the xtables_globals struct.

@coveralls
Copy link

coveralls commented May 12, 2016

Coverage Status

Coverage increased (+0.003%) to 59.777% when pulling 942a6b9 on seglberg:x11-support into a0cafb4 on ldx:master.

class xt_xlate(ct.Structure):
_fields_ = []


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

@mmellison
Copy link
Contributor Author

👍 Cleaned up by removing the unused class.

@coveralls
Copy link

coveralls commented May 13, 2016

Coverage Status

Coverage decreased (-0.008%) to 59.766% when pulling 4fd3494 on seglberg:x11-support into a0cafb4 on ldx:master.

@dealfonso
Copy link

Hi, I have been checking this commit in a complex app (https://github.com/dealfonso/ipfloater) and it is working properly.

@mmellison
Copy link
Contributor Author

Okay great to hear.

@ldx any chance of getting this merged in and getting a new version published to pypi?

@ldx
Copy link
Owner

ldx commented May 13, 2016

Sure, let me also test this first though.

@ldx
Copy link
Owner

ldx commented May 13, 2016

Thanks for this, everyone. Looks good, merging. 👍

@ldx ldx merged commit 6dfea44 into ldx:master May 13, 2016
@dealfonso
Copy link

Hi @ldx,

are you uploading this version to pypi?

@ldx
Copy link
Owner

ldx commented May 24, 2016

@dealfonso I just did.

Thanks to everyone who contributed!

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

Successfully merging this pull request may close these issues.

5 participants