From: Frank Vanbever <frank.vanbever@essensium.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] package/python-iptables: use installed iptables by default
Date: Fri, 28 Feb 2020 17:17:20 +0100 [thread overview]
Message-ID: <2358331.LJ4T0ylkKU@wintermute> (raw)
In-Reply-To: <1831645.BBFHC3lhqW@wintermute>
Hi Thomas,
> I'll see if I can whip something up and submit it upstream.
I gave it another try but it seems that I was a bit too optimistic yesterday.
The xtables module requires the ABI version to cast the return values for
matches and targets to something it can access.
I have a final last ditch theory about how this could be fixed, but to be honest
it's really starting to look like more trouble than it's worth.
The ABI version information is embedded into struct xtables_match and
struct xtables_target. You should be able to get to these just from a handle
to the libxtables.so and the location of the iptables extensions (i.e.
xtables_libdir), for which you could use the same solution as for libc and
test a number of sensible locations if ldconfig is unavailable.
The xtables_{match,target} structs always have the version field as the first
field in the returned struct so I think you could do an
xtables_find_{target,match} and do a ctypes.cast to a dummy ctypes.struct class
with just the version field.
The way the module is written though requires the ABI version global variable
to instantiate the xtables class which contains the logic that would allow you
to find a match/target. So you get into this chicken or the egg type situation
where you need to know the ABI version to get the workaround way to get the
ABI version to work.
Best regards,
Frank
next prev parent reply other threads:[~2020-02-28 16:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 14:26 [Buildroot] [PATCH 1/3] package/python-iptables: add explicit dependency on dynamic libs Frank Vanbever
2020-02-26 14:26 ` [Buildroot] [PATCH 2/3] package/python-iptables: try known libc instead of find_library() Frank Vanbever
2020-02-26 15:30 ` Thomas Petazzoni
2020-02-26 14:26 ` [Buildroot] [PATCH 3/3] package/python-iptables: use installed iptables by default Frank Vanbever
2020-02-26 15:33 ` Thomas Petazzoni
2020-02-27 14:56 ` Frank Vanbever
2020-02-28 16:17 ` Frank Vanbever [this message]
2020-02-26 15:27 ` [Buildroot] [PATCH 1/3] package/python-iptables: add explicit dependency on dynamic libs Thomas Petazzoni
2020-02-28 16:39 ` [Buildroot] [PATCH v2 " Frank Vanbever
2020-02-28 16:39 ` [Buildroot] [PATCH v2 2/3] package/python-iptables: try known libc instead of find_library() Frank Vanbever
2020-02-28 16:39 ` [Buildroot] [PATCH v2 3/3] package/python-iptables: use installed iptables by default Frank Vanbever
2020-03-11 10:54 ` [Buildroot] [PATCH v3 1/4] package/python-iptables: add explicit dependency on dynamic libs Frank Vanbever
2020-03-11 10:54 ` [Buildroot] [PATCH v3 2/4] package/python-iptables: try known libc instead of find_library() Frank Vanbever
2020-03-11 10:54 ` [Buildroot] [PATCH v3 3/4] package/python-iptables: use installed iptables by default Frank Vanbever
2022-01-06 21:08 ` Arnout Vandecappelle
2020-03-11 10:54 ` [Buildroot] [PATCH v3 4/4] package/python-iptables: account for platform tag in extensions Frank Vanbever
2020-04-15 20:30 ` [Buildroot] [PATCH v3 1/4] package/python-iptables: add explicit dependency on dynamic libs Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2358331.LJ4T0ylkKU@wintermute \
--to=frank.vanbever@essensium.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox