From nobody Thu Mar 03 15:27:18 2022 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 E8D6619F5A6F; Thu, 3 Mar 2022 15:27:18 +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 4K8Zbp6GNfz3nfY; Thu, 3 Mar 2022 15:27:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646321238; 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=NwBbCP2RZazO4KtwXhGNbgmcWyQEKEJwh/A//m+yamo=; b=MphVVEkLjLWElH5qIcc5uRyGl9AOooH2jqLLYcgEGNRzhcpUmAHfYid15gtW85mWMXpfba SK/k18rHNOhrl7Mz3AUxqY0yVc0/tdlTKosVQG14U7eXQ9owwmRHuQFDXYeF4fJryrUefY mWi/3kMlNtI9N5hHvERn+HgP/JGXoQ0Ef6HbDw5vd9hy9NveuSELtWEA9Fa4QjXVtY17Up 5hvvXoZEcaU9lsDz1ZIPtEpuZPEXY1CST0LtEFmAa02YQGKWUZ4uIBeFRPPObRlK08FlLl ixvSDqBrfT2oI8JVCFOCaTJnmjje73M+NAjno5MHVDMTeZ8PTwNXPmqCw1wTfw== 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 B72491A323; Thu, 3 Mar 2022 15:27:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 223FRIoY077882; Thu, 3 Mar 2022 15:27:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 223FRIRE077881; Thu, 3 Mar 2022 15:27:18 GMT (envelope-from git) Date: Thu, 3 Mar 2022 15:27:18 GMT Message-Id: <202203031527.223FRIRE077881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 915395a2800a - main - ipfilter: Introduce the new FORMAT_IF macro 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 915395a2800a09a64ae41ca96eabcb5e16b44309 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646321238; 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=NwBbCP2RZazO4KtwXhGNbgmcWyQEKEJwh/A//m+yamo=; b=QEUm4kK2Y/BvRrC4MuvpEW12EbGF6bHHeUvJpkZfAcd1f8YZs9hBWBLPkDQLyfAn9WqbKq 0vVxnzDt6z2RS060P1HadQGeAwc8vPCKztnrQWSKEbnZLho4HsY9osXb5NqzUQ+fqzFo6t mNlfCMoVBaiuAaOxNFmGP0hlboV5o2ZkM8CYCKltQEMyaHGROwwnJ0cnWhg1BZPw/mfwQD FcFs/zToB8VStIh2OdXYDDTIMPRX4RLK1lR8cMljL2Y0LQdAkYazZvMWwhLxtrfcnKPhna yUlWuLdJwy0S4H8ygD6vRqzL7OlQVSGg8uRbC3vQPBTgOwE4VTK6HmUejI2gOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646321238; a=rsa-sha256; cv=none; b=WsK9YlcVT/PLX4BAkmG7opmh2mEUZ/yyk+2/fffgu2Racoc8CkAumTGM25GdDDVRFBjqJa NP5lOd3pHQ+xev6jWshV52aNefiqdpoZ1EQHx2WjDVv2upmwNPhBayg9uDmny92eEeE6zB RqkcNUcK7SQwq90zND/JUx8eE+yzrVcK7lbQAXdaMCqHYN0YjXHTsIUZn8FsmGvkCt4AVx Dk0R1MhUU2mti2zQXDiHKAU3jATplvXnWdIG6H++0m+SqAvZPe8mrBC5lBz5iJEs83g/0i CSCqseKE30eDYKPgNEyZ9UEV9pJLh5zH3ShqsnO1iUmwWTuix0yuRsa7MGPU0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=915395a2800a09a64ae41ca96eabcb5e16b44309 commit 915395a2800a09a64ae41ca96eabcb5e16b44309 Author: Cy Schubert AuthorDate: 2022-03-03 06:21:59 +0000 Commit: Cy Schubert CommitDate: 2022-03-03 14:43:11 +0000 ipfilter: Introduce the new FORMAT_IF macro Interface names stored in the ipstate_t and ipnat_t structures can be NULL. This occurs when an application, such as named, is running on the firewall machine itself. For example an application, i.e. named, running on the firewall itself will cause a state table display and NAT mapping display to show a null ingress interface and its egress interface. This is perfectly valid but confusing to human eyes. Rather than print nothing, print "(null)". MFC after: 1 week --- sbin/ipf/common/ipf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ipf/common/ipf.h b/sbin/ipf/common/ipf.h index e178cfc1676e..b278d8ec5d6c 100644 --- a/sbin/ipf/common/ipf.h +++ b/sbin/ipf/common/ipf.h @@ -103,6 +103,7 @@ typedef unsigned int u_32_t; #define PRINTF (void)printf #define FPRINTF (void)fprintf +#define FORMAT_IF(_a) (_a != NULL ? _a : "(null)") struct ipopt_names {