From: Patrick McHardy <kaber@trash.net>
To: Ross Vandegrift <ross@kallisti.us>
Cc: netfilter-devel@lists.netfilter.org,
Ross Vandegrift <ross@eris.kallisti.us>
Subject: Re: Netlink error datagrams
Date: Tue, 10 Apr 2007 18:50:02 +0200 [thread overview]
Message-ID: <461BC03A.7010501@trash.net> (raw)
In-Reply-To: <20070410162545.GA25386@kallisti.us>
Ross Vandegrift wrote:
> On Tue, Apr 10, 2007 at 09:57:04AM +0200, Patrick McHardy wrote:
>
>>What error code does the header contain?
>
>
> Reading through libipq source, ipq_read seems to hand me a (struct nlmsghdr *),
> so I've been treating it like so. I'm kind of a newbie at netlink as
> well as netfilter, and I don't really see an error code field in
> struct nlmsgdr. I'm guessing it's in the ancillary data field, but
> I'm not sure how to interpret the data:
An error contains a struct nlmsghdr followed by a struct nlmsgerr
followed by the message that caused the error.
> (gdb) hexdump buf
> BFFE0E80 : 24 00 00 00 02 00 00 00 - 00 00 00 00 4A 37 00 00 $...........J7..
^^ nlmsghdr
> BFFE0E90 : FE FF FF FF 1C 00 00 00 - 12 00 01 00 00 00 00 00 ................
nlmsgerr: ^^ error ^^ original msg
> BFFE0EA0 : 4A 37 00 00 65 74 68 30 - 00 00 00 00 00 00 00 00 J7..eth0........
So the error is 0xFEFFFFFF, which (assuming your machine is big-endian)
is -2 or -ENOENT. The only case where this can happen is if you send
a verdict for a non-existant queue entry.
next prev parent reply other threads:[~2007-04-10 16:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-10 4:08 Netlink error datagrams Ross Vandegrift
2007-04-10 7:57 ` Patrick McHardy
2007-04-10 16:25 ` Ross Vandegrift
2007-04-10 16:50 ` Patrick McHardy [this message]
2007-04-10 18:19 ` Ross Vandegrift
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=461BC03A.7010501@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@lists.netfilter.org \
--cc=ross@eris.kallisti.us \
--cc=ross@kallisti.us \
/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.