[netfilter-cvslog] r6602 - trunk/libnfnetlink/src
laforge at netfilter.org
laforge at netfilter.org
Wed May 17 16:42:04 CEST 2006
Author: laforge at netfilter.org
Date: 2006-05-17 16:42:03 +0200 (Wed, 17 May 2006)
New Revision: 6602
Modified:
trunk/libnfnetlink/src/libnfnetlink.c
Log:
we cannot return -EINVAL when we encounter attributes > subsys->cb_count, since that compromises interoperability with future kernels which might introduce new attributes.
Modified: trunk/libnfnetlink/src/libnfnetlink.c
===================================================================
--- trunk/libnfnetlink/src/libnfnetlink.c 2006-05-12 06:33:20 UTC (rev 6601)
+++ trunk/libnfnetlink/src/libnfnetlink.c 2006-05-17 14:42:03 UTC (rev 6602)
@@ -927,8 +927,13 @@
while (NFA_OK(attr, attrlen)) {
unsigned int flavor = NFA_TYPE(attr);
if (flavor) {
- if (flavor > cb->attr_count)
- return -EINVAL;
+ if (flavor > cb->attr_count) {
+ /* we have received an attribute from
+ * the kernel which we don't understand
+ * yet. We have to silently ignore this
+ * for the sake of future compatibility */
+ continue;
+ }
nfa[flavor - 1] = attr;
}
attr = NFA_NEXT(attr, attrlen);
More information about the netfilter-cvslog
mailing list