Page MenuHomeFreeBSD

DTrace ipfw: Follow struct ip_fw field change

Authored by lwhsu on Sep 2 2021, 12:22 PM.
Referenced Files
Unknown Object (File)
Thu, Jan 12, 8:14 PM
Unknown Object (File)
Dec 14 2022, 3:30 AM
Unknown Object (File)
Nov 28 2022, 4:54 PM



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

rS FreeBSD src repository - subversion
Lint Passed
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!