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
Unknown Object (File)
Tue, Aug 11, 4:46 PM
Unknown Object (File)
Sun, Aug 9, 1:58 PM
Unknown Object (File)
Fri, Aug 7, 5:49 PM
Unknown Object (File)
Sun, Aug 2, 5:01 AM
Unknown Object (File)
Sat, Aug 1, 7:28 AM
Unknown Object (File)
Sat, Jul 25, 3:34 PM
Unknown Object (File)
Jul 7 2026, 1:32 AM
Unknown Object (File)
Apr 28 2026, 12:20 PM

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!