git: b64c5a0ace59 - main - ipfw.d: Add required dependency declarations

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Mon, 16 Dec 2024 22:16:02 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=b64c5a0ace59af62eff52bfe110a521dc73c937b

commit b64c5a0ace59af62eff52bfe110a521dc73c937b
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-12-16 22:09:39 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-12-16 22:09:39 +0000

    ipfw.d: Add required dependency declarations
    
    ipfw.d requires definitions of, at least, in_addr_t and struct ip6_addr,
    which it must obtain from CTF info.  This is found by looking at
    $(sysctl -n kern.bootfile)/kernel, which might not be available in a
    jail.
    
    These depends_on declarations ensure that dtrace(1) invocations will
    simply abort processing of ipfw.d if the required binaries can't be
    found, rather than raising an error.
    
    PR:             283359
    MFC after:      1 week
---
 share/dtrace/ipfw.d | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/share/dtrace/ipfw.d b/share/dtrace/ipfw.d
index c2933dbe96ad..66cd6abea74a 100644
--- a/share/dtrace/ipfw.d
+++ b/share/dtrace/ipfw.d
@@ -27,6 +27,8 @@
  */
 
 #pragma D depends_on provider ipfw
+#pragma D depends_on module kernel
+#pragma D depends_on module ipfw.ko
 
 /* ipfw_chk() return values */
 #pragma D binding "1.0" IP_FW_PASS