All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Matthias Kaehlcke <mka@chromium.org>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Subject: Re: Doubt about CTA_EXPECT_* values passed to ctnetlink_parse_tuple()
Date: Tue, 18 Apr 2017 10:39:47 +0200	[thread overview]
Message-ID: <20170418083947.GA1720@salvia> (raw)
In-Reply-To: <20170417223730.GR28657@google.com>

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

Hi Mattias,

On Mon, Apr 17, 2017 at 03:37:30PM -0700, Matthias Kaehlcke wrote:
> Hi,
> 
> While working on clang support for kernel builds I came across at what
> at first sight looks like an enum mismatch in the netfilter conntrack
> code:
> 
> In multiple occasions CTA_EXPECT_* values (of type enum ctattr_expect)
> are passed to ctnetlink_parse_tuple(), which expects an 'enum
> ctattr_type' as type argument.

Are you refering to this? See patch.

[-- Attachment #2: x.patch --]
[-- Type: text/x-diff, Size: 672 bytes --]

diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index dc7dfd68fafe..88d7cd9b6b0a 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1006,9 +1006,8 @@ static const struct nla_policy tuple_nla_policy[CTA_TUPLE_MAX+1] = {
 
 static int
 ctnetlink_parse_tuple(const struct nlattr * const cda[],
-		      struct nf_conntrack_tuple *tuple,
-		      enum ctattr_type type, u_int8_t l3num,
-		      struct nf_conntrack_zone *zone)
+		      struct nf_conntrack_tuple *tuple, u32 type,
+		      u_int8_t l3num, struct nf_conntrack_zone *zone)
 {
 	struct nlattr *tb[CTA_TUPLE_MAX+1];
 	int err;

  reply	other threads:[~2017-04-18  8:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17 22:37 Doubt about CTA_EXPECT_* values passed to ctnetlink_parse_tuple() Matthias Kaehlcke
2017-04-18  8:39 ` Pablo Neira Ayuso [this message]
2017-04-18 19:41   ` Matthias Kaehlcke
2017-04-18 19:43     ` Matthias Kaehlcke
2017-04-19  8:58       ` Pablo Neira Ayuso

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=20170418083947.GA1720@salvia \
    --to=pablo@netfilter.org \
    --cc=coreteam@netfilter.org \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=mka@chromium.org \
    --cc=netfilter-devel@vger.kernel.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.