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 May 9 2021, 12:56 PM
Reviewer
ae
Differential Revision
D30046: sbin/ipfw: Fix null pointer deference when printing counters
Parents
rGc5c5683eb6c4: less: upgrade to v581.2.
Branches
Unknown
Tags
Unknown