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, Sep 8, 1:49 AM
Unknown Object (File)
Mon, Sep 7, 9:24 AM
Unknown Object (File)
Sat, Sep 5, 3:33 PM
Unknown Object (File)
Sat, Sep 5, 3:36 AM
Unknown Object (File)
Fri, Sep 4, 11:42 PM
Unknown Object (File)
Fri, Sep 4, 11:22 PM
Unknown Object (File)
Thu, Sep 3, 4:44 PM
Unknown Object (File)
Thu, Sep 3, 3:19 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!