From e389c311d6899335cc2962ffa8a7449105ef8011 Mon Sep 17 00:00:00 2001 From: yonib98 Date: Sun, 26 Jul 2026 16:50:51 +0300 Subject: [PATCH] fix: add base field to xt_option_entry for libxtables >= 1.8.11 iptables 1.8.11 appended `base` to struct xt_option_entry (48 -> 56 bytes), so the ctypes _option_lookup stride was 8 bytes short and misread options after the first (e.g. multiport --dports). append ("base", ct.c_uint) to match, and bump version to 1.2.0.1. --- iptc/version.py | 2 +- iptc/xtables.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iptc/version.py b/iptc/version.py index f6a5157..6287353 100644 --- a/iptc/version.py +++ b/iptc/version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- __pkgname__ = "python-iptables" -__version__ = "1.2.0" +__version__ = "1.2.0.1" diff --git a/iptc/xtables.py b/iptc/xtables.py index 024779c..abdd6f2 100644 --- a/iptc/xtables.py +++ b/iptc/xtables.py @@ -108,7 +108,8 @@ class xt_option_entry(ct.Structure): ("ptroff", ct.c_uint), ("size", ct.c_size_t), ("min", ct.c_uint), - ("max", ct.c_uint)] + ("max", ct.c_uint), + ("base", ct.c_uint)] class _U1(ct.Union):