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

Segfault on None or 'None' for dport extension #346

Open
Willyou2 opened this issue May 23, 2024 · 0 comments
Open

Segfault on None or 'None' for dport extension #346

Willyou2 opened this issue May 23, 2024 · 0 comments

Comments

@Willyou2
Copy link

Willyou2 commented May 23, 2024

Running python 3.12, python-iptables v1.01, iptables v1.8.4 (legacy) on ubuntu 20.04

Since update from py 3.11 to 3.12, passing a rule_d to add_rule in iptc.easy.add_rule() with
rule_d['tcp'] = {'dport': None}
or
rule_d['tcp'] = {'dport': 'None'}
throws segfault

example:

rule_d = {'target': 'REJECT', 'src': '1.1.1.1', 'protocol': 'tcp', 'tcp': {'dport': 'None'}} 
add_rule('filter', 'SOME_CHAIN', rule_d, 0)
>>> Segmentation fault (core dumped)
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

No branches or pull requests

1 participant