From nobody Tue Nov 22 09:41:16 2022 X-Original-To: dev-commits-src-main@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 4NGfQh2XJsz4jQkc; Tue, 22 Nov 2022 09:41:16 +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 4NGfQh22wTz3qcm; Tue, 22 Nov 2022 09:41:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669110076; 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=Gwg7FB8b2YPBouZSZMlh31E6LTXRN+pkhbuRYOu2cO0=; b=G3aF67zE9Wf0ibZjX457LIHQf9aYKHvZnt7X8XWov/T8noMvw+6QEqmlr1aqrlyYwGQKkH 925i1i2KdKoiT4Iiz2lhhcI7Z2S7BnujUEnQaCKkZPwiGLQIz29Pq5mzd5zrEtY3dx0aV3 H82/XkBCwrg0Ky9/WLihsAY5BHw6ybfH8qzYs1PsvlTzaOsOKnfS/ktyHPKoAg+18cpU3G SAC+r4v78+Mhxf5F85ZKTB3Y57fE3ytSLTFspNe5JaoS9fAUQBHxuQngdy2EwQrl0JRoND yPKNPrHYszh6V49Ma5ARY2GCjJLvQtsdgKY9pw8jLYB8RfrLp/BUElHPeQfR+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669110076; 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=Gwg7FB8b2YPBouZSZMlh31E6LTXRN+pkhbuRYOu2cO0=; b=VVKEipuaWjyl6zm9AJkSGWeRda3yXpESF+jefBDAiaEGTjOp/wc8XhQWJGAZJ3KgiJdf7n dAFFh3im08VYXh6gmDQRvxwa6ngy4twpiR+RsVZkpOuyP8GsKpysKD4cCI7FLKH2OKAOGL aiKrqjaPkXct8FMKhQgetnL7ldZldh5X808bb8KZSEbIHpioEau+PIY2dqPteOo/B50aNv EpmxrKmlO1Y7ZGKat1JpfSW16i6yXG0VSjc0bE9iwuH5xc2iRbGBCHwKYNLWx5iH/OD0Nm es7GdIps6yt7xYBXC82pP1r13E9KsWaJ4pwTk5Phud5LDtG1rxbv0k7VNWlsVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669110076; a=rsa-sha256; cv=none; b=pdAkQembOZp4nbDPPDtckelmFoute41v9C7Br9Cy/4KWA6nsC8cpDCf+/a99f+QsbmNWds pNKoes/3lFPyR4Yf5Zp/emaupQK/LKiCj0fVk1/Lk7/qNJ9DOMocffZero1fylJ66ZDeBO 4qv47JG9onVx7PJvSXIqDqXU0i1SjKY1f9pjNgKJ2h6gpSOiMlUKHaw3kVIwQsVejyWk9+ rPMaJQs0pnfcjjykw1DdE7CABwPsZWLs7b84PvgX1WOfj+/Y0gi6I+QTnlY3Ry60/y5NSe 4NgYSsRVsC2mbzZ1ciyxCEikICVY9hoRXwpYAhg5xD97vKMUVLYcUDu2Ek/3cA== 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 4NGfQh16kJzdQ0; Tue, 22 Nov 2022 09:41:16 +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 2AM9fGU9069507; Tue, 22 Nov 2022 09:41:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AM9fGMD069506; Tue, 22 Nov 2022 09:41:16 GMT (envelope-from git) Date: Tue, 22 Nov 2022 09:41:16 GMT Message-Id: <202211220941.2AM9fGMD069506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 3599da158e39 - main - ipfw: Fix ipfw/dnctl detection List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3599da158e392ed1dd86bd3363d8bd014cf4da08 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3599da158e392ed1dd86bd3363d8bd014cf4da08 commit 3599da158e392ed1dd86bd3363d8bd014cf4da08 Author: Goran Mekic AuthorDate: 2022-11-22 08:53:20 +0000 Commit: Kristof Provost CommitDate: 2022-11-22 08:53:20 +0000 ipfw: Fix ipfw/dnctl detection Running "dnctl" vs "/sbin/dnctl" gave different results, because we looked at the entire argv[0] string, rather than the basename. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D37431 --- sbin/ipfw/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/ipfw/main.c b/sbin/ipfw/main.c index 1b9c7f324a9c..577224047cd0 100644 --- a/sbin/ipfw/main.c +++ b/sbin/ipfw/main.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "ipfw2.h" @@ -682,7 +683,7 @@ main(int ac, char *av[]) } #endif - if (strcmp(av[0], "dnctl") == 0) + if (strcmp("dnctl", basename(av[0])) == 0) g_co.prog = cmdline_prog_dnctl; else g_co.prog = cmdline_prog_ipfw;