From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: [LIBNFNETLINK 2/3] Fix wrong nfnetlink header size Date: Sun, 12 Feb 2006 22:39:39 +0100 Message-ID: <43EFAB1B.3040309@eurodev.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050700090601010409040808" Cc: Harald Welte , Patrick McHardy Return-path: To: Netfilter Development Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org This is a multi-part message in MIME format. --------------050700090601010409040808 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Fix wrong size of the netfilter netlink header. This implicitely fixes an alignment issue when nfnl_handle_packet is called as well. -- Pablo --------------050700090601010409040808 Content-Type: text/plain; name="02.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="02.patch" [LIBNFNETLINK] Fix wrong nfnetlink header size Fix wrong size of the netfilter netlink header. This implicitely fixes an alignment issue when nfnl_handle_packet is called as well. Index: libnfnetlink/src/libnfnetlink.c =================================================================== --- libnfnetlink.orig/src/libnfnetlink.c 2006-02-12 19:28:19.000000000 +0100 +++ libnfnetlink/src/libnfnetlink.c 2006-02-12 19:30:00.000000000 +0100 @@ -914,7 +914,7 @@ int nfnl_check_attributes(const struct n if (type >= ssh->cb_count) return -EINVAL; - min_len = NLMSG_ALIGN(sizeof(struct nfgenmsg)); + min_len = NLMSG_SPACE(sizeof(struct nfgenmsg)); if (nlh->nlmsg_len < min_len) return -EINVAL; #endif --------------050700090601010409040808--