Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Fixed a bug in python-iptables #289

Merged
merged 3 commits into from
Mar 30, 2020

Conversation

rptrchv
Copy link
Contributor

@rptrchv rptrchv commented Mar 29, 2020

Closes #286

# The bug is actually fixed in:
# https://github.com/chruss2/python-iptables/commit/282c790738a111b1ddc27b43ecb0acfab8b09024
# and the bugfix is gonna be released in the next (after 0.14.0) release of python-iptables.
if iptc.version.__version__ <= '0.14.0':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be True even if _version__ is something like 0.14.0~ds-1 like in Debian bullseye where the bug is not fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls don't mix OS package version with python package version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even so, if we have version like 0.14.0-dev it will be considered "bug-free" even though it's not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in my last commit

@a-martynovich
Copy link
Contributor

Please make sure this patch is only applied when iptables version is newer than 1.6.2 (or maybe even 1.7?)
ldx/python-iptables#282 (comment)

@rptrchv
Copy link
Contributor Author

rptrchv commented Mar 30, 2020

Please make sure this patch is only applied when iptables version is newer than 1.6.2 (or maybe even 1.7?)
ldx/python-iptables#282 (comment)

I believe there'll be no harm in applying it on the system with any iptables version

@a-martynovich
Copy link
Contributor

I believe there'll be no harm in applying it on the system with any iptables version

Ok, since ldx/python-iptables#299 is merged I believe you're right.

@sonarcloud
Copy link

sonarcloud bot commented Mar 30, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'python-iptables: match "state" already registered' on AWS Linux
4 participants