NETFILTER: Remove superfluous __KERNEL__ tests from unexported headers.
PATCH 1/1 NETFILTER: Remove superfluous __KERNEL__ tests from unexported headers.
---
include/linux/netfilter/nf_conntrack_h323.h | 4 ---- include/linux/netfilter/nf_conntrack_irc.h | 3 --- include/linux/netfilter/nf_conntrack_pptp.h | 3 --- include/linux/netfilter/nf_conntrack_proto_gre.h | 2 -- include/linux/netfilter/nf_conntrack_sane.h | 4 ---- include/linux/netfilter/nf_conntrack_sip.h | 2 -- 6 files changed, 18 deletions(-)
include/linux/netfilter/nf_conntrack_h323.h +0 -4
@@ -1,8 +1,6 @@#ifndef _NF_CONNTRACK_H323_H#define _NF_CONNTRACK_H323_H -#ifdef __KERNEL__ -#include <linux/netfilter/nf_conntrack_h323_asn1.h> #define RAS_PORT 1719
@@ -88,5 +86,3 @@ extern int (*nat_q931_hook) (struct sk_buff *skb, struct nf_conn *ct, struct nf_conntrack_expect *exp);#endif - -#endif
include/linux/netfilter/nf_conntrack_irc.h +0 -3
@@ -1,8 +1,6 @@#ifndef _NF_CONNTRACK_IRC_H#define _NF_CONNTRACK_IRC_H -#ifdef __KERNEL__ -#define IRC_PORT 6667 extern unsigned int (*nf_nat_irc_hook)(struct sk_buff *skb,
@@ -11,5 +9,4 @@ extern unsigned int (*nf_nat_irc_hook)(struct sk_buff *skb,unsigned int matchlen, struct nf_conntrack_expect *exp); -#endif /* __KERNEL__ */ #endif /* _NF_CONNTRACK_IRC_H */
include/linux/netfilter/nf_conntrack_pptp.h +0 -3
@@ -44,8 +44,6 @@ struct nf_nat_pptp {__be16 pac_call_id;/* NAT'ed PAC call id */ }; -#ifdef __KERNEL__ -#define PPTP_CONTROL_PORT 1723#define PPTP_PACKET_CONTROL 1
@@ -320,5 +318,4 @@ extern void (*nf_nat_pptp_hook_expectfn)(struct nf_conn *ct, struct nf_conntrack_expect *exp); -#endif /* __KERNEL__ */ #endif /* _NF_CONNTRACK_PPTP_H */
include/linux/netfilter/nf_conntrack_proto_gre.h +0 -2
@@ -69,7 +69,6 @@ struct nf_ct_gre {unsigned int timeout; }; -#ifdef __KERNEL__#include <net/netfilter/nf_conntrack_tuple.h> struct nf_conn ;
@@ -90,5 +89,4 @@ void nf_ct_gre_keymap_destroy(struct nf_conn *ct);extern void nf_ct_gre_keymap_flush (void );extern void nf_nat_need_gre (void ); -#endif /* __KERNEL__ */ #endif /* _CONNTRACK_PROTO_GRE_H */
include/linux/netfilter/nf_conntrack_sane.h +0 -4
@@ -2,8 +2,6 @@#define _NF_CONNTRACK_SANE_H/* SANE tracking. */ -#ifdef __KERNEL__ -#define SANE_PORT 6566enum sane_state {
@@ -16,6 +14,4 @@ struct nf_ct_sane_master { enum sane_state state; }; -#endif /* __KERNEL__ */ -#endif /* _NF_CONNTRACK_SANE_H */
include/linux/netfilter/nf_conntrack_sip.h +0 -2
@@ -1,6 +1,5 @@#ifndef __NF_CONNTRACK_SIP_H__#define __NF_CONNTRACK_SIP_H__ -#ifdef __KERNEL__#define SIP_PORT 5060#define SIP_TIMEOUT 3600
@@ -37,5 +36,4 @@ extern int ct_sip_lnlen(const char *line, const char *limit);extern const char *ct_sip_search (const char *needle,const char *haystack,size_t needle_len,size_t haystack_len,int case_sensitive); -#endif /* __KERNEL__ */ #endif /* __NF_CONNTRACK_SIP_H__ */
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.
http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================
Quoted 11 lines · Robert P. J. Day
Signed-off-by Robert P. J. Day <[email protected]>---
include/linux/netfilter/nf_conntrack_h323.h | 4 ---- include/linux/netfilter/nf_conntrack_irc.h | 3 --- include/linux/netfilter/nf_conntrack_pptp.h | 3 --- include/linux/netfilter/nf_conntrack_proto_gre.h | 2 -- include/linux/netfilter/nf_conntrack_sane.h | 4 ---- include/linux/netfilter/nf_conntrack_sip.h | 2 -- 6 files changed, 18 deletions(-)
Parts of almost all of these files will be exported at some point for ctnetlink, so for now I prefer to keep the __KERNEL__ guards.
Quoted 14 lines · Patrick McHardy
Quoted 11 lines · Robert P. J. Day
Signed-off-by Robert P. J. Day <[email protected]>---
include/linux/netfilter/nf_conntrack_h323.h | 4 ---- include/linux/netfilter/nf_conntrack_irc.h | 3 --- include/linux/netfilter/nf_conntrack_pptp.h | 3 --- include/linux/netfilter/nf_conntrack_proto_gre.h | 2 -- include/linux/netfilter/nf_conntrack_sane.h | 4 ---- include/linux/netfilter/nf_conntrack_sip.h | 2 -- 6 files changed, 18 deletions(-)
Quoted 3 lines
Parts of almost all of these files will be exported at some point for ctnetlink, so for now I prefer to keep the
__KERNEL__guards.
no problem.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.
http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================