nftables carries a private copy of a number of system headers. These were mostly still being included with angle brackets as though they were system headers. Tested configurations of gcc would pick up the private copy in these cases but it has been reported that others do not. By using double quotes, developers are reminded that the code is using a private header which may differ from the system one. Signed-off-by: Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx> --- include/datatype.h | 2 +- include/erec.h | 4 ++-- include/expression.h | 30 +++++++++++++++--------------- include/exthdr.h | 4 ++-- include/fib.h | 2 +- include/gmputil.h | 2 +- include/linux/netfilter/nf_nat.h | 4 ++-- include/linux/netfilter_arp.h | 2 +- include/linux/netfilter_arp/arp_tables.h | 2 +- include/linux/netfilter_bridge.h | 2 +- include/linux/netfilter_bridge/ebtables.h | 2 +- include/linux/netfilter_decnet.h | 2 +- include/linux/netfilter_ipv4.h | 2 +- include/linux/netfilter_ipv4/ip_tables.h | 2 +- include/linux/netfilter_ipv6.h | 2 +- include/linux/netfilter_ipv6/ip6_tables.h | 2 +- include/mnl.h | 4 ++-- include/netlink.h | 4 ++-- include/nftables.h | 4 ++-- include/parser.h | 4 ++-- include/payload.h | 4 ++-- include/proto.h | 6 +++--- include/rule.h | 10 +++++----- include/statement.h | 10 +++++----- include/tcpopt.h | 6 +++--- include/utils.h | 4 ++-- include/xt.h | 2 +- src/cli.c | 12 ++++++------ src/ct.c | 22 +++++++++++----------- src/datatype.c | 16 ++++++++-------- src/erec.c | 6 +++--- src/evaluate.c | 20 ++++++++++---------- src/expression.c | 18 +++++++++--------- src/exthdr.c | 8 ++++---- src/fib.c | 14 +++++++------- src/gmputil.c | 6 +++--- src/hash.c | 12 ++++++------ src/iface.c | 8 ++++---- src/json.c | 18 +++++++++--------- src/libnftables.c | 12 ++++++------ src/main.c | 6 +++--- src/mergesort.c | 6 +++--- src/meta.c | 22 +++++++++++----------- src/mnl.c | 10 +++++----- src/monitor.c | 26 +++++++++++++------------- src/netlink.c | 26 +++++++++++++------------- src/netlink_delinearize.c | 20 ++++++++++---------- src/netlink_linearize.c | 16 ++++++++-------- src/numgen.c | 12 ++++++------ src/parser_bison.y | 24 ++++++++++++------------ src/parser_json.c | 24 ++++++++++++------------ src/payload.c | 18 +++++++++--------- src/proto.c | 12 ++++++------ src/rbtree.c | 2 +- src/rt.c | 16 ++++++++-------- src/rule.c | 16 ++++++++-------- src/scanner.l | 10 +++++----- src/segtree.c | 10 +++++----- src/services.c | 4 ++-- src/statement.c | 16 ++++++++-------- src/tcpopt.c | 8 ++++---- src/utils.c | 4 ++-- src/xt.c | 20 ++++++++++---------- 63 files changed, 312 insertions(+), 312 deletions(-) diff --git a/include/datatype.h b/include/datatype.h index b641f0e..b5ae529 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -1,7 +1,7 @@ #ifndef NFTABLES_DATATYPE_H #define NFTABLES_DATATYPE_H -#include <json.h> +#include "json.h" /** * enum datatypes diff --git a/include/erec.h b/include/erec.h index 79a1629..31f6dd7 100644 --- a/include/erec.h +++ b/include/erec.h @@ -1,8 +1,8 @@ #ifndef NFTABLES_EREC_H #define NFTABLES_EREC_H -#include <nftables.h> -#include <utils.h> +#include "nftables.h" +#include "utils.h" /** * enum error_record_types diff --git a/include/expression.h b/include/expression.h index 15af35e..f16121e 100644 --- a/include/expression.h +++ b/include/expression.h @@ -2,14 +2,14 @@ #define NFTABLES_EXPRESSION_H #include <stdbool.h> -#include <gmputil.h> -#include <linux/netfilter/nf_tables.h> +#include "gmputil.h" +#include "linux/netfilter/nf_tables.h" -#include <nftables.h> -#include <datatype.h> -#include <utils.h> -#include <list.h> -#include <json.h> +#include "nftables.h" +#include "datatype.h" +#include "utils.h" +#include "list.h" +#include "json.h" /** * enum expr_types @@ -180,14 +180,14 @@ enum expr_flags { EXPR_F_BOOLEAN = 0x10, }; -#include <payload.h> -#include <exthdr.h> -#include <fib.h> -#include <numgen.h> -#include <meta.h> -#include <rt.h> -#include <hash.h> -#include <ct.h> +#include "payload.h" +#include "exthdr.h" +#include "fib.h" +#include "numgen.h" +#include "meta.h" +#include "rt.h" +#include "hash.h" +#include "ct.h" /** * struct expr diff --git a/include/exthdr.h b/include/exthdr.h index 32f99c9..ad04043 100644 --- a/include/exthdr.h +++ b/include/exthdr.h @@ -1,8 +1,8 @@ #ifndef NFTABLES_EXTHDR_H #define NFTABLES_EXTHDR_H -#include <proto.h> -#include <tcpopt.h> +#include "proto.h" +#include "tcpopt.h" /** * struct exthdr_desc - extension header description diff --git a/include/fib.h b/include/fib.h index 67edccf..4722a8f 100644 --- a/include/fib.h +++ b/include/fib.h @@ -1,7 +1,7 @@ #ifndef NFTABLES_FIB_H #define NFTABLES_FIB_H -#include <linux/netfilter/nf_tables.h> +#include "linux/netfilter/nf_tables.h" extern const char *fib_result_str(enum nft_fib_result result); extern struct expr *fib_expr_alloc(const struct location *loc, diff --git a/include/gmputil.h b/include/gmputil.h index 73959c1..ce07ebb 100644 --- a/include/gmputil.h +++ b/include/gmputil.h @@ -6,7 +6,7 @@ #ifdef HAVE_LIBGMP #include <gmp.h> #else -#include <mini-gmp.h> +#include "mini-gmp.h" #include <stdio.h> /* mini-gmp doesn't come with gmp_vfprintf, so we use our own minimal variant */ extern int mpz_vfprintf(FILE *fp, const char *format, va_list args); diff --git a/include/linux/netfilter/nf_nat.h b/include/linux/netfilter/nf_nat.h index 0880781..fb30f82 100644 --- a/include/linux/netfilter/nf_nat.h +++ b/include/linux/netfilter/nf_nat.h @@ -1,8 +1,8 @@ #ifndef _NETFILTER_NF_NAT_H #define _NETFILTER_NF_NAT_H -#include <linux/netfilter.h> -#include <linux/netfilter/nf_conntrack_tuple_common.h> +#include "linux/netfilter.h" +#include "linux/netfilter/nf_conntrack_tuple_common.h" #define NF_NAT_RANGE_MAP_IPS (1 << 0) #define NF_NAT_RANGE_PROTO_SPECIFIED (1 << 1) diff --git a/include/linux/netfilter_arp.h b/include/linux/netfilter_arp.h index 92bc6dd..3d207f6 100644 --- a/include/linux/netfilter_arp.h +++ b/include/linux/netfilter_arp.h @@ -5,7 +5,7 @@ * (C)2002 Rusty Russell IBM -- This code is GPL. */ -#include <linux/netfilter.h> +#include "linux/netfilter.h" /* There is no PF_ARP. */ #define NF_ARP 0 diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index bb1ec64..3988e0b 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h @@ -11,7 +11,7 @@ #include <linux/types.h> -#include <linux/netfilter_arp.h> +#include "linux/netfilter_arp.h" #include <linux/netfilter/x_tables.h> diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 5094ecc..fdcfca9 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h @@ -4,7 +4,7 @@ /* bridge-specific defines for netfilter. */ -#include <linux/netfilter.h> +#include "linux/netfilter.h" #include <linux/if_ether.h> #include <linux/if_vlan.h> #include <linux/if_pppox.h> diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index a225911..afdfa4b 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h @@ -12,7 +12,7 @@ #ifndef __LINUX_BRIDGE_EFF_H #define __LINUX_BRIDGE_EFF_H -#include <linux/netfilter_bridge.h> +#include "linux/netfilter_bridge.h" #define EBT_TABLE_MAXNAMELEN 32 #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN diff --git a/include/linux/netfilter_decnet.h b/include/linux/netfilter_decnet.h index ca70c6c..1401da6 100644 --- a/include/linux/netfilter_decnet.h +++ b/include/linux/netfilter_decnet.h @@ -7,7 +7,7 @@ * (C)1998 Rusty Russell -- This code is GPL. */ -#include <linux/netfilter.h> +#include "linux/netfilter.h" /* only for userspace compatibility */ /* IP Cache bits. */ diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 4d7ba3e..53a272e 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h @@ -5,7 +5,7 @@ * (C)1998 Rusty Russell -- This code is GPL. */ -#include <linux/netfilter.h> +#include "linux/netfilter.h" /* only for userspace compatibility */ /* IP Cache bits. */ diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 38542b4..e672c3f 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h @@ -17,7 +17,7 @@ #include <linux/types.h> -#include <linux/netfilter_ipv4.h> +#include "linux/netfilter_ipv4.h" #include <linux/netfilter/x_tables.h> diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 7430b39..45f5fa6 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h @@ -8,7 +8,7 @@ * it's amazing what adding a bunch of 6s can do =8^) */ -#include <linux/netfilter.h> +#include "linux/netfilter.h" /* only for userspace compatibility */ /* IP Cache bits. */ diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 4432dd1..2a8d730 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h @@ -17,7 +17,7 @@ #include <linux/types.h> -#include <linux/netfilter_ipv6.h> +#include "linux/netfilter_ipv6.h" #include <linux/netfilter/x_tables.h> diff --git a/include/mnl.h b/include/mnl.h index cb131bb..4f9da49 100644 --- a/include/mnl.h +++ b/include/mnl.h @@ -1,8 +1,8 @@ #ifndef _NFTABLES_MNL_H_ #define _NFTABLES_MNL_H_ -#include <list.h> -#include <netlink.h> +#include "list.h" +#include "netlink.h" #include <libmnl/libmnl.h> struct mnl_socket *netlink_open_sock(void); diff --git a/include/netlink.h b/include/netlink.h index d153e2b..76435db 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -10,9 +10,9 @@ #include <libnftnl/flowtable.h> #include <linux/netlink.h> -#include <linux/netfilter/nf_tables.h> +#include "linux/netfilter/nf_tables.h" -#include <rule.h> +#include "rule.h" struct netlink_parse_ctx { struct list_head *msgs; diff --git a/include/nftables.h b/include/nftables.h index 5e209b4..ce2efde 100644 --- a/include/nftables.h +++ b/include/nftables.h @@ -4,8 +4,8 @@ #include <stdbool.h> #include <stdarg.h> #include <limits.h> -#include <utils.h> -#include <nftables/libnftables.h> +#include "utils.h" +#include "nftables/libnftables.h" struct cookie { FILE *fp; diff --git a/include/parser.h b/include/parser.h index ea41ca0..31dbdf2 100644 --- a/include/parser.h +++ b/include/parser.h @@ -1,8 +1,8 @@ #ifndef NFTABLES_PARSER_H #define NFTABLES_PARSER_H -#include <list.h> -#include <rule.h> // FIXME +#include "list.h" +#include "rule.h" // FIXME #define MAX_INCLUDE_DEPTH 16 #define TABSIZE 8 diff --git a/include/payload.h b/include/payload.h index 161c64a..86e185e 100644 --- a/include/payload.h +++ b/include/payload.h @@ -1,8 +1,8 @@ #ifndef NFTABLES_PAYLOAD_H #define NFTABLES_PAYLOAD_H -#include <nftables.h> -#include <proto.h> +#include "nftables.h" +#include "proto.h" extern struct expr *payload_expr_alloc(const struct location *loc, const struct proto_desc *desc, diff --git a/include/proto.h b/include/proto.h index 9a9f925..0c58808 100644 --- a/include/proto.h +++ b/include/proto.h @@ -1,9 +1,9 @@ #ifndef NFTABLES_PROTO_H #define NFTABLES_PROTO_H -#include <nftables.h> -#include <datatype.h> -#include <linux/netfilter/nf_tables.h> +#include "nftables.h" +#include "datatype.h" +#include "linux/netfilter/nf_tables.h" /** * enum proto_bases - protocol bases diff --git a/include/rule.h b/include/rule.h index cfecf7f..5dc21a3 100644 --- a/include/rule.h +++ b/include/rule.h @@ -2,8 +2,8 @@ #define NFTABLES_RULE_H #include <stdint.h> -#include <nftables.h> -#include <list.h> +#include "nftables.h" +#include "list.h" /** * struct handle_spec - handle ID @@ -289,7 +289,7 @@ extern const char *set_policy2str(uint32_t policy); extern void set_print(const struct set *set, struct output_ctx *octx); extern void set_print_plain(const struct set *s, struct output_ctx *octx); -#include <statement.h> +#include "statement.h" struct counter { uint64_t packets; @@ -537,8 +537,8 @@ extern struct cmd *cmd_alloc_obj_ct(enum cmd_ops op, int type, const struct location *loc, struct obj *obj); extern void cmd_free(struct cmd *cmd); -#include <payload.h> -#include <expression.h> +#include "payload.h" +#include "expression.h" /** * struct eval_ctx - evaluation context diff --git a/include/statement.h b/include/statement.h index de26549..ee7d9b7 100644 --- a/include/statement.h +++ b/include/statement.h @@ -1,9 +1,9 @@ #ifndef NFTABLES_STATEMENT_H #define NFTABLES_STATEMENT_H -#include <list.h> -#include <expression.h> -#include <json.h> +#include "list.h" +#include "expression.h" +#include "json.h" extern struct stmt *expr_stmt_alloc(const struct location *loc, struct expr *expr); @@ -48,7 +48,7 @@ struct payload_stmt { extern struct stmt *payload_stmt_alloc(const struct location *loc, struct expr *payload, struct expr *expr); -#include <meta.h> +#include "meta.h" struct meta_stmt { enum nft_meta_keys key; const struct meta_template *tmpl; @@ -136,7 +136,7 @@ struct quota_stmt { struct stmt *quota_stmt_alloc(const struct location *loc); -#include <ct.h> +#include "ct.h" struct ct_stmt { enum nft_ct_keys key; const struct ct_template *tmpl; diff --git a/include/tcpopt.h b/include/tcpopt.h index ffdbcb0..88bbb7d 100644 --- a/include/tcpopt.h +++ b/include/tcpopt.h @@ -1,9 +1,9 @@ #ifndef NFTABLES_TCPOPT_H #define NFTABLES_TCPOPT_H -#include <proto.h> -#include <exthdr.h> -#include <statement.h> +#include "proto.h" +#include "exthdr.h" +#include "statement.h" extern struct expr *tcpopt_expr_alloc(const struct location *loc, uint8_t type, uint8_t field); diff --git a/include/utils.h b/include/utils.h index 01560ea..b08cd39 100644 --- a/include/utils.h +++ b/include/utils.h @@ -8,8 +8,8 @@ #include <stdio.h> #include <unistd.h> #include <assert.h> -#include <list.h> -#include <gmputil.h> +#include "list.h" +#include "gmputil.h" #define BITS_PER_BYTE 8 diff --git a/include/xt.h b/include/xt.h index 753511e..5e3c3f6 100644 --- a/include/xt.h +++ b/include/xt.h @@ -23,7 +23,7 @@ void stmt_xt_postprocess(struct rule_pp_ctx *rctx, struct stmt *stmt, static inline void xt_stmt_xlate(const struct stmt *stmt) {} static inline void xt_stmt_release(const struct stmt *stmt) {} -#include <erec.h> +#include "erec.h" static inline void netlink_parse_target(struct netlink_parse_ctx *ctx, const struct location *loc, diff --git a/src/cli.c b/src/cli.c index 241ea01..27e9f1c 100644 --- a/src/cli.c +++ b/src/cli.c @@ -24,12 +24,12 @@ #include <readline/readline.h> #include <readline/history.h> -#include <nftables.h> -#include <parser.h> -#include <erec.h> -#include <utils.h> -#include <iface.h> -#include <cli.h> +#include "nftables.h" +#include "parser.h" +#include "erec.h" +#include "utils.h" +#include "iface.h" +#include "cli.h" #include <libmnl/libmnl.h> diff --git a/src/ct.c b/src/ct.c index 1d50382..3e5514c 100644 --- a/src/ct.c +++ b/src/ct.c @@ -17,19 +17,19 @@ #include <string.h> #include <netinet/ip.h> -#include <linux/netfilter.h> -#include <linux/netfilter/nf_tables.h> -#include <linux/netfilter/nf_conntrack_common.h> -#include <linux/netfilter/nf_conntrack_tuple_common.h> +#include "linux/netfilter.h" +#include "linux/netfilter/nf_tables.h" +#include "linux/netfilter/nf_conntrack_common.h" +#include "linux/netfilter/nf_conntrack_tuple_common.h" #include <errno.h> -#include <erec.h> -#include <expression.h> -#include <datatype.h> -#include <ct.h> -#include <gmputil.h> -#include <utils.h> -#include <statement.h> +#include "erec.h" +#include "expression.h" +#include "datatype.h" +#include "ct.h" +#include "gmputil.h" +#include "utils.h" +#include "statement.h" #define CONNLABEL_CONF DEFAULT_INCLUDE_PATH "/connlabel.conf" diff --git a/src/datatype.c b/src/datatype.c index c77d228..7ff9a20 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -16,16 +16,16 @@ #include <netdb.h> #include <arpa/inet.h> #include <linux/types.h> -#include <linux/netfilter.h> +#include "linux/netfilter.h" #include <linux/icmpv6.h> -#include <nftables.h> -#include <datatype.h> -#include <expression.h> -#include <gmputil.h> -#include <erec.h> -#include <netlink.h> -#include <json.h> +#include "nftables.h" +#include "datatype.h" +#include "expression.h" +#include "gmputil.h" +#include "erec.h" +#include "netlink.h" +#include "json.h" #include <netinet/ip_icmp.h> diff --git a/src/erec.c b/src/erec.c index 617c04a..e436da8 100644 --- a/src/erec.c +++ b/src/erec.c @@ -15,9 +15,9 @@ #include <stdarg.h> #include <stdlib.h> -#include <netlink.h> -#include <gmputil.h> -#include <erec.h> +#include "netlink.h" +#include "gmputil.h" +#include "erec.h" static const struct input_descriptor internal_indesc = { .type = INDESC_INTERNAL, diff --git a/src/evaluate.c b/src/evaluate.c index 4eb36e2..b5cdc2b 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -14,22 +14,22 @@ #include <stdint.h> #include <string.h> #include <arpa/inet.h> -#include <linux/netfilter.h> -#include <linux/netfilter_arp.h> -#include <linux/netfilter/nf_tables.h> +#include "linux/netfilter.h" +#include "linux/netfilter_arp.h" +#include "linux/netfilter/nf_tables.h" #include <netinet/ip_icmp.h> #include <netinet/icmp6.h> #include <net/ethernet.h> #include <net/if.h> #include <errno.h> -#include <expression.h> -#include <statement.h> -#include <rule.h> -#include <erec.h> -#include <gmputil.h> -#include <utils.h> -#include <xt.h> +#include "expression.h" +#include "statement.h" +#include "rule.h" +#include "erec.h" +#include "gmputil.h" +#include "utils.h" +#include "xt.h" static int expr_evaluate(struct eval_ctx *ctx, struct expr **expr); diff --git a/src/expression.c b/src/expression.c index bea0f4c..53bcd62 100644 --- a/src/expression.c +++ b/src/expression.c @@ -15,15 +15,15 @@ #include <string.h> #include <limits.h> -#include <expression.h> -#include <statement.h> -#include <datatype.h> -#include <rule.h> -#include <gmputil.h> -#include <utils.h> -#include <list.h> -#include <erec.h> -#include <json.h> +#include "expression.h" +#include "statement.h" +#include "datatype.h" +#include "rule.h" +#include "gmputil.h" +#include "utils.h" +#include "list.h" +#include "erec.h" +#include "json.h" struct expr *expr_alloc(const struct location *loc, const struct expr_ops *ops, const struct datatype *dtype, enum byteorder byteorder, diff --git a/src/exthdr.c b/src/exthdr.c index cb0a58e..033099f 100644 --- a/src/exthdr.c +++ b/src/exthdr.c @@ -18,10 +18,10 @@ #include <netinet/in.h> #include <netinet/ip6.h> -#include <utils.h> -#include <headers.h> -#include <expression.h> -#include <statement.h> +#include "utils.h" +#include "headers.h" +#include "expression.h" +#include "statement.h" static void exthdr_expr_print(const struct expr *expr, struct output_ctx *octx) { diff --git a/src/fib.c b/src/fib.c index 9a19cc3..c3bcc1f 100644 --- a/src/fib.c +++ b/src/fib.c @@ -8,14 +8,14 @@ * published by the Free Software Foundation. */ -#include <nftables.h> -#include <erec.h> -#include <expression.h> -#include <datatype.h> -#include <gmputil.h> -#include <utils.h> +#include "nftables.h" +#include "erec.h" +#include "expression.h" +#include "datatype.h" +#include "gmputil.h" +#include "utils.h" #include <string.h> -#include <fib.h> +#include "fib.h" #include <linux/rtnetlink.h> #include <net/if.h> diff --git a/src/gmputil.c b/src/gmputil.c index a25f42e..6ac0dc5 100644 --- a/src/gmputil.c +++ b/src/gmputil.c @@ -15,9 +15,9 @@ #include <unistd.h> #include <string.h> -#include <nftables.h> -#include <datatype.h> -#include <utils.h> +#include "nftables.h" +#include "datatype.h" +#include "utils.h" void mpz_bitmask(mpz_t rop, unsigned int width) { diff --git a/src/hash.c b/src/hash.c index a2d2314..df701b6 100644 --- a/src/hash.c +++ b/src/hash.c @@ -8,12 +8,12 @@ * published by the Free Software Foundation. */ -#include <nftables.h> -#include <expression.h> -#include <datatype.h> -#include <gmputil.h> -#include <hash.h> -#include <utils.h> +#include "nftables.h" +#include "expression.h" +#include "datatype.h" +#include "gmputil.h" +#include "hash.h" +#include "utils.h" static void hash_expr_print(const struct expr *expr, struct output_ctx *octx) { diff --git a/src/iface.c b/src/iface.c index d0e1834..b1fa098 100644 --- a/src/iface.c +++ b/src/iface.c @@ -16,10 +16,10 @@ #include <libmnl/libmnl.h> #include <linux/rtnetlink.h> -#include <nftables.h> -#include <list.h> -#include <netlink.h> -#include <iface.h> +#include "nftables.h" +#include "list.h" +#include "netlink.h" +#include "iface.h" static LIST_HEAD(iface_list); static bool iface_cache_init; diff --git a/src/json.c b/src/json.c index 11607b6..04063c6 100644 --- a/src/json.c +++ b/src/json.c @@ -1,21 +1,21 @@ #define _GNU_SOURCE #include <string.h> -#include <expression.h> -#include <list.h> -#include <netlink.h> -#include <rule.h> -#include <rt.h> +#include "expression.h" +#include "list.h" +#include "netlink.h" +#include "rule.h" +#include "rt.h" #include <netdb.h> #include <netinet/icmp6.h> #include <netinet/in.h> #include <netinet/ip.h> #include <netinet/ip_icmp.h> -#include <linux/netfilter.h> -#include <linux/netfilter/nf_log.h> -#include <linux/netfilter/nf_nat.h> -#include <linux/netfilter/nf_tables.h> +#include "linux/netfilter.h" +#include "linux/netfilter/nf_log.h" +#include "linux/netfilter/nf_nat.h" +#include "linux/netfilter/nf_tables.h" #include <pwd.h> #include <grp.h> #include <jansson.h> diff --git a/src/libnftables.c b/src/libnftables.c index 5bc7ba0..c522489 100644 --- a/src/libnftables.c +++ b/src/libnftables.c @@ -6,12 +6,12 @@ * published by the Free Software Foundation. * */ -#include <nftables/libnftables.h> -#include <erec.h> -#include <mnl.h> -#include <parser.h> -#include <utils.h> -#include <iface.h> +#include "nftables/libnftables.h" +#include "erec.h" +#include "mnl.h" +#include "parser.h" +#include "utils.h" +#include "iface.h" #include <errno.h> #include <stdlib.h> diff --git a/src/main.c b/src/main.c index f361597..0ca7d23 100644 --- a/src/main.c +++ b/src/main.c @@ -18,9 +18,9 @@ #include <fcntl.h> #include <sys/types.h> -#include <nftables/libnftables.h> -#include <utils.h> -#include <cli.h> +#include "nftables/libnftables.h" +#include "utils.h" +#include "cli.h" static struct nft_ctx *nft; diff --git a/src/mergesort.c b/src/mergesort.c index a835320..c731f55 100644 --- a/src/mergesort.c +++ b/src/mergesort.c @@ -7,9 +7,9 @@ */ #include <stdint.h> -#include <expression.h> -#include <gmputil.h> -#include <list.h> +#include "expression.h" +#include "gmputil.h" +#include "list.h" static int expr_msort_cmp(const struct expr *e1, const struct expr *e2); diff --git a/src/meta.c b/src/meta.c index ff0cb12..b8a5fdc 100644 --- a/src/meta.c +++ b/src/meta.c @@ -22,20 +22,20 @@ #include <pwd.h> #include <grp.h> #include <arpa/inet.h> -#include <linux/netfilter.h> +#include "linux/netfilter.h" #include <linux/pkt_sched.h> #include <linux/if_packet.h> -#include <nftables.h> -#include <expression.h> -#include <statement.h> -#include <datatype.h> -#include <meta.h> -#include <gmputil.h> -#include <utils.h> -#include <erec.h> -#include <iface.h> -#include <json.h> +#include "nftables.h" +#include "expression.h" +#include "statement.h" +#include "datatype.h" +#include "meta.h" +#include "gmputil.h" +#include "utils.h" +#include "erec.h" +#include "iface.h" +#include "json.h" static struct symbol_table *realm_tbl; void realm_table_meta_init(void) diff --git a/src/mnl.c b/src/mnl.c index 42eacab..137c6ed 100644 --- a/src/mnl.c +++ b/src/mnl.c @@ -20,16 +20,16 @@ #include <libnftnl/flowtable.h> #include <libnftnl/batch.h> -#include <linux/netfilter/nfnetlink.h> -#include <linux/netfilter/nf_tables.h> +#include "linux/netfilter/nfnetlink.h" +#include "linux/netfilter/nf_tables.h" -#include <mnl.h> +#include "mnl.h" #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <errno.h> -#include <utils.h> -#include <nftables.h> +#include "utils.h" +#include "nftables.h" uint32_t mnl_seqnum_alloc(unsigned int *seqnum) { diff --git a/src/monitor.c b/src/monitor.c index 4310c3b..54dff24 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -25,19 +25,19 @@ #include <libnftnl/udata.h> #include <libnftnl/ruleset.h> #include <libnftnl/common.h> -#include <linux/netfilter/nfnetlink.h> -#include <linux/netfilter/nf_tables.h> -#include <linux/netfilter.h> - -#include <nftables.h> -#include <netlink.h> -#include <mnl.h> -#include <expression.h> -#include <statement.h> -#include <gmputil.h> -#include <utils.h> -#include <erec.h> -#include <iface.h> +#include "linux/netfilter/nfnetlink.h" +#include "linux/netfilter/nf_tables.h" +#include "linux/netfilter.h" + +#include "nftables.h" +#include "netlink.h" +#include "mnl.h" +#include "expression.h" +#include "statement.h" +#include "gmputil.h" +#include "utils.h" +#include "erec.h" +#include "iface.h" #define nft_mon_print(monh, ...) nft_print(monh->ctx->octx, __VA_ARGS__) diff --git a/src/netlink.c b/src/netlink.c index 864947b..d4b1470 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -28,19 +28,19 @@ #include <libnftnl/udata.h> #include <libnftnl/ruleset.h> #include <libnftnl/common.h> -#include <linux/netfilter/nfnetlink.h> -#include <linux/netfilter/nf_tables.h> -#include <linux/netfilter.h> - -#include <nftables.h> -#include <netlink.h> -#include <mnl.h> -#include <expression.h> -#include <statement.h> -#include <gmputil.h> -#include <utils.h> -#include <erec.h> -#include <iface.h> +#include "linux/netfilter/nfnetlink.h" +#include "linux/netfilter/nf_tables.h" +#include "linux/netfilter.h" + +#include "nftables.h" +#include "netlink.h" +#include "mnl.h" +#include "expression.h" +#include "statement.h" +#include "gmputil.h" +#include "utils.h" +#include "erec.h" +#include "iface.h" #define nft_mon_print(monh, ...) nft_print(monh->ctx->octx, __VA_ARGS__) diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c index 7d882eb..8445cc4 100644 --- a/src/netlink_delinearize.c +++ b/src/netlink_delinearize.c @@ -13,20 +13,20 @@ #include <stdbool.h> #include <string.h> #include <limits.h> -#include <linux/netfilter/nf_tables.h> +#include "linux/netfilter/nf_tables.h" #include <arpa/inet.h> -#include <linux/netfilter.h> +#include "linux/netfilter.h" #include <net/ethernet.h> -#include <netlink.h> -#include <rule.h> -#include <statement.h> -#include <expression.h> -#include <gmputil.h> -#include <utils.h> -#include <erec.h> +#include "netlink.h" +#include "rule.h" +#include "statement.h" +#include "expression.h" +#include "gmputil.h" +#include "utils.h" +#include "erec.h" #include <sys/socket.h> #include <libnftnl/udata.h> -#include <xt.h> +#include "xt.h" static int netlink_parse_expr(const struct nftnl_expr *nle, struct netlink_parse_ctx *ctx); diff --git a/src/netlink_linearize.c b/src/netlink_linearize.c index 2ab8acc..fb622c4 100644 --- a/src/netlink_linearize.c +++ b/src/netlink_linearize.c @@ -9,18 +9,18 @@ * Development of this code funded by Astaro AG (http://www.astaro.com/) */ -#include <linux/netfilter/nf_tables.h> +#include "linux/netfilter/nf_tables.h" #include <string.h> -#include <rule.h> -#include <statement.h> -#include <expression.h> -#include <netlink.h> -#include <gmputil.h> -#include <utils.h> +#include "rule.h" +#include "statement.h" +#include "expression.h" +#include "netlink.h" +#include "gmputil.h" +#include "utils.h" #include <netinet/in.h> -#include <linux/netfilter.h> +#include "linux/netfilter.h" #include <libnftnl/udata.h> diff --git a/src/numgen.c b/src/numgen.c index b7751b0..32a3ce6 100644 --- a/src/numgen.c +++ b/src/numgen.c @@ -8,12 +8,12 @@ * published by the Free Software Foundation. */ -#include <nftables.h> -#include <expression.h> -#include <datatype.h> -#include <gmputil.h> -#include <numgen.h> -#include <utils.h> +#include "nftables.h" +#include "expression.h" +#include "datatype.h" +#include "gmputil.h" +#include "numgen.h" +#include "utils.h" static const char *numgen_type[NFT_NG_RANDOM + 1] = { [NFT_NG_INCREMENTAL] = "inc", diff --git a/src/parser_bison.y b/src/parser_bison.y index 1eb6ec6..b78ae47 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -16,23 +16,23 @@ #include <syslog.h> #include <netinet/ip.h> #include <netinet/if_ether.h> -#include <linux/netfilter.h> -#include <linux/netfilter/nf_tables.h> -#include <linux/netfilter/nf_conntrack_tuple_common.h> -#include <linux/netfilter/nf_nat.h> -#include <linux/netfilter/nf_log.h> +#include "linux/netfilter.h" +#include "linux/netfilter/nf_tables.h" +#include "linux/netfilter/nf_conntrack_tuple_common.h" +#include "linux/netfilter/nf_nat.h" +#include "linux/netfilter/nf_log.h" #include <netinet/ip_icmp.h> #include <netinet/icmp6.h> #include <libnftnl/common.h> #include <libnftnl/set.h> -#include <rule.h> -#include <statement.h> -#include <expression.h> -#include <headers.h> -#include <utils.h> -#include <parser.h> -#include <erec.h> +#include "rule.h" +#include "statement.h" +#include "expression.h" +#include "headers.h" +#include "utils.h" +#include "parser.h" +#include "erec.h" #include "parser_bison.h" diff --git a/src/parser_json.c b/src/parser_json.c index 336092b..01c9f4a 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -3,23 +3,23 @@ #include <string.h> #include <syslog.h> -#include <erec.h> -#include <expression.h> -#include <tcpopt.h> -#include <list.h> -#include <netlink.h> -#include <parser.h> -#include <rule.h> +#include "erec.h" +#include "expression.h" +#include "tcpopt.h" +#include "list.h" +#include "netlink.h" +#include "parser.h" +#include "rule.h" #include <netdb.h> #include <netinet/icmp6.h> #include <netinet/ip.h> #include <netinet/ip_icmp.h> -#include <linux/netfilter.h> -#include <linux/netfilter/nf_conntrack_tuple_common.h> -#include <linux/netfilter/nf_log.h> -#include <linux/netfilter/nf_nat.h> -#include <linux/netfilter/nf_tables.h> +#include "linux/netfilter.h" +#include "linux/netfilter/nf_conntrack_tuple_common.h" +#include "linux/netfilter/nf_log.h" +#include "linux/netfilter/nf_nat.h" +#include "linux/netfilter/nf_tables.h" #include <jansson.h> #define CTX_F_RHS (1 << 0) diff --git a/src/payload.c b/src/payload.c index 6517686..60a3c98 100644 --- a/src/payload.c +++ b/src/payload.c @@ -17,15 +17,15 @@ #include <string.h> #include <net/if_arp.h> #include <arpa/inet.h> -#include <linux/netfilter.h> - -#include <rule.h> -#include <expression.h> -#include <statement.h> -#include <payload.h> -#include <gmputil.h> -#include <utils.h> -#include <json.h> +#include "linux/netfilter.h" + +#include "rule.h" +#include "expression.h" +#include "statement.h" +#include "payload.h" +#include "gmputil.h" +#include "utils.h" +#include "json.h" bool payload_is_known(const struct expr *expr) { diff --git a/src/proto.c b/src/proto.c index ed011ef..d4b5b50 100644 --- a/src/proto.c +++ b/src/proto.c @@ -15,13 +15,13 @@ #include <string.h> #include <net/if_arp.h> #include <arpa/inet.h> -#include <linux/netfilter.h> +#include "linux/netfilter.h" -#include <expression.h> -#include <headers.h> -#include <proto.h> -#include <gmputil.h> -#include <utils.h> +#include "expression.h" +#include "headers.h" +#include "proto.h" +#include "gmputil.h" +#include "utils.h" const char *proto_base_names[] = { [PROTO_BASE_INVALID] = "invalid", diff --git a/src/rbtree.c b/src/rbtree.c index 325c012..1d3ead0 100644 --- a/src/rbtree.c +++ b/src/rbtree.c @@ -19,7 +19,7 @@ * */ -#include <rbtree.h> +#include "rbtree.h" static void __rb_rotate_left(struct rb_node *node, struct rb_root *root) { diff --git a/src/rt.c b/src/rt.c index caa4947..681498d 100644 --- a/src/rt.c +++ b/src/rt.c @@ -15,14 +15,14 @@ #include <stdint.h> #include <string.h> #include <arpa/inet.h> -#include <linux/netfilter.h> - -#include <nftables.h> -#include <expression.h> -#include <datatype.h> -#include <rt.h> -#include <rule.h> -#include <json.h> +#include "linux/netfilter.h" + +#include "nftables.h" +#include "expression.h" +#include "datatype.h" +#include "rt.h" +#include "rule.h" +#include "json.h" static struct symbol_table *realm_tbl; void realm_table_rt_init(void) diff --git a/src/rule.c b/src/rule.c index 3e8dea4..aee9645 100644 --- a/src/rule.c +++ b/src/rule.c @@ -16,18 +16,18 @@ #include <inttypes.h> #include <errno.h> -#include <statement.h> -#include <rule.h> -#include <utils.h> +#include "statement.h" +#include "rule.h" +#include "utils.h" #include <netdb.h> -#include <netlink.h> -#include <json.h> +#include "netlink.h" +#include "json.h" #include <libnftnl/common.h> #include <libnftnl/ruleset.h> #include <netinet/ip.h> -#include <linux/netfilter.h> -#include <linux/netfilter_arp.h> +#include "linux/netfilter.h" +#include "linux/netfilter_arp.h" void handle_free(struct handle *h) { @@ -1086,7 +1086,7 @@ void cmd_free(struct cmd *cmd) xfree(cmd); } -#include <netlink.h> +#include "netlink.h" static int __do_add_setelems(struct netlink_ctx *ctx, const struct handle *h, struct set *set, struct expr *expr, uint32_t flags) diff --git a/src/scanner.l b/src/scanner.l index 6a861cf..1d42280 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -15,12 +15,12 @@ #include <netinet/in.h> #include <arpa/inet.h> #include <linux/types.h> -#include <linux/netfilter.h> +#include "linux/netfilter.h" -#include <nftables.h> -#include <erec.h> -#include <rule.h> -#include <parser.h> +#include "nftables.h" +#include "erec.h" +#include "rule.h" +#include "parser.h" #include "parser_bison.h" #define YY_NO_INPUT diff --git a/src/segtree.c b/src/segtree.c index 8a8aa71..e4ccb71 100644 --- a/src/segtree.c +++ b/src/segtree.c @@ -12,11 +12,11 @@ #include <inttypes.h> #include <arpa/inet.h> -#include <rule.h> -#include <expression.h> -#include <gmputil.h> -#include <utils.h> -#include <rbtree.h> +#include "rule.h" +#include "expression.h" +#include "gmputil.h" +#include "utils.h" +#include "rbtree.h" /** * struct seg_tree - segment tree diff --git a/src/services.c b/src/services.c index 83c2672..13590a4 100644 --- a/src/services.c +++ b/src/services.c @@ -1,5 +1,5 @@ -#include <nftables.h> -#include <datatype.h> +#include "nftables.h" +#include "datatype.h" const struct symbol_table inet_service_tbl = { .base = BASE_DECIMAL, diff --git a/src/statement.c b/src/statement.c index ff4c8eb..6806abe 100644 --- a/src/statement.c +++ b/src/statement.c @@ -17,18 +17,18 @@ #include <syslog.h> #include <arpa/inet.h> -#include <linux/netfilter.h> +#include "linux/netfilter.h" #include <netinet/ip_icmp.h> #include <netinet/icmp6.h> -#include <statement.h> -#include <utils.h> -#include <list.h> -#include <xt.h> -#include <json.h> +#include "statement.h" +#include "utils.h" +#include "list.h" +#include "xt.h" +#include "json.h" #include <netinet/in.h> -#include <linux/netfilter/nf_nat.h> -#include <linux/netfilter/nf_log.h> +#include "linux/netfilter/nf_nat.h" +#include "linux/netfilter/nf_log.h" struct stmt *stmt_alloc(const struct location *loc, const struct stmt_ops *ops) diff --git a/src/tcpopt.c b/src/tcpopt.c index 66f021f..2a8710e 100644 --- a/src/tcpopt.c +++ b/src/tcpopt.c @@ -7,10 +7,10 @@ #include <netinet/ip6.h> #include <netinet/tcp.h> -#include <utils.h> -#include <headers.h> -#include <expression.h> -#include <tcpopt.h> +#include "utils.h" +#include "headers.h" +#include "expression.h" +#include "tcpopt.h" static const struct proto_hdr_template tcpopt_unknown_template = PROTO_HDR_TEMPLATE("unknown", &invalid_type, BYTEORDER_INVALID, 0, 0); diff --git a/src/utils.c b/src/utils.c index 47f5b79..bda0719 100644 --- a/src/utils.c +++ b/src/utils.c @@ -15,8 +15,8 @@ #include <unistd.h> #include <string.h> -#include <nftables.h> -#include <utils.h> +#include "nftables.h" +#include "utils.h" void __noreturn __memory_allocation_error(const char *filename, uint32_t line) { diff --git a/src/xt.c b/src/xt.c index 95d0c5f..1b0c2d0 100644 --- a/src/xt.c +++ b/src/xt.c @@ -13,18 +13,18 @@ #include <xtables.h> #include <getopt.h> #include <ctype.h> /* for isspace */ -#include <statement.h> -#include <netlink.h> -#include <xt.h> -#include <erec.h> +#include "statement.h" +#include "netlink.h" +#include "xt.h" +#include "erec.h" #include <libmnl/libmnl.h> -#include <linux/netfilter/nfnetlink.h> -#include <linux/netfilter/nf_tables_compat.h> -#include <linux/netfilter_ipv4/ip_tables.h> -#include <linux/netfilter_ipv6/ip6_tables.h> -#include <linux/netfilter_arp/arp_tables.h> -#include <linux/netfilter_bridge/ebtables.h> +#include "linux/netfilter/nfnetlink.h" +#include "linux/netfilter/nf_tables_compat.h" +#include "linux/netfilter_ipv4/ip_tables.h" +#include "linux/netfilter_ipv6/ip6_tables.h" +#include "linux/netfilter_arp/arp_tables.h" +#include "linux/netfilter_bridge/ebtables.h" void xt_stmt_xlate(const struct stmt *stmt) { -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html