Page MenuHomeFreeBSD

pf: fix mem leaks upon vnet destroy
ClosedPublic

Authored by igor.ostapenko_pm.me on Nov 24 2023, 1:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 9:39 PM
Unknown Object (File)
Tue, Nov 12, 6:19 PM
Unknown Object (File)
Mon, Nov 11, 5:49 PM
Unknown Object (File)
Mon, Nov 11, 3:54 PM
Unknown Object (File)
Mon, Nov 11, 5:49 AM
Unknown Object (File)
Mon, Nov 11, 12:59 AM
Unknown Object (File)
Sun, Nov 10, 6:08 PM
Unknown Object (File)
Sun, Nov 10, 7:21 AM

Details

Summary
It adds missing cleanup actions:
- remove user defined anchor rulesets
- remove user defined ether anchor rulesets
- remove tables linked to user defined anchors
- deal with wildcard anchor peculiarities to get them removed correctly

PR:             274310
Test Plan

Tom's shell script reports whether such mem leaks are present or not. It's attached to 274310.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/netpfil/pf/pf_ioctl.c
6247

Let's assert this.

6267

Let's assert that this succeeds.

  • The assertions have been added.
  • This update also proposes to apply the same assertion for the main two anchors (existing code).
This revision was not accepted when it landed; it landed in state Needs Review.Nov 29 2023, 6:06 PM
This revision was automatically updated to reflect the committed changes.