Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jeremy Sowden and committed by
Pablo Neira Ayuso
b0edba2a 0286fbc6

+23 -23
+1 -1
include/linux/netfilter/x_tables.h
··· 340 340 341 341 /** 342 342 * xt_recseq - recursive seqcount for netfilter use 343 - * 343 + * 344 344 * Packet processing changes the seqcount only if no recursion happened 345 345 * get_counters() can use read_seqcount_begin()/read_seqcount_retry(), 346 346 * because we use the normal seqcount convention :
+1 -1
include/linux/netfilter_ipv6.h
··· 1 1 /* IPv6-specific defines for netfilter. 2 2 * (C)1998 Rusty Russell -- This code is GPL. 3 3 * (C)1999 David Jeffery 4 - * this header was blatantly ripped from netfilter_ipv4.h 4 + * this header was blatantly ripped from netfilter_ipv4.h 5 5 * it's amazing what adding a bunch of 6s can do =8^) 6 6 */ 7 7 #ifndef __LINUX_IP6_NETFILTER_H
+1 -1
include/net/netfilter/nf_conntrack_acct.h
··· 45 45 #else 46 46 return NULL; 47 47 #endif 48 - }; 48 + } 49 49 50 50 /* Check if connection tracking accounting is enabled */ 51 51 static inline bool nf_ct_acct_enabled(struct net *net)
+1 -1
include/net/netfilter/nf_conntrack_ecache.h
··· 61 61 #else 62 62 return NULL; 63 63 #endif 64 - }; 64 + } 65 65 66 66 #ifdef CONFIG_NF_CONNTRACK_EVENTS 67 67 /* This structure is passed to event handler */
+1 -1
include/net/netfilter/nf_conntrack_expect.h
··· 126 126 const union nf_inet_addr *, 127 127 u_int8_t, const __be16 *, const __be16 *); 128 128 void nf_ct_expect_put(struct nf_conntrack_expect *exp); 129 - int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, 129 + int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, 130 130 u32 portid, int report, unsigned int flags); 131 131 static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect, 132 132 unsigned int flags)
+7 -7
include/net/netfilter/nf_conntrack_l4proto.h
··· 181 181 #if IS_ENABLED(CONFIG_NF_CONNTRACK) 182 182 static inline struct nf_generic_net *nf_generic_pernet(struct net *net) 183 183 { 184 - return &net->ct.nf_ct_proto.generic; 184 + return &net->ct.nf_ct_proto.generic; 185 185 } 186 186 187 187 static inline struct nf_tcp_net *nf_tcp_pernet(struct net *net) 188 188 { 189 - return &net->ct.nf_ct_proto.tcp; 189 + return &net->ct.nf_ct_proto.tcp; 190 190 } 191 191 192 192 static inline struct nf_udp_net *nf_udp_pernet(struct net *net) 193 193 { 194 - return &net->ct.nf_ct_proto.udp; 194 + return &net->ct.nf_ct_proto.udp; 195 195 } 196 196 197 197 static inline struct nf_icmp_net *nf_icmp_pernet(struct net *net) 198 198 { 199 - return &net->ct.nf_ct_proto.icmp; 199 + return &net->ct.nf_ct_proto.icmp; 200 200 } 201 201 202 202 static inline struct nf_icmp_net *nf_icmpv6_pernet(struct net *net) 203 203 { 204 - return &net->ct.nf_ct_proto.icmpv6; 204 + return &net->ct.nf_ct_proto.icmpv6; 205 205 } 206 206 #endif 207 207 208 208 #ifdef CONFIG_NF_CT_PROTO_DCCP 209 209 static inline struct nf_dccp_net *nf_dccp_pernet(struct net *net) 210 210 { 211 - return &net->ct.nf_ct_proto.dccp; 211 + return &net->ct.nf_ct_proto.dccp; 212 212 } 213 213 #endif 214 214 215 215 #ifdef CONFIG_NF_CT_PROTO_SCTP 216 216 static inline struct nf_sctp_net *nf_sctp_pernet(struct net *net) 217 217 { 218 - return &net->ct.nf_ct_proto.sctp; 218 + return &net->ct.nf_ct_proto.sctp; 219 219 } 220 220 #endif 221 221
+1 -1
include/net/netfilter/nf_conntrack_tuple.h
··· 124 124 #if IS_ENABLED(CONFIG_NETFILTER) 125 125 static inline bool __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1, 126 126 const struct nf_conntrack_tuple *t2) 127 - { 127 + { 128 128 return (nf_inet_addr_cmp(&t1->src.u3, &t2->src.u3) && 129 129 t1->src.u.all == t2->src.u.all && 130 130 t1->src.l3num == t2->src.l3num);
+4 -4
net/ipv4/netfilter/Kconfig
··· 272 272 The CLUSTERIP target allows you to build load-balancing clusters of 273 273 network servers without having a dedicated load-balancing 274 274 router/server/switch. 275 - 275 + 276 276 To compile it as a module, choose M here. If unsure, say N. 277 277 278 278 config IP_NF_TARGET_ECN ··· 281 281 depends on NETFILTER_ADVANCED 282 282 ---help--- 283 283 This option adds a `ECN' target, which can be used in the iptables mangle 284 - table. 284 + table. 285 285 286 286 You can use this target to remove the ECN bits from the IPv4 header of 287 287 an IP packet. This is particularly useful, if you need to work around ··· 306 306 This option adds a `raw' table to iptables. This table is the very 307 307 first in the netfilter framework and hooks in at the PREROUTING 308 308 and OUTPUT chains. 309 - 309 + 310 310 If you want to compile it as a module, say M here and read 311 311 <file:Documentation/kbuild/modules.rst>. If unsure, say `N'. 312 312 ··· 318 318 help 319 319 This option adds a `security' table to iptables, for use 320 320 with Mandatory Access Control (MAC) policy. 321 - 321 + 322 322 If unsure, say N. 323 323 324 324 endif # IP_NF_IPTABLES
+1 -1
net/ipv4/netfilter/Makefile
··· 31 31 # flow table support 32 32 obj-$(CONFIG_NF_FLOW_TABLE_IPV4) += nf_flow_table_ipv4.o 33 33 34 - # generic IP tables 34 + # generic IP tables 35 35 obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o 36 36 37 37 # the three instances of ip_tables
+4 -4
net/netfilter/Kconfig
··· 20 20 bool 21 21 22 22 config NETFILTER_NETLINK_ACCT 23 - tristate "Netfilter NFACCT over NFNETLINK interface" 23 + tristate "Netfilter NFACCT over NFNETLINK interface" 24 24 depends on NETFILTER_ADVANCED 25 25 select NETFILTER_NETLINK 26 26 help ··· 34 34 help 35 35 If this option is enabled, the kernel will include support 36 36 for queueing packets via NFNETLINK. 37 - 37 + 38 38 config NETFILTER_NETLINK_LOG 39 39 tristate "Netfilter LOG over NFNETLINK interface" 40 40 default m if NETFILTER_ADVANCED=n ··· 1502 1502 This option adds a `realm' match, which allows you to use the realm 1503 1503 key from the routing subsystem inside iptables. 1504 1504 1505 - This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option 1505 + This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option 1506 1506 in tc world. 1507 1507 1508 1508 If you want to compile it as a module, say M here and read ··· 1523 1523 depends on NETFILTER_ADVANCED 1524 1524 default IP_SCTP 1525 1525 help 1526 - With this option enabled, you will be able to use the 1526 + With this option enabled, you will be able to use the 1527 1527 `sctp' match in order to match on SCTP source/destination ports 1528 1528 and SCTP chunk types. 1529 1529
+1 -1
net/netfilter/Makefile
··· 124 124 125 125 obj-$(CONFIG_NF_FLOW_TABLE_INET) += nf_flow_table_inet.o 126 126 127 - # generic X tables 127 + # generic X tables 128 128 obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o 129 129 130 130 # combos