1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-13 18:13:51 +00:00
Phil Sutter 4039ce7ef4 netfilter: nf_tables: Introduce NFTA_DEVICE_PREFIX
This new attribute is supposed to be used instead of NFTA_DEVICE_NAME
for simple wildcard interface specs. It holds a NUL-terminated string
representing an interface name prefix to match on.

While kernel code to distinguish full names from prefixes in
NFTA_DEVICE_NAME is simpler than this solution, reusing the existing
attribute with different semantics leads to confusion between different
versions of kernel and user space though:

* With old kernels, wildcards submitted by user space are accepted yet
  silently treated as regular names.
* With old user space, wildcards submitted by kernel may cause crashes
  since libnftnl expects NUL-termination when there is none.

Using a distinct attribute type sanitizes these situations as the
receiving part detects and rejects the unexpected attribute nested in
*_HOOK_DEVS attributes.

Fixes: 6d07a289504a ("netfilter: nf_tables: Support wildcard netdev hook specs")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
2025-09-04 09:19:25 +02:00
..
2024-07-31 13:56:00 +02:00
2025-02-08 15:16:29 +00:00
2025-04-02 18:23:31 -07:00
2025-07-16 18:38:05 -07:00
2025-02-05 13:22:04 +09:00
2025-03-25 11:30:42 -07:00
2025-02-12 02:29:30 +00:00
2025-06-24 16:58:42 +02:00
2025-07-28 15:24:14 -07:00
2025-05-03 12:02:09 +02:00
2024-08-29 10:39:37 +02:00
2025-07-14 09:15:58 +02:00
2024-08-26 09:37:23 -07:00
2024-09-01 20:26:05 -07:00
2025-07-29 12:27:40 -04:00
2025-04-17 11:09:10 +02:00
2024-08-19 22:36:26 -04:00
2025-07-08 12:39:24 +02:00
2024-09-06 08:31:40 -06:00
2024-08-12 17:50:34 -07:00
2025-01-08 13:18:11 +01:00
2025-04-17 12:30:02 +02:00
2025-06-24 15:50:06 +02:00
2025-07-29 20:21:54 -07:00
2025-02-25 18:14:03 -08:00
2025-07-14 18:41:42 -07:00
2025-06-19 14:28:22 +02:00
2025-05-21 13:41:03 +02:00
2025-04-17 12:30:02 +02:00
2025-05-27 10:27:54 -04:00