summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2026-07-03 22:00:23 +0200
committerPaolo Abeni <pabeni@redhat.com>2026-07-03 22:00:24 +0200
commitb73bc9ca3686b78b642fb35dcc1fdf874ecb74a1 (patch)
treed70f925747b53ace867cbc79399698b9e3e16183 /include/net
parent5a5ebefdab9d1de4a4af09555dc7359cc3c0b34f (diff)
parentd4beefc90a66672e43fdf82b43e4b3c0b1b18c5e (diff)
downloadlinux-b73bc9ca3686b78b642fb35dcc1fdf874ecb74a1.tar.gz
linux-b73bc9ca3686b78b642fb35dcc1fdf874ecb74a1.zip
Merge tag 'nf-next-26-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next
Florian Westphal says: ==================== netfilter: updates for net-next The following patchset contains Netfilter updates for *net-next*. 1) Update nfnetlink_hook to dump the individual NAT type chains instead of the nat base chains to userspace. From Phil Sutter. 2) Replace strlcpy/strlcat() with snprintf() in x_tables, from Ian Bridges. 3) Start replacing u_int8_t and u_int16t with u8 and u16 in netfilter. From Carlos Grillet. 4) Replace strcpy() with strscpy() in netfilter, from David Laight. 5) Remove redundant NULL check before kvfree(). 6) Add parameter validation to xt_tcpmss. Ensure mss_min <= mss_max and invert <= 1. From Feng Wu. 7) Add checkentry for xt_dscp 'tos' match. Implement tos_mt_check() to reject invalid invert values. Also from Feng Wu. 8) Stop hashing nf_conntrack_helper by tuple. Switch to hashing by name and L4 protocol. 9) Remove tuples from conntrack helper definitions and port usage from broadcast helpers. Add netlink policy validation to prevent protocol number truncation. 10) Remove obsolete netfilter conntrack module parameters. 11) Bound num_counters in ebtables: do_replace() by MAX_EBT_ENTRIES to prevent oversized vmalloc_array() allocations. From Jiayuan Chen. 12) Make expectations created via nft_ct rules work with NAT. netfilter pull request nf-next-26-07-02 * tag 'nf-next-26-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: nft_ct: support expectation creation for natted flows netfilter: ebtables: bound num_counters like nentries in do_replace() netfilter: conntrack: remove obsolete module parameters netfilter: conntrack: get rid of tuple in helper definitions netfilter: nf_conntrack_helper: do not hash by tuple netfilter: xt_dscp: add checkentry for tos match netfilter: xt_tcpmss: add checkentry for parameter validation netfilter: remove redundant null check before kvfree() netfilter: avoid strcpy usage netfilter: replace u_int8_t and u_int16t with u8 and u16 netfilter: x_tables: replace strlcat() with snprintf() netfilter: nfnetlink_hook: Dump nat type chains ==================== Link: https://patch.msgid.link/20260702105003.13550-1-fw@strlen.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip_vs.h2
-rw-r--r--include/net/netfilter/nf_conntrack_helper.h10
2 files changed, 5 insertions, 7 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 49297fec448a..ed2e9bc1bb4e 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -2123,7 +2123,7 @@ void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp,
int outin);
int ip_vs_confirm_conntrack(struct sk_buff *skb);
void ip_vs_nfct_expect_related(struct sk_buff *skb, struct nf_conn *ct,
- struct ip_vs_conn *cp, u_int8_t proto,
+ struct ip_vs_conn *cp, u8 proto,
const __be16 port, int from_rs);
void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp);
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h
index c761cd8158b2..bc5427d239f4 100644
--- a/include/net/netfilter/nf_conntrack_helper.h
+++ b/include/net/netfilter/nf_conntrack_helper.h
@@ -43,11 +43,10 @@ struct nf_conntrack_helper {
refcount_t ct_refcnt;
- /* Tuple of things we will help (compared against server response) */
- struct nf_conntrack_tuple tuple;
+ u8 nfproto; /* NFPROTO_*, can be NFPROTO_UNSPEC */
+ u8 l4proto; /* IPPROTO_UDP/TCP */
- /* Function to call when data passes; return verdict, or -1 to
- invalidate. */
+ /* Function to call when data passes; return verdict */
int __rcu (*help)(struct sk_buff *skb, unsigned int protoff,
struct nf_conn *ct,
enum ip_conntrack_info conntrackinfo);
@@ -94,8 +93,7 @@ struct nf_conntrack_helper *nf_conntrack_helper_try_module_get(const char *name,
void nf_conntrack_helper_put(struct nf_conntrack_helper *helper);
void nf_ct_helper_init(struct nf_conntrack_helper *helper,
- u16 l3num, u16 protonum, const char *name,
- u16 default_port, u16 spec_port, u32 id,
+ u8 l3num, u16 protonum, const char *name,
const struct nf_conntrack_expect_policy *exp_pol,
u32 expect_class_max,
int (*help)(struct sk_buff *skb, unsigned int protoff,