All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfnetlink: Fix calculation of minimum message length
@ 2005-12-03 16:52 Yasuyuki KOZAKAI
  0 siblings, 0 replies; 2+ messages in thread
From: Yasuyuki KOZAKAI @ 2005-12-03 16:52 UTC (permalink / raw)
  To: netfilter-devel; +Cc: laforge, kaber

[-- Attachment #1: Type: Text/Plain, Size: 140 bytes --]

Hi,

At least, valid nfnetlink message should have nlmsghdr and nfgenmsg.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>

[-- Attachment #2: 02-nfnetlink.patch --]
[-- Type: Text/Plain, Size: 1028 bytes --]

[NETFILTER] nfnetlink: Fix calculation of minimum message length

At least, valid nfnetlink message should have nlmsghdr and nfgenmsg.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>

---
commit 83535e538f30e66a20c040ff2c20170c0df23b0e
tree 90af221810d8ed68de2fa38d13a34088d35d1fa6
parent b80e4873d096c32b1c941b66cbfdaf1cf9bf8d8d
author Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Sun, 27 Nov 2005 02:49:03 +0900
committer Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Sun, 27 Nov 2005 02:49:03 +0900

 net/netfilter/nfnetlink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index a60c59b..9805514 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -162,7 +162,7 @@ nfnetlink_check_attributes(struct nfnetl
 		return -EINVAL;
 	}
 
-	min_len = NLMSG_ALIGN(sizeof(struct nfgenmsg));
+	min_len = NLMSG_SPACE(sizeof(struct nfgenmsg));
 	if (unlikely(nlh->nlmsg_len < min_len))
 		return -EINVAL;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-04 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200512031652.jB3GqhbB021984@toshiba.co.jp>
2005-12-04 15:28 ` [PATCH] nfnetlink: Fix calculation of minimum message length Patrick McHardy
2005-12-03 16:52 Yasuyuki KOZAKAI

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.