From nobody Thu Mar 10 00:31:59 2022 X-Original-To: dev-commits-src-branches@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 8C4ED19F2574; Thu, 10 Mar 2022 00:31:59 +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 4KDVPW3c9tz4k4F; Thu, 10 Mar 2022 00:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646872319; 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=wOvfVU7HH0vIEdE4A7um44A2m1isw5ITvXqz5YR6yf4=; b=uQZMk1clO75sfEmDLusYbWnosCZjjREZ/UT6Gr5ce+WeSrxS/eiLl+n3W+po6uLCeQlsq7 moIvHFC964hZjE9/v7OdgMUIoLrHcRZWjJJNyUxYQ8BUwh08G5L3R3w7LNWRSav3snM42K ajciHQ5I8YJz38Rwiw8CbDsQ585N49jrf+cA1RVDuex2jaPENr4eUzGn0nP5RiPJ7vsbNw BwUfDhEpk4gfZva8b3UYgfD4ABKPyGurYZ9nLIKQqL7hJK9koJN+XsuVqJNhFSs7FeN5Wu H6iuYTgSTh3V7PTx9l/UpepVa2JYmx9yutORhv3dA+uF+p0QlqjzoyCiCevKyQ== 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 5C4141B10B; Thu, 10 Mar 2022 00:31:59 +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 22A0VxkK059402; Thu, 10 Mar 2022 00:31:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22A0VxKe059401; Thu, 10 Mar 2022 00:31:59 GMT (envelope-from git) Date: Thu, 10 Mar 2022 00:31:59 GMT Message-Id: <202203100031.22A0VxKe059401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 35ddf84138b4 - stable/13 - ipfilter: Introduce the new FORMAT_IF macro List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 35ddf84138b4165437cf18a3540c4a9aa12f4860 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646872319; 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=wOvfVU7HH0vIEdE4A7um44A2m1isw5ITvXqz5YR6yf4=; b=h2bzqCwsM4qU7DUkn9y9D8uM2Fj/2we3UK27BsdXf6OLlsMNH+3Gmby7AzazD3C80Xly1a ew89lbsq+utVYKH/e/d+ziEsyHKjeMZOMHYweDhjlSF+8B4lgf4RvXF+rtoWolwQNp+rzf b3NKxy235GH6G00luQVcjXyIeFnXJuYHA8Dbd/hg/tS/SGl/LgqzjaQJdwzJRdJn6kgi4Y gtcB3rw5TzvYuTKu3Wm0v8SZENFYtraJblSWaWB7SEQLJuKFaKm+Tk017j8zJq1O2VjmQa lPSvfySLl5wTaEDQ9mQK9e90lZpcpIC+yZFJNPcSO06p7pXog0py1uVqaRogPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646872319; a=rsa-sha256; cv=none; b=gPJafn6TYRi8copJcXVZ0EvMzuhrPefxgFm3BzIqI1HZcywnv8zkZevRYmCIh4WI1a28fp 4yTDOViZfSePpHCUFFbWHieO7aJzrA0W9EweH05Fg239+Tn53+tRF1kqFF5jCKGcTdUXRA jUSrXQfCqO58dwAWGGqWufgSC72qvstipjIWPbBS7/1Gqhi+pRAIppnAk9o1A3gD1L7XCK tcTBpSBZyGjSKu83BFTZxX1mBRs2qpjDbxB2RNyjiSegF2NIyqjVodhl3+kU5UIx0WWUM3 UQJ0Z0EFmSG/0MVkB4lWUq9YLA60ucwCig6rJ2CaksOmEmLaqbRNwHREba7btg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=35ddf84138b4165437cf18a3540c4a9aa12f4860 commit 35ddf84138b4165437cf18a3540c4a9aa12f4860 Author: Cy Schubert AuthorDate: 2022-03-03 06:21:59 +0000 Commit: Cy Schubert CommitDate: 2022-03-10 00:31:40 +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)". (cherry picked from commit 915395a2800a09a64ae41ca96eabcb5e16b44309) --- 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 {