Skip to content

Commit

Permalink
netfilter: fix fallout from xt/nf osf separation
Browse files Browse the repository at this point in the history
Stephen Rothwell says:
  today's linux-next build (x86_64 allmodconfig) produced this warning:
  ./usr/include/linux/netfilter/nf_osf.h:25: found __[us]{8,16,32,64} type without #include <linux/types.h>

Fix that up and also move kernel-private struct out of uapi (it was not
exposed in any released kernel version).

tested via allmodconfig build + make headers_check.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: bfb15f2 ("netfilter: extract Passive OS fingerprint infrastructure from xt_osf")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Florian Westphal authored and Pablo Neira Ayuso committed May 17, 2018
1 parent 289e1f4 commit 01cd267
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 6 additions & 0 deletions include/linux/netfilter/nf_osf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ enum osf_fmatch_states {
FMATCH_OPT_WRONG,
};

struct nf_osf_finger {
struct rcu_head rcu_head;
struct list_head finger_entry;
struct nf_osf_user_finger finger;
};

bool nf_osf_match(const struct sk_buff *skb, u_int8_t family,
int hooknum, struct net_device *in, struct net_device *out,
const struct nf_osf_info *info, struct net *net,
Expand Down
8 changes: 2 additions & 6 deletions include/uapi/linux/netfilter/nf_osf.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _NF_OSF_H
#define _NF_OSF_H

#include <linux/types.h>

#define MAXGENRELEN 32

#define NF_OSF_GENRE (1 << 0)
Expand Down Expand Up @@ -57,12 +59,6 @@ struct nf_osf_user_finger {
struct nf_osf_opt opt[MAX_IPOPTLEN];
};

struct nf_osf_finger {
struct rcu_head rcu_head;
struct list_head finger_entry;
struct nf_osf_user_finger finger;
};

struct nf_osf_nlmsg {
struct nf_osf_user_finger f;
struct iphdr ip;
Expand Down

0 comments on commit 01cd267

Please sign in to comment.