freebsd-dev/sys/contrib
Cy Schubert fef510763d r272552 applied the patch from ipfilter upstream fil.c r1.129 to fix
broken ipfilter rule matches (upstream bug #554). The upstream patch
was incomplete, it resolved all but one rule compare issue. The issue
fixed here is when "{to, reply-to, dup-to} interface" are used in
conjuncion with "on interface". The match was only made if the on keyword
was specified in the same order in each case referencing the same rule.
This commit fixes this.

The reason for this is that interface name strings and comment keyword
comments are stored in a a variable length field starting at fr_names
in the frentry struct. These strings are placed into this variable length
in the order they are encountered by ipf_y.y and indexed through index
pointers in fr_ifnames, fr_comment or one of the frdest struct fd_name
fields. (Three frdest structs are within frentry.) Order matters and
this patch takes this into account.

While in here it was discovered that though ipfilter is designed to
support multiple interface specifiations per rule (up to four), this
undocumented (the man page makes no mention of it) feature does not work.
A todo is to fix the multiple interfaces feature at a later date. To
understand the design decision as to why only four were intended, it is
suspected that the decision was made because Sun workstations and PCs
rarely if ever exceeded four NICs at the time, this is not true in 2019.

PR:		238796
Reported by:	WHR <msl0000023508@gmail.com>
MFC after:	2 weeks
2019-08-11 23:54:49 +00:00
..
alpine-hal
ck Import CK as of 21d3e319407d19dece16ee317c757ffc54a452bc, which makes its 2018-11-27 12:35:51 +00:00
cloudabi Import the latest CloudABI definitions, v0.18. 2017-11-21 20:46:21 +00:00
dev Revert r349863 (ACPICA 20190703). 2019-08-01 17:45:43 +00:00
edk2 Copy needed include files from EDK2. This is a minimal set gleened 2017-03-08 02:47:59 +00:00
ena-com Adjust ENA driver to the new ena-com 2019-05-30 13:01:46 +00:00
ipfilter/netinet r272552 applied the patch from ipfilter upstream fil.c r1.129 to fix 2019-08-11 23:54:49 +00:00
libb2 MFV: libb2: use native calls for secure memory clearance 2018-03-27 14:55:01 +00:00
libfdt MFV r328490: Update libfdt to github:f1879e1 2018-01-27 21:25:45 +00:00
libnv The nvlist_report_missing is also used by the cnvlist. 2019-04-11 04:24:41 +00:00
libsodium Bring in libsodium to sys/contrib 2018-08-17 00:23:50 +00:00
ncsw dpaa: fix 32-bit build 2019-01-19 05:20:31 +00:00
ngatm
octeon-sdk Octeon SDK: avoid use of uninitialized variable 2018-11-09 19:17:25 +00:00
rdma/krping krping: Fix for memory leak in error case. 2018-12-05 13:27:48 +00:00
v4l
vchiq/interface Merge the vm_page hold and wire mechanisms. 2019-07-08 19:46:20 +00:00
x86emu
xz-embedded Modularize xz. 2019-02-26 19:55:03 +00:00
zlib Expose zlib's utility functions in Z_SOLO library when building kernel. 2019-08-07 01:41:17 +00:00
zstd Stopgap fix for gcc platforms. 2019-08-08 20:09:36 +00:00