]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove `set' field from state structure and use set from parent rule.
authorAndrey V. Elsukov <ae@FreeBSD.org>
Mon, 11 Feb 2019 18:10:55 +0000 (18:10 +0000)
committerAndrey V. Elsukov <ae@FreeBSD.org>
Mon, 11 Feb 2019 18:10:55 +0000 (18:10 +0000)
commit804a6541db5fe6a54f653480131e33947ba2b1d1
treefed2bd0a12b65f178542787ec64e6438ddea7859
parentbc235bb54d22b06a7896963800ed70a30754a56d
Remove `set' field from state structure and use set from parent rule.

Initially it was introduced because parent rule pointer could be freed,
and rule's information could become inaccessible. In r341471 this was
changed. And now we don't need this information, and also it can become
stale. E.g. rule can be moved from one set to another. This can lead
to parent's set and state's set will not match. In this case it is
possible that static rule will be freed, but dynamic state will not.
This can happen when `ipfw delete set N` command is used to delete
rules, that were moved to another set.
To fix the problem we will use the set number from parent rule.

Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC
sys/netpfil/ipfw/ip_fw_dynamic.c