* Read-only fields in libnetfilter_conntrack ct_conntrack structure
@ 2015-11-14 18:34 Daniel Collins
0 siblings, 0 replies; only message in thread
From: Daniel Collins @ 2015-11-14 18:34 UTC (permalink / raw)
To: netfilter-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-14 18:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-14 18:34 Read-only fields in libnetfilter_conntrack ct_conntrack structure Daniel Collins
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.