History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next

Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for your net-next tree. This includes better integration with the routing subsystem for nf_tables, explicit notrack support and smaller updates. More specifically, they are: 1) Add fib lookup expression for nf_tables, from Florian Westphal. This new expression provides a native replacement for iptables addrtype and rp_filter matches. This is more flexible though, since we can populate the kernel flowi representation to inquire fib to accomodate new usecases, such as RTBH through skb mark. 2) Introduce rt expression for nf_tables, from Anders K. Pedersen. This new expression allow you to access skbuff route metadata, more specifically nexthop and classid fields. 3) Add notrack support for nf_tables, to skip conntracking, requested by many users already. 4) Add boilerplate code to allow to use nf_log infrastructure from nf_tables ingress. 5) Allow to mangle pkttype from nf_tables prerouting chain, to emulate the xtables cluster match, from Liping Zhang. 6) Move socket lookup code into generic nf_socket_* infrastructure so we can provide a native replacement for the xtables socket match. 7) Make sure nfnetlink_queue data that is updated on every packets is placed in a different cache from read-only data, from Florian Westphal. 8) Handle NF_STOLEN from nf_tables core, also from Florian Westphal. 9) Start round robin number generation in nft_numgen from zero, instead of n-1, for consistency with xtables statistics match, patch from Liping Zhang. 10) Set GFP_NOWARN flag in skbuff netlink allocations in nfnetlink_log, given we retry with a smaller allocation on failure, from Calvin Owens. 11) Cleanup xt_multiport to use switch(), from Gao feng. 12) Remove superfluous check in nft_immediate and nft_cmp, from Liping Zhang. ====================

David S. Miller committed 10 years ago

Commit 4cb551a2 parents 22ca904 886bc5031 files · +1610 −340Browse files

Showing the changes to include/uapi (1 of 31 files). Show all

Unified · Split

include/uapi/linux/netfilter/nf_tables.h+63−0
@@ -758,6 +758,19 @@ enum nft_meta_keys { · 757 unmodified lines
758758 NFT_META_PRANDOM,
759759 };
760760
761+/**
762+ * enum nft_rt_keys - nf_tables routing expression keys
763+ *
764+ * @NFT_RT_CLASSID: realm value of packet's route (skb->dst->tclassid)
765+ * @NFT_RT_NEXTHOP4: routing nexthop for IPv4
766+ * @NFT_RT_NEXTHOP6: routing nexthop for IPv6
767+ */
768+enum nft_rt_keys {
769+ NFT_RT_CLASSID,
770+ NFT_RT_NEXTHOP4,
771+ NFT_RT_NEXTHOP6,
772+};
773+
761774 /**
762775 * enum nft_hash_attributes - nf_tables hash expression netlink attributes
763776 *
@@ -796,6 +809,20 @@ enum nft_meta_attributes { · 32 unmodified lines
796809 };
797810 #define NFTA_META_MAX (__NFTA_META_MAX - 1)
798811
812+/**
813+ * enum nft_rt_attributes - nf_tables routing expression netlink attributes
814+ *
815+ * @NFTA_RT_DREG: destination register (NLA_U32)
816+ * @NFTA_RT_KEY: routing data item to load (NLA_U32: nft_rt_keys)
817+ */
818+enum nft_rt_attributes {
819+ NFTA_RT_UNSPEC,
820+ NFTA_RT_DREG,
821+ NFTA_RT_KEY,
822+ __NFTA_RT_MAX
823+};
824+#define NFTA_RT_MAX (__NFTA_RT_MAX - 1)
825+
799826 /**
800827 * enum nft_ct_keys - nf_tables ct expression keys
801828 *
@@ -1109,6 +1136,42 @@ enum nft_gen_attributes { · 307 unmodified lines
11091136 };
11101137 #define NFTA_GEN_MAX (__NFTA_GEN_MAX - 1)
11111138
1139+/*
1140+ * enum nft_fib_attributes - nf_tables fib expression netlink attributes
1141+ *
1142+ * @NFTA_FIB_DREG: destination register (NLA_U32)
1143+ * @NFTA_FIB_RESULT: desired result (NLA_U32)
1144+ * @NFTA_FIB_FLAGS: flowi fields to initialize when querying the FIB (NLA_U32)
1145+ *
1146+ * The FIB expression performs a route lookup according
1147+ * to the packet data.
1148+ */
1149+enum nft_fib_attributes {
1150+ NFTA_FIB_UNSPEC,
1151+ NFTA_FIB_DREG,
1152+ NFTA_FIB_RESULT,
1153+ NFTA_FIB_FLAGS,
1154+ __NFTA_FIB_MAX
1155+};
1156+#define NFTA_FIB_MAX (__NFTA_FIB_MAX - 1)
1157+
1158+enum nft_fib_result {
1159+ NFT_FIB_RESULT_UNSPEC,
1160+ NFT_FIB_RESULT_OIF,
1161+ NFT_FIB_RESULT_OIFNAME,
1162+ NFT_FIB_RESULT_ADDRTYPE,
1163+ __NFT_FIB_RESULT_MAX
1164+};
1165+#define NFT_FIB_RESULT_MAX (__NFT_FIB_RESULT_MAX - 1)
1166+
1167+enum nft_fib_flags {
1168+ NFTA_FIB_F_SADDR = 1 << 0, /* look up src */
1169+ NFTA_FIB_F_DADDR = 1 << 1, /* look up dst */
1170+ NFTA_FIB_F_MARK = 1 << 2, /* use skb->mark */
1171+ NFTA_FIB_F_IIF = 1 << 3, /* restrict to iif */
1172+ NFTA_FIB_F_OIF = 1 << 4, /* restrict to oif */
1173+};
1174+
11121175 /**
11131176 * enum nft_trace_attributes - nf_tables trace netlink attributes
11141177 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t