Page MenuHomeFreeBSD

DTrace ipfw: Follow struct ip_fw field change
ClosedPublic

Authored by lwhsu on Sep 2 2021, 12:22 PM.
Tags
None
Referenced Files
F132668193: D31785.diff
Sat, Oct 18, 10:00 PM
F132657335: D31785.diff
Sat, Oct 18, 7:52 PM
Unknown Object (File)
Wed, Oct 8, 1:05 AM
Unknown Object (File)
Sat, Oct 4, 8:36 AM
Unknown Object (File)
Sep 10 2025, 5:56 PM
Unknown Object (File)
Sep 10 2025, 11:54 AM
Unknown Object (File)
Sep 10 2025, 5:27 AM
Unknown Object (File)
Sep 10 2025, 4:28 AM

Details

Summary

Without this modification:

# dtrace -n 'syscall:::entry { @[execname, probefunc] = count(); }' -c "echo hello"
dtrace: invalid probe specifier syscall:::entry { @[execname, probefunc] = count(); }: "/usr/lib/dtrace/ipfw.d", line 1: cached_id is not a member of struct ip_fw

(Is "line 1" here also a bug?)

I didn't change the field names in ipfw_rule_info for compatibility, but if it
is ok to change, I would like to rename them to cache_id and cache_pos.

Proposed commit message:

DTrace ipfw: Follow struct ip_fw field change

The fields of struct ip_fw changed in 322e5efda8578bb9c0a0ab0ef785cd1e1c222c85
and the trsnalation rule needs to catch up.

The field names in ipfw_rule_info are not changed for compatibility.

MFC after:	1 week

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41326
Build 38215: arc lint + arc unit

Event Timeline

lwhsu requested review of this revision.Sep 2 2021, 12:22 PM
This revision is now accepted and ready to land.Sep 2 2021, 1:26 PM

Ah, sorry, I committed the fix already..

In D31785#717158, @ae wrote:

Ah, sorry, I committed the fix already..

That's fine. Getting it fixed is the most important. Thanks for that!