netfilter: fix coding-style errors.

Several header-files, Kconfig files and Makefiles have trailing
white-space.  Remove it.

In netfilter/Kconfig, indent the type of CONFIG_NETFILTER_NETLINK_ACCT
correctly.

There are semicolons at the end of two function definitions in
include/net/netfilter/nf_conntrack_acct.h and
include/net/netfilter/nf_conntrack_ecache.h. Remove them.

Fix indentation in nf_conntrack_l4proto.h.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Jeremy Sowden 2019-09-13 09:13:02 +01:00 committed by Pablo Neira Ayuso
parent 0286fbc624
commit b0edba2af7
11 changed files with 23 additions and 23 deletions

View File

@ -340,7 +340,7 @@ void xt_free_table_info(struct xt_table_info *info);
/** /**
* xt_recseq - recursive seqcount for netfilter use * xt_recseq - recursive seqcount for netfilter use
* *
* Packet processing changes the seqcount only if no recursion happened * Packet processing changes the seqcount only if no recursion happened
* get_counters() can use read_seqcount_begin()/read_seqcount_retry(), * get_counters() can use read_seqcount_begin()/read_seqcount_retry(),
* because we use the normal seqcount convention : * because we use the normal seqcount convention :

View File

@ -1,7 +1,7 @@
/* IPv6-specific defines for netfilter. /* IPv6-specific defines for netfilter.
* (C)1998 Rusty Russell -- This code is GPL. * (C)1998 Rusty Russell -- This code is GPL.
* (C)1999 David Jeffery * (C)1999 David Jeffery
* this header was blatantly ripped from netfilter_ipv4.h * this header was blatantly ripped from netfilter_ipv4.h
* it's amazing what adding a bunch of 6s can do =8^) * it's amazing what adding a bunch of 6s can do =8^)
*/ */
#ifndef __LINUX_IP6_NETFILTER_H #ifndef __LINUX_IP6_NETFILTER_H

View File

@ -45,7 +45,7 @@ struct nf_conn_acct *nf_ct_acct_ext_add(struct nf_conn *ct, gfp_t gfp)
#else #else
return NULL; return NULL;
#endif #endif
}; }
/* Check if connection tracking accounting is enabled */ /* Check if connection tracking accounting is enabled */
static inline bool nf_ct_acct_enabled(struct net *net) static inline bool nf_ct_acct_enabled(struct net *net)

View File

@ -61,7 +61,7 @@ nf_ct_ecache_ext_add(struct nf_conn *ct, u16 ctmask, u16 expmask, gfp_t gfp)
#else #else
return NULL; return NULL;
#endif #endif
}; }
#ifdef CONFIG_NF_CONNTRACK_EVENTS #ifdef CONFIG_NF_CONNTRACK_EVENTS
/* This structure is passed to event handler */ /* This structure is passed to event handler */

View File

@ -126,7 +126,7 @@ void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t,
const union nf_inet_addr *, const union nf_inet_addr *,
u_int8_t, const __be16 *, const __be16 *); u_int8_t, const __be16 *, const __be16 *);
void nf_ct_expect_put(struct nf_conntrack_expect *exp); void nf_ct_expect_put(struct nf_conntrack_expect *exp);
int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
u32 portid, int report, unsigned int flags); u32 portid, int report, unsigned int flags);
static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect, static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect,
unsigned int flags) unsigned int flags)

View File

@ -181,41 +181,41 @@ void nf_ct_l4proto_log_invalid(const struct sk_buff *skb,
#if IS_ENABLED(CONFIG_NF_CONNTRACK) #if IS_ENABLED(CONFIG_NF_CONNTRACK)
static inline struct nf_generic_net *nf_generic_pernet(struct net *net) static inline struct nf_generic_net *nf_generic_pernet(struct net *net)
{ {
return &net->ct.nf_ct_proto.generic; return &net->ct.nf_ct_proto.generic;
} }
static inline struct nf_tcp_net *nf_tcp_pernet(struct net *net) static inline struct nf_tcp_net *nf_tcp_pernet(struct net *net)
{ {
return &net->ct.nf_ct_proto.tcp; return &net->ct.nf_ct_proto.tcp;
} }
static inline struct nf_udp_net *nf_udp_pernet(struct net *net) static inline struct nf_udp_net *nf_udp_pernet(struct net *net)
{ {
return &net->ct.nf_ct_proto.udp; return &net->ct.nf_ct_proto.udp;
} }
static inline struct nf_icmp_net *nf_icmp_pernet(struct net *net) static inline struct nf_icmp_net *nf_icmp_pernet(struct net *net)
{ {
return &net->ct.nf_ct_proto.icmp; return &net->ct.nf_ct_proto.icmp;
} }
static inline struct nf_icmp_net *nf_icmpv6_pernet(struct net *net) static inline struct nf_icmp_net *nf_icmpv6_pernet(struct net *net)
{ {
return &net->ct.nf_ct_proto.icmpv6; return &net->ct.nf_ct_proto.icmpv6;
} }
#endif #endif
#ifdef CONFIG_NF_CT_PROTO_DCCP #ifdef CONFIG_NF_CT_PROTO_DCCP
static inline struct nf_dccp_net *nf_dccp_pernet(struct net *net) static inline struct nf_dccp_net *nf_dccp_pernet(struct net *net)
{ {
return &net->ct.nf_ct_proto.dccp; return &net->ct.nf_ct_proto.dccp;
} }
#endif #endif
#ifdef CONFIG_NF_CT_PROTO_SCTP #ifdef CONFIG_NF_CT_PROTO_SCTP
static inline struct nf_sctp_net *nf_sctp_pernet(struct net *net) static inline struct nf_sctp_net *nf_sctp_pernet(struct net *net)
{ {
return &net->ct.nf_ct_proto.sctp; return &net->ct.nf_ct_proto.sctp;
} }
#endif #endif

View File

@ -124,7 +124,7 @@ struct nf_conntrack_tuple_hash {
#if IS_ENABLED(CONFIG_NETFILTER) #if IS_ENABLED(CONFIG_NETFILTER)
static inline bool __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1, static inline bool __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1,
const struct nf_conntrack_tuple *t2) const struct nf_conntrack_tuple *t2)
{ {
return (nf_inet_addr_cmp(&t1->src.u3, &t2->src.u3) && return (nf_inet_addr_cmp(&t1->src.u3, &t2->src.u3) &&
t1->src.u.all == t2->src.u.all && t1->src.u.all == t2->src.u.all &&
t1->src.l3num == t2->src.l3num); t1->src.l3num == t2->src.l3num);

View File

@ -272,7 +272,7 @@ config IP_NF_TARGET_CLUSTERIP
The CLUSTERIP target allows you to build load-balancing clusters of The CLUSTERIP target allows you to build load-balancing clusters of
network servers without having a dedicated load-balancing network servers without having a dedicated load-balancing
router/server/switch. router/server/switch.
To compile it as a module, choose M here. If unsure, say N. To compile it as a module, choose M here. If unsure, say N.
config IP_NF_TARGET_ECN config IP_NF_TARGET_ECN
@ -281,7 +281,7 @@ config IP_NF_TARGET_ECN
depends on NETFILTER_ADVANCED depends on NETFILTER_ADVANCED
---help--- ---help---
This option adds a `ECN' target, which can be used in the iptables mangle This option adds a `ECN' target, which can be used in the iptables mangle
table. table.
You can use this target to remove the ECN bits from the IPv4 header of You can use this target to remove the ECN bits from the IPv4 header of
an IP packet. This is particularly useful, if you need to work around an IP packet. This is particularly useful, if you need to work around
@ -306,7 +306,7 @@ config IP_NF_RAW
This option adds a `raw' table to iptables. This table is the very This option adds a `raw' table to iptables. This table is the very
first in the netfilter framework and hooks in at the PREROUTING first in the netfilter framework and hooks in at the PREROUTING
and OUTPUT chains. and OUTPUT chains.
If you want to compile it as a module, say M here and read If you want to compile it as a module, say M here and read
<file:Documentation/kbuild/modules.rst>. If unsure, say `N'. <file:Documentation/kbuild/modules.rst>. If unsure, say `N'.
@ -318,7 +318,7 @@ config IP_NF_SECURITY
help help
This option adds a `security' table to iptables, for use This option adds a `security' table to iptables, for use
with Mandatory Access Control (MAC) policy. with Mandatory Access Control (MAC) policy.
If unsure, say N. If unsure, say N.
endif # IP_NF_IPTABLES endif # IP_NF_IPTABLES

View File

@ -31,7 +31,7 @@ obj-$(CONFIG_NFT_DUP_IPV4) += nft_dup_ipv4.o
# flow table support # flow table support
obj-$(CONFIG_NF_FLOW_TABLE_IPV4) += nf_flow_table_ipv4.o obj-$(CONFIG_NF_FLOW_TABLE_IPV4) += nf_flow_table_ipv4.o
# generic IP tables # generic IP tables
obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o
# the three instances of ip_tables # the three instances of ip_tables

View File

@ -20,7 +20,7 @@ config NETFILTER_FAMILY_ARP
bool bool
config NETFILTER_NETLINK_ACCT config NETFILTER_NETLINK_ACCT
tristate "Netfilter NFACCT over NFNETLINK interface" tristate "Netfilter NFACCT over NFNETLINK interface"
depends on NETFILTER_ADVANCED depends on NETFILTER_ADVANCED
select NETFILTER_NETLINK select NETFILTER_NETLINK
help help
@ -34,7 +34,7 @@ config NETFILTER_NETLINK_QUEUE
help help
If this option is enabled, the kernel will include support If this option is enabled, the kernel will include support
for queueing packets via NFNETLINK. for queueing packets via NFNETLINK.
config NETFILTER_NETLINK_LOG config NETFILTER_NETLINK_LOG
tristate "Netfilter LOG over NFNETLINK interface" tristate "Netfilter LOG over NFNETLINK interface"
default m if NETFILTER_ADVANCED=n default m if NETFILTER_ADVANCED=n
@ -1502,7 +1502,7 @@ config NETFILTER_XT_MATCH_REALM
This option adds a `realm' match, which allows you to use the realm This option adds a `realm' match, which allows you to use the realm
key from the routing subsystem inside iptables. key from the routing subsystem inside iptables.
This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option
in tc world. in tc world.
If you want to compile it as a module, say M here and read If you want to compile it as a module, say M here and read
@ -1523,7 +1523,7 @@ config NETFILTER_XT_MATCH_SCTP
depends on NETFILTER_ADVANCED depends on NETFILTER_ADVANCED
default IP_SCTP default IP_SCTP
help help
With this option enabled, you will be able to use the With this option enabled, you will be able to use the
`sctp' match in order to match on SCTP source/destination ports `sctp' match in order to match on SCTP source/destination ports
and SCTP chunk types. and SCTP chunk types.

View File

@ -124,7 +124,7 @@ nf_flow_table-objs := nf_flow_table_core.o nf_flow_table_ip.o
obj-$(CONFIG_NF_FLOW_TABLE_INET) += nf_flow_table_inet.o obj-$(CONFIG_NF_FLOW_TABLE_INET) += nf_flow_table_inet.o
# generic X tables # generic X tables
obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o
# combos # combos