-
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
add xtables v11 match and target #173
Conversation
I get a seg fault with this patch and creating matches on Ubuntu 16.04 LTS
|
Same here on arch, segfault when creating matches. |
("x6_options", ct.POINTER(xt_option_entry)), | ||
|
||
# Translate iptables to nft | ||
("xlate", ct.CFUNCTYPE(None, ct.c_void_p, |
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.
Looks like the segfault problem is coming from this. The xlate
member does not exist in the 1.6.0 tagged release of iptables, although it does exist in master branch.
Hi @seglberg and @peakwinter, I have a fresh ubuntu 16.04 install and I am still having this problem using your PR. Just this example: import iptc
table = iptc.Table(iptc.Table.NAT)
chain = iptc.Chain(table, "PREROUTING")
print "name: ", chain.name
print "rules: ", chain.rules If I check xtables.h, I cannot find any reference to xlate. So I removed it from xtable.py, and I also found that "parse" field is not properly defined (according to the headers: the first int parameter is missing). So I corrected all these problems, but the problem is still there. I have followed the code and the problem (whether removed the xlate or not) is in function Could you please check my code and figure out what is happening? |
I can take a quick look later, but I just realized I forgot to post my PR that included a fix for the segfault. See #177. |
This seems to enable basic compatibility with xtables v11. I tested normal function (adding targets and matches, purging tables, etc) and it seems to work fine. No idea about how it works with the new things added in iptables 1.6.0...