Skip to contentSkip to conversation

Fix wrong nfnetlink header size

PATCH Applied Pablo Neira Ayuso 2 participants 2 messages Feb 12, 2006 – Feb 13, 2006 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 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.

Signature · 1 line
Pablo

[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.

src/libnfnetlink.c +1 -1
Index: libnfnetlink/src/libnfnetlink.c
===================================================================
@@ -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
Applied
#1 lore raw
Quoted 4 lines · Pablo Neira Ayuso

[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.

thanks, applied, too.

Signature · 5 lines
- Harald Welte <[email protected]>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie