-
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
Problem when reading and writing goto targets #196
Comments
A glance at the source code seems to indicate that at the moment I'll try adding that feature. Anyways, how do you get the faulty rule list? Did you use Because such faulty rule is certainly a bug if reproducible, and while I'm at it, I want to squash that as well. |
Okay I'm still trying to grasp how python-iptables retrieved the struct for Target. But a simple glance, it seems python-iptables do not properly decode the I'll try fixing this, because I myself need the |
Just an update: If I do an experiment as such: Before:
Clone a ruleThis uses the example code https://github.com/ldx/python-iptables/#chains-and-tables , except that I appended the following code:
After
ConclusionI did not see the behavior as you indicated, that is, adding of a malformed However, cloning indeed converted |
Aaanyways, I might have found a way to create I'll double-check my work, and submit a pull request afterwards. Luckily, it turns out to be a simple-ish patch. |
Hi, Thanks pepoluan! |
#199 is pull request / patch that allows python-iptables to recognize "-g" targets, and vice versa, to enable creation of "-g" targets. UsageTo create "goto" targets, specify EDIT: Apparently, my changes b0rked the |
Yup! #200 finally nailed it, and it passed all tests. Now it's safe to use for IPv4 and IPv6. Whew! |
Merged the PR, thanks again! |
Hi,
I wanted to create a goto target but I couldn't figure out how, so I created the rule directly in iptables first:
Then I read it with iptc, but I couldn't see any differences with the normal target jump, so I inserted it again to see what that did. To my surprise, it generates a faulty rule :/ To my surprise, it adds an output field to the rule and transforms the goto in jump.
I'm running Ubuntu 16, if that helps :)
The text was updated successfully, but these errors were encountered: