From: Patrick McHardy <kaber@trash.net>
To: Thomas Graf <tgraf@suug.ch>
Cc: Netfilter Development Mailinglist <netfilter-devel@vger.kernel.org>
Subject: [LIBNL]: Fix nfnl_queue_msg_get_packetid() return type
Date: Thu, 24 Jan 2008 13:28:08 +0100 [thread overview]
Message-ID: <47988458.4020209@trash.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 89 bytes --]
This patch is a bugfix on top of my previous libnl
patches for nfnetlink_queue support.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1665 bytes --]
commit 06934fe9e4818802d1b3e6099977883416e96677
Author: Patrick McHardy <kaber@trash.net>
Date: Thu Jan 24 13:27:10 2008 +0100
[LIBNL]: Fix nfnl_queue_msg_get_packetid() return type
The packet-ID is a 32 bit value, but nfnl_queue_msg_get_packetid() returns
an uint16_t. Makes queueing fail after 2^16 packets.
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/include/netlink/netfilter/queue_msg.h b/include/netlink/netfilter/queue_msg.h
index daf7b3c..bb63236 100644
--- a/include/netlink/netfilter/queue_msg.h
+++ b/include/netlink/netfilter/queue_msg.h
@@ -41,7 +41,7 @@ extern uint8_t nfnl_queue_msg_get_family(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_packetid(struct nfnl_queue_msg *, uint32_t);
extern int nfnl_queue_msg_test_packetid(const struct nfnl_queue_msg *);
-extern uint16_t nfnl_queue_msg_get_packetid(const struct nfnl_queue_msg *);
+extern uint32_t nfnl_queue_msg_get_packetid(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_hwproto(struct nfnl_queue_msg *, uint16_t);
extern int nfnl_queue_msg_test_hwproto(const struct nfnl_queue_msg *);
diff --git a/lib/netfilter/queue_msg_obj.c b/lib/netfilter/queue_msg_obj.c
index f86d6f6..476d920 100644
--- a/lib/netfilter/queue_msg_obj.c
+++ b/lib/netfilter/queue_msg_obj.c
@@ -227,7 +227,7 @@ int nfnl_queue_msg_test_packetid(const struct nfnl_queue_msg *msg)
return !!(msg->ce_mask & QUEUE_MSG_ATTR_PACKETID);
}
-uint16_t nfnl_queue_msg_get_packetid(const struct nfnl_queue_msg *msg)
+uint32_t nfnl_queue_msg_get_packetid(const struct nfnl_queue_msg *msg)
{
return msg->queue_msg_packetid;
}
next reply other threads:[~2008-01-24 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 12:28 Patrick McHardy [this message]
2008-02-07 12:19 ` [LIBNL]: Fix nfnl_queue_msg_get_packetid() return type Thomas Graf
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=47988458.4020209@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=tgraf@suug.ch \
/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;
as well as URLs for NNTP newsgroup(s).