All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira <pablo@eurodev.net>
To: Deti Fliegl <deti@fliegl.de>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: problem with conntrack utility and kernel 2.6.14
Date: Sat, 29 Oct 2005 15:06:48 +0200	[thread overview]
Message-ID: <436373E8.7040606@eurodev.net> (raw)
In-Reply-To: <436281BB.2010100@fliegl.de>

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

Hi,

Deti Fliegl wrote:
> Thanks for the patch (which seemed to be already checked into svn) - 
> conntrack now works properly - no seg faults occured :)

Could you give a try to the patch attached and tell me if it fixes the 
problem as well?

> The kernel oops still happens - but this time I had access to the 
> console (hope that helps):

Thanks a lot for the report, I'll have a look at it asap.

-- 
Pablo

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1900 bytes --]

Index: libnfnetlink/include/libnfnetlink/libnfnetlink.h
===================================================================
--- libnfnetlink/include/libnfnetlink/libnfnetlink.h	(revision 4394)
+++ libnfnetlink/include/libnfnetlink/libnfnetlink.h	(working copy)
@@ -18,8 +21,8 @@
 #define NLMSG_TAIL(nlh) \
 	(((void *) (nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))
 
-#define NFNL_HEADER_LEN	(NLMSG_LENGTH(sizeof(struct nlmsghdr))	\
-			 +NLMSG_LENGTH(sizeof(struct nfgenmsg)))
+#define NFNL_HEADER_LEN	(NLMSG_ALIGN(sizeof(struct nlmsghdr))	\
+			 +NLMSG_ALIGN(sizeof(struct nfgenmsg)))
 
 #define NFNL_BUFFSIZE		8192
 
Index: libnetfilter_conntrack/src/libnetfilter_conntrack.c
===================================================================
--- libnetfilter_conntrack/src/libnetfilter_conntrack.c	(revision 4398)
+++ libnetfilter_conntrack/src/libnetfilter_conntrack.c	(working copy)
@@ -433,7 +433,7 @@
 {
 	struct nfgenmsg *nfmsg;
 	struct nfattr *attr = NFM_NFA(NLMSG_DATA(nlh));
-	int attrlen = NLMSG_LENGTH(nlh->nlmsg_len) - NFNL_HEADER_LEN;
+	int attrlen = nlh->nlmsg_len - NFNL_HEADER_LEN;
 	struct nfct_conntrack ct;
 	unsigned int flags = 0;
 	int type = NFNL_MSG_TYPE(nlh->nlmsg_type), ret = 0;
@@ -442,7 +442,7 @@
 
 	nfmsg = NLMSG_DATA(nlh);
 
-	if (NLMSG_LENGTH(nlh->nlmsg_len) < NFNL_HEADER_LEN)
+	if (nlh->nlmsg_len < NFNL_HEADER_LEN)
 		return -EINVAL;
 
 	while (NFA_OK(attr, attrlen)) {
@@ -674,7 +674,7 @@
 {
 	struct nfgenmsg *nfmsg;
 	struct nfattr *attr = NFM_NFA(NLMSG_DATA(nlh));
-	int attrlen = NLMSG_LENGTH(nlh->nlmsg_len) - NFNL_HEADER_LEN;
+	int attrlen = nlh->nlmsg_len - NFNL_HEADER_LEN;
 	struct nfct_expect exp;
 	int type = NFNL_MSG_TYPE(nlh->nlmsg_type), ret = 0;
 
@@ -682,7 +682,7 @@
 
 	nfmsg = NLMSG_DATA(nlh);
 
-	if (NLMSG_LENGTH(nlh->nlmsg_len) < NFNL_HEADER_LEN)
+	if (nlh->nlmsg_len < NFNL_HEADER_LEN)
 		return -EINVAL;
 
 	while (NFA_OK(attr, attrlen)) {

  reply	other threads:[~2005-10-29 13:06 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-28  9:08 problem with conntrack utility and kernel 2.6.14 Deti Fliegl
2005-10-28  9:26 ` Pablo Neira
2005-10-28  9:26   ` Deti Fliegl
2005-10-28 10:01 ` Pablo Neira
2005-10-28 11:48   ` Deti Fliegl
2005-10-28 19:22     ` Pablo Neira
2005-10-28 19:53       ` Deti Fliegl
2005-10-29 13:06         ` Pablo Neira [this message]
2005-10-29 15:34           ` Deti Fliegl
2005-10-29 18:35             ` Pablo Neira
2005-10-29 15:44           ` Deti Fliegl
2005-10-31  4:41             ` Pablo Neira
2005-10-31  8:28               ` Krzysztof Oledzki
2005-11-01  1:09                 ` Pablo Neira
2005-11-01 10:29                   ` Krzysztof Oledzki
2005-11-01 13:55                     ` Pablo Neira
2005-11-01 15:17                       ` Krzysztof Oledzki
2005-11-01 16:39                         ` Pablo Neira
2005-11-01 18:49                           ` Krzysztof Oledzki
2005-11-01 19:27                             ` Pablo Neira
2005-11-01 19:39                               ` Krzysztof Oledzki
2005-11-01 20:07                             ` Pablo Neira
2005-11-01 20:21                               ` Krzysztof Oledzki
2005-11-02 16:04                                 ` Pablo Neira
2005-10-31 11:10               ` Deti Fliegl
2005-12-04  2:14         ` Pablo Neira Ayuso
2005-12-04 16:09           ` Patrick McHardy
2005-12-04 16:53             ` Deti Fliegl
2005-12-04 17:10           ` Yasuyuki KOZAKAI
2005-12-04 18:44             ` Deti Fliegl
2005-12-04 19:56               ` Patrick McHardy
2005-12-05  5:51                 ` Yasuyuki KOZAKAI
2005-12-15 12:49               ` problem with conntrack utility and kernel 2.6.14 - still with 2.6.14.4 Deti Fliegl
2005-12-15 13:05                 ` Pablo Neira Ayuso
2005-12-15 17:21                 ` Krzysztof Oledzki
     [not found]           ` <200512041004.37192.romary@nikoon.com>
2005-12-04 20:04             ` Major problem with conntrack utility and kernel 2.6.14.3 Patrick McHardy
2005-12-04 23:08               ` Deti Fliegl
2005-12-05 10:24               ` Krzysztof Oledzki
2005-12-05 15:17                 ` Patrick McHardy
2005-10-28 13:39   ` problem with conntrack utility and kernel 2.6.14 Deti Fliegl

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=436373E8.7040606@eurodev.net \
    --to=pablo@eurodev.net \
    --cc=deti@fliegl.de \
    --cc=netfilter-devel@lists.netfilter.org \
    /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 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.