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)
Thu, Apr 18, 11:37 AM
Unknown Object (File)
Jan 14 2024, 9:01 AM
Unknown Object (File)
Dec 20 2023, 4:55 AM
Unknown Object (File)
Nov 17 2023, 2:58 PM
Unknown Object (File)
Oct 14 2023, 4:01 PM
Unknown Object (File)
Oct 11 2023, 3:34 PM
Unknown Object (File)
Oct 7 2023, 5:37 AM
Unknown Object (File)
Sep 30 2023, 8:24 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!