Skip to content

Commit

Permalink
netfilter: ctnetlink: Make some parameters integer to avoid enum mism…
Browse files Browse the repository at this point in the history
…atch

commit a2b7cbd upstream.

Not all parameters passed to ctnetlink_parse_tuple() and
ctnetlink_exp_dump_tuple() match the enum type in the signatures of these
functions. Since this is intended change the argument type of to be an
unsigned integer value.

Signed-off-by: Matthias Kaehlcke <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Matthias Kaehlcke authored and gregkh committed Apr 8, 2018
1 parent e6061c1 commit 3e8f962
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,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;
Expand Down Expand Up @@ -2409,7 +2408,7 @@ static struct nfnl_ct_hook ctnetlink_glue_hook = {

static int ctnetlink_exp_dump_tuple(struct sk_buff *skb,
const struct nf_conntrack_tuple *tuple,
enum ctattr_expect type)
u32 type)
{
struct nlattr *nest_parms;

Expand Down

0 comments on commit 3e8f962

Please sign in to comment.