freebsd-src/sbin/ipfw
Arseny Smalyuk c31f8b7bd8 ipfw: add support radix tables and table lookup for MAC addresses
By analogy with IP address matching, add a way to use ipfw radix
tables for MAC matching. This is implemented using new ipfw table
with mac:radix type. Also there are src-mac and dst-mac lookup
commands added.

Usage example:
  ipfw table 1 create type mac
  ipfw table 1 add 11:22:33:44:55:66/48
  ipfw add skipto tablearg src-mac 'table(1)'
  ipfw add deny src-mac 'table(1, 100)'
  ipfw add deny lookup dst-mac 1

Note: sysctl net.link.ether.ipfw=1 should be set to enable ipfw
filtering on L2.

Reviewed by:	melifaro
Obtained from:	Yandex LLC
Relnotes:	yes
Sponsored by:	Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D35103

(cherry picked from commit 81cac3906e)
2022-07-14 16:04:22 +03:00
..
altq.c ipfw(8): Fix most warnings with the default WARNS level. 2020-07-13 17:51:04 +00:00
dummynet.c ipfw: use unsigned int for dummynet bandwidth 2021-08-26 14:05:26 +02:00
ipfw.8 ipfw: add support radix tables and table lookup for MAC addresses 2022-07-14 16:04:22 +03:00
ipfw2.c ipfw: add support radix tables and table lookup for MAC addresses 2022-07-14 16:04:22 +03:00
ipfw2.h ipfw: add support radix tables and table lookup for MAC addresses 2022-07-14 16:04:22 +03:00
ipv6.c ipfw(8): Fix most warnings with the default WARNS level. 2020-07-13 17:51:04 +00:00
main.c ipfw: Introduce dnctl 2021-09-14 22:00:24 +02:00
Makefile ipfw: Introduce dnctl 2021-09-14 22:00:24 +02:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nat.c Allow setting alias port ranges in libalias and ipfw. 2021-02-17 10:13:54 -08:00
nat64clat.c Fix SIGSEGV in ipfw(8) when NAT64 prefix length is omitted. 2020-08-05 11:26:49 +00:00
nat64lsn.c [ipfw] quieten maybe-uninitialized errors in ipfw when compiled under mips-gcc-6.3.0. 2020-07-14 05:07:16 +00:00
nat64stl.c Fix SIGSEGV in ipfw(8) when NAT64 prefix length is omitted. 2020-08-05 11:26:49 +00:00
nptv6.c ipfw(8): Fix most warnings with the default WARNS level. 2020-07-13 17:51:04 +00:00
tables.c ipfw: add support radix tables and table lookup for MAC addresses 2022-07-14 16:04:22 +03:00