From: Daniel Collins <solemnwarning@solemnwarning.net>
To: netfilter-devel@vger.kernel.org
Subject: Read-only fields in libnetfilter_conntrack ct_conntrack structure
Date: Sat, 14 Nov 2015 18:34:12 +0000 [thread overview]
Message-ID: <56477EA4.8010402@solemnwarning.net> (raw)
Hi
I've found a bug in libnetfilter_conntrack - the nfct_set_attr() function silently doesn't populate certain fields (this behavior is documented), but it still calls set_bit(), so it actually "sets" the field without initialising it. nfct_attr_unset() also works on these fields.
But before thinking about fixing that bug: Why not make all the fields writable? If the intent is to be a general-purpose structure representing a conntrack table entry, I should be able to set all the fields, as little use as that may appear to have, if the intent is just to allow changing useful/meaningful ones in the kernel... should the list of writable ones not be shorter?
Background as to why I want to set the fields: I'm writing Perl bindings for libnetfilter_conntrack and some other stuff using them, I want to be able to serialise an entire nf_conntrack structure in one (privileged) process and then pass it to other unprivileged ones where it will be deserialized and stuff done with it.
Happy to write a patch to make them all writable if noone objects to it.
Thanks
reply other threads:[~2015-11-14 18:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=56477EA4.8010402@solemnwarning.net \
--to=solemnwarning@solemnwarning.net \
--cc=netfilter-devel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.