From nobody Fri Feb 16 11:33:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TbqYy0zn6z5BdvB; Fri, 16 Feb 2024 11:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TbqYy0Hjcz4LXw; Fri, 16 Feb 2024 11:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708083206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=szjzUM3+MOwlgcLBI86881uQ4fdKqCo0AYejO3+AxBU=; b=ChyUND8egUQl/nSGTgkrR0Pj/nQgBJxl2xvDMmKIlmuXIOnO48PF7MIqkLmNJd5dppy/Nw TYLIJGVTspoIzc3ivuUd2aaG5ZSnYf9GYPpSscYJ47vdhsqcdVly59AIHPZQzdr2h1o0YF yyEcUBCKq8mRtHIIhMDnG0/NLPsTOGci436kWi8kJTcgxKDdF3Tkz7WjSCkHtzQPGAW4HD sva9ntrLKp8z58xoKK7OajdSmAHSW96wTm4H9csNJ6kZgarTCWx4Z6d63VRcRpq8hKIWs0 KwpnFEYUyts+/iYz8hoF3zcp8O6PEAOInjusYFKBGQ8ZLqeTLu/4wWnd3DL34Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708083206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=szjzUM3+MOwlgcLBI86881uQ4fdKqCo0AYejO3+AxBU=; b=XYJab9TSjHzi9OVKZIBtBvcv4x37H5sy9ohRhFa2o8dsPyRE/PpTX9lByrtlIvuSJdk7ny z/wDv9JujKHna90r7n4RHd2LW+MFKELQwOtEfVMKZR3dz9TT3Fuq/6aRQ8AOGp1OGRJTtK Dg2uz4bFo8iXaP1EPfu4A/lgH+NywEz1xLYKuDFjb5Add00dlJLbrcQfQRCzgPh6QuO0gb eVmXJ1mz1YfocbQ9aGAt/8NnwTmiDrb0/MRgekUioDoMeiuBtD0JXdSa/MhBhCV5s6W3xw IWvRnm8nk7XcNClOyRj+hVic4EBjtDChpdYkMKqgcb3lXRg0D7ubQh8eqfSBKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708083206; a=rsa-sha256; cv=none; b=C03CoHAMQL64uknFw1AtuHVb/drvP7TEySFbt8kgd/21GRK0VPLODutQzEDVOPEinONXBf E0zjet/3NZf5uzSz2MOPCznRSoYOqvyWqNSVj5bJnNiUFki+Kn6AphJ4EuOtYiyPhJEud1 WaQ9JGgb2T6qmF0ks162iil9EYpwSBQxidm6AjI1yJaLaZCIn31op8v9OiyhDg6K91be9b 5Ctd1WzZJixZgjGHfmgY/O7x+0EVAwJKJuyd30v9liTkLSs23Mz9mXxZYLNJ8T/D6gAwjr rAHDVjWZbolFtE/fuhWLzbnb37KD/HfHgjIr9HhOcaY+R5F+nZO+BvgeVUJ0oQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TbqYx6SYCzNfd; Fri, 16 Feb 2024 11:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41GBXPdd083514; Fri, 16 Feb 2024 11:33:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41GBXP78083511; Fri, 16 Feb 2024 11:33:25 GMT (envelope-from git) Date: Fri, 16 Feb 2024 11:33:25 GMT Message-Id: <202402161133.41GBXP78083511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e00fd2426294 - main - dtrace: allow NULL interface pointer for ifinfo_t translator List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e00fd24262945fdc7f16198c8abd977f743e66e4 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e00fd24262945fdc7f16198c8abd977f743e66e4 commit e00fd24262945fdc7f16198c8abd977f743e66e4 Author: Michael Tuexen AuthorDate: 2024-02-16 11:28:48 +0000 Commit: Michael Tuexen CommitDate: 2024-02-16 11:28:48 +0000 dtrace: allow NULL interface pointer for ifinfo_t translator This is similar to other translators and will be used in static probes where the interface is not known. Reviewed by: markj MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43728 --- cddl/lib/libdtrace/ip.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/lib/libdtrace/ip.d b/cddl/lib/libdtrace/ip.d index 172d7d54bc36..2fe98858efc2 100644 --- a/cddl/lib/libdtrace/ip.d +++ b/cddl/lib/libdtrace/ip.d @@ -262,8 +262,8 @@ inline int IFF_LOOPBACK = 0x8; #pragma D binding "1.5" translator translator ifinfo_t < struct ifnet *p > { - if_name = p->if_xname; - if_local = (p->if_flags & IFF_LOOPBACK) == 0 ? 0 : 1; + if_name = p == NULL ? "" : p->if_xname; + if_local = p == NULL ? 0 : (p->if_flags & IFF_LOOPBACK) == 0 ? 0 : 1; if_addr = (uintptr_t)p; };