FreeBSD src
Go to file
Kristof Provost 402dfb0a8d pf: Fix parsing of long table names
When parsing the nvlist for a struct pf_addr_wrap we unconditionally
tried to parse "ifname". This broke for PF_ADDR_TABLE when the table
name was longer than IFNAMSIZ. PF_TABLE_NAME_SIZE is longer than
IFNAMSIZ, so this is a valid configuration.

Only parse (or return) ifname or tblname for the corresponding
pf_addr_wrap type.

This manifested as a failure to set rules such as these, where the pfctl
optimiser generated an automatic table:

	pass in proto tcp to 192.168.0.1 port ssh
	pass in proto tcp to 192.168.0.2 port ssh
	pass in proto tcp to 192.168.0.3 port ssh
	pass in proto tcp to 192.168.0.4 port ssh
	pass in proto tcp to 192.168.0.5 port ssh
	pass in proto tcp to 192.168.0.6 port ssh
	pass in proto tcp to 192.168.0.7 port ssh

Reported by:	Florian Smeets
Tested by:	Florian Smeets
Reviewed by:	donner
X-MFC-With:	5c11c5a365
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D29962
2021-04-26 18:08:15 +02:00
.github/workflows Enable GitHub actions CI for stable/13 as well 2021-04-20 09:51:33 +01:00
bin sh: fix debug build 2021-04-11 09:23:14 +02:00
cddl dtrace tests: Fix tst.system.d after ping/ping6 unification 2021-04-23 10:28:09 -04:00
contrib Merge commit 'bd136720030ebb0b31e6d5a2236b9d0ddac71b94' 2021-04-25 08:42:31 +02:00
crypto Revert "Add workaround for a QoS-related bug in VMWare Workstation." 2021-04-25 17:17:22 -04:00
etc base: remove if_wg(4) and associated utilities, manpage 2021-03-17 09:14:48 -05:00
gnu dialog: fix macro redefinition 2021-03-01 16:01:44 +01:00
include Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
kerberos5 kerberos5: fix the WITH_OPENLDAP build 2021-01-30 00:07:50 -06:00
lib pf: Fix parsing of long table names 2021-04-26 18:08:15 +02:00
libexec rc: remove the 'addswap' script. 2021-04-26 10:22:47 +01:00
release release: move installworld before installkernel 2021-04-05 13:16:01 -04:00
rescue ping: add a ping6 hard link for backwards compatibility 2020-11-26 18:33:04 +00:00
sbin pfsync: Expose PFSYNCF_OK flag to userspace 2021-04-26 14:31:17 +02:00
secure Revert "Add workaround for a QoS-related bug in VMWare Workstation." 2021-04-25 17:17:22 -04:00
share tcp: fix man page 2021-04-24 22:40:34 +02:00
stand loader: do not output empty menu title 2021-04-21 14:50:23 +03:00
sys pf: Fix parsing of long table names 2021-04-26 18:08:15 +02:00
targets Remove kgmon(8) 2021-04-04 00:50:28 +03:00
tests pf tests: Test killing states with multiple labels 2021-04-26 14:14:21 +02:00
tools tools/build/bootstrap-m4: regenerate after d37f81e35b 2021-04-21 10:57:51 +01:00
usr.bin systat: Handle SIGWINCH to properly window resizing and adjust 2021-04-21 20:31:58 +02:00
usr.sbin pf: Allow multiple labels to be set on a rule 2021-04-26 14:14:21 +02:00
.arcconfig Remove history.immutable from .arcconfig 2021-04-13 12:36:25 +01:00
.arclint
.cirrus.yml Cirrus-CI: use FreeBSD 13.0 image for base system CI build 2021-04-19 15:23:14 -04:00
.clang-format clang-format: Avoid breaking after the opening paren of function definitions 2020-10-28 11:54:00 +00:00
.gitattributes Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
.gitignore Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
COPYRIGHT copyrights: Happy New Year 2021 2020-12-31 10:29:44 -05:00
LOCKS
MAINTAINERS Add a pointer to csprng@ for the CSPRNG driver. This is enforced anyway by 2020-09-01 08:02:12 +00:00
Makefile Fix 'make bmake' top-level bootstrapping. 2021-03-06 09:45:08 -08:00
Makefile.inc1 Makefile.inc1: unbreak bootstrap when kbdcontrol does not exist 2021-03-23 20:47:14 -04:00
Makefile.libcompat libcompat: remove redundant path for ncurses 2021-01-07 15:14:52 +01:00
Makefile.sys.inc
ObsoleteFiles.inc rc: remove the 'addswap' script. 2021-04-26 10:22:47 +01:00
README.md Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
RELNOTES Spellcheck. 2021-04-12 15:12:19 -07:00
UPDATING Remove extra space at start of file. 2021-04-16 15:14:29 -06:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Various commands and libraries under the GNU Public License. Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources.
sys/arch/conf Kernel configuration files. GENERIC is the configuration used in release builds. NOTES contains documentation of all possible entries.
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.