freebsd-nq/sys/netpfil/pf
Gleb Smirnoff 53f4b0cf9b The current API for adding rules with pool addresses is the following:
- DIOCADDADDR adds addresses and puts them into V_pf_pabuf
- DIOCADDRULE takes all addresses from V_pf_pabuf and links
  them into rule.

The ugly part is that if address is a table, then it is initialized
in DIOCADDRULE, because we need ruleset, and DIOCADDADDR doesn't
supply ruleset. But if address is a dynaddr, we need address family,
and address family could be different for different addresses in one
rule, so dynaddr is initialized in DIOCADDADDR.

This leads to the entangled state of addresses on V_pf_pabuf. Some are
initialized, and some not. That's why running pf_empty_pool(&V_pf_pabuf)
can lead to a panic on a NULL table address.

Since proper fix requires API/ABI change, for now simply plug the panic
in pf_empty_pool().

Reported by:	danger
2014-04-25 11:36:11 +00:00
..
if_pflog.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
if_pfsync.c Merge from projects/pf r251993 (glebius@): 2014-03-25 06:55:53 +00:00
in4_cksum.c
pf_altq.h Move new pf includes to the pf directory. The pfvar.h remain 2013-10-27 16:25:57 +00:00
pf_if.c - Split functions that initialize various pf parts into their vimage 2013-11-18 22:18:07 +00:00
pf_ioctl.c The current API for adding rules with pool addresses is the following: 2014-04-25 11:36:11 +00:00
pf_lb.c Backout r257223,r257224,r257225,r257246,r257710. The changes caused 2014-04-16 09:25:20 +00:00
pf_mtag.h Move new pf includes to the pf directory. The pfvar.h remain 2013-10-27 16:25:57 +00:00
pf_norm.c - Split functions that initialize various pf parts into their vimage 2013-11-18 22:18:07 +00:00
pf_osfp.c The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
pf_ruleset.c Provide includes that are needed in these files, and before were read 2013-10-26 18:18:50 +00:00
pf_table.c Provide includes that are needed in these files, and before were read 2013-10-26 18:18:50 +00:00
pf.c Backport from projects/pf r263908: 2014-04-20 09:17:48 +00:00
pf.h Fix incorrect header guard define in sys/netpfil/pf/pf.h, which snuck in 2013-12-22 19:47:22 +00:00