From: <abirvalg@lavabit.com>
To: netfilter-devel@vger.kernel.org
Subject: conntrack EILSEQ followed by ENOBUFS
Date: Mon, 10 Oct 2011 21:17:02 +0000 [thread overview]
Message-ID: <20111010211702.4a666dfc@wwwwww-701SD> (raw)
On Linux wwwwww-701SD 2.6.35-30-generic #59-Ubuntu SMP Tue Aug 30
15:58:00 UTC 2011 i686 GNU/Linux
with libnetfilter-conntrack3 Version: 0.0.101-1
Hi, my application uses libnetfiler_conntrack. When I want to set a mark
on a connection, I
nfct_set_attr_* all the necessary fields of struct nf_conntrack* and
then do
nfct_query(setmark_handle, NFCT_Q_GET, ct)
setmark_handle has a callback registered thusly:
if ((nfct_callback_register(setmark_handle, NFCT_T_ALL, setmark,
NULL) == -1)) {perror("cb_reg");}
So ct object lands here:
int setmark (enum nf_conntrack_msg_type type, struct nf_conntrack
*mct,void *data){
nfct_set_attr_u32(mct, ATTR_MARK, nfmark_to_set);
nfct_query(setmark_handle, NFCT_Q_UPDATE, mct); ***
return NFCT_CB_CONTINUE;
}
All works fine and dandy and i can see with "conntrack -L" marks being
set. At times I get EBUSY from nfct_query(...NFCT_Q_GET...) but I simply call nfct_query(...NFCT_Q_GET...) again and the query goes through.
Until at a seemingly random point, I start getting:
EILSEQ from nfct_query(...NFCT_Q_GET...) (Invalid or incomplete multibyte or wide
character). I don't resend this packet with nfct_query(...NFCT_Q_GET...), From then on every single nfct_query(...NFCT_Q_GET...) returns EILSEQ maybe for a 100 or so queries, until I finally get ENOBUFS and my app hangs.
Even calling "conntrack -L" at that point hangs - no output displayed
and prog doesn't return.
I hope that the line in the code above with *** is not the offending
one:NFCT_Q_UPDATE doesn't technically require a handle, yet the API says
it should be there, so I put the handle of this very callback.
Please let me know if there is any more info I could provide you with. I
am also willing to install conntrack_dbg package and investigate the
issue if need be.
Thanks.
next reply other threads:[~2011-10-10 18:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 21:17 abirvalg [this message]
2011-10-12 16:16 ` conntrack EILSEQ followed by ENOBUFS Pablo Neira Ayuso
2011-10-13 11:11 ` abirvalg
[not found] ` <20111013111020.60e09065@wwwwww-701SD>
[not found] ` <20111013093014.GB19706@1984>
2011-10-13 12:50 ` abirvalg
2011-10-13 11:02 ` Pablo Neira Ayuso
2011-10-13 14:19 ` abirvalg
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=20111010211702.4a666dfc@wwwwww-701SD \
--to=abirvalg@lavabit.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox