HomeFreeBSD

sbin/ipfw: Fix null pointer deference when printing counters

Description

sbin/ipfw: Fix null pointer deference when printing counters

ipfw -[tT] prints statistics of the last access. If the rule was never
used, the counter might be not exist. This happens unconditionally on
inserting a new rule. Avoid printing statistics in this case.

PR: 255491
Reported by: Haisheng Zhouz
Reviewed by: ae
Differential Revision: https://reviews.freebsd.org/D30046

(cherry picked from commit bf7cc0f9cb6603a6bdd6131c8d1939724ce6e62d)

Details

Provenance
donnerAuthored on Apr 30 2021, 2:12 PM
Reviewer
ae
Differential Revision
D30046: sbin/ipfw: Fix null pointer deference when printing counters
Parents
rG69aed9987e27: nfscl: fix delegation recall when the file is not open
Branches
Unknown
Tags
Unknown