From nobody Fri Aug 25 17:33:18 2023 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 4RXRqz1vVnz4qZXn; Fri, 25 Aug 2023 17:33:19 +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 4RXRqz16Gpz3DBW; Fri, 25 Aug 2023 17:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692984799; 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=m6Me5OOHFCKwcmiZvE8HDzUrANJCfcd0nwOjwZWIUeE=; b=Jd+jK1mHmitsQeJEqhThGOv7b/TwQD0ds/CUUayzgKeEgYlwXJ7L51+DeuBIGzUTK64Z5B HN53RsuIP7Cl2WuF2BsRKxE+srWsI3rphBrGRTcAKfNOlXPGWG2+n9PAUr74YEw8ysBuDm pUN0GdbXoFfx9un6aQN5akke4RPGAAuGwiqj6fV896QnaIM8Z3OSBFe+bJRO4042HYTIDD 7H55MfU/AvYR2Bk8cNA1tJTCA3bSg1PbX1CELcP97VLQOc+EvkntYv2oHN1yPq5A7qTmc/ 2ehM+wD2FW3o6JfOLs0R8NYBdDl4ztgRryyjwzSrTygfpVWTNzZfKI1lJ9CT9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692984799; 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=m6Me5OOHFCKwcmiZvE8HDzUrANJCfcd0nwOjwZWIUeE=; b=sW3lhrlk1viDpZHeeWv6oor+jEzRfQm169Ke26sufx6Yd5DaXuOpGZaBnypjDoDod6NoPD 0S3gzQJXcsWZy8tuBxxxgUJzOwFqpSE6YnzSsTQs1wSIvh3V6RfHjOAiEky+yuO0nhIheb 1uPE4A16yJkfCA0m2tAol0ADJ4rosxwBSMoY/IkJXhsi2D6+75exQ3IEznuuUH6HbLmqOO +XMGDsLLk2mbFNfnPBvYrnpsqgrzwluIVjzK1b6dcs5EhNrUHLrgtC+6pRhJjabrG20mNC kRfTIsMqBvXttkjssKqk5BX3bcKrRH7FSnzxM4A4F1i3zm6m4M9dAQEaJZsT6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692984799; a=rsa-sha256; cv=none; b=cwP6oRY5mbwBHDzzpRy7dRQWJC4fv6j9mHJKksQG7CH/oqWLPTJzSGWV3pzHQRIw8LOeqC JIF5C9zCudYSsU2PV9FjuU4JuhwkTeOFLZW02orjdbCvoYieJCDWYV3r7kgWvNpXQKQkzG 7TYGDwtFBfJ7LVje0mCnwTvLRocWzx5TcNpy+XK9P7tKYtOn6krYKZ2ytE91f6DaqE5QQe +I2gPA8QvGpqUQP3pQ/c6KGvQQkLEXBl5JsMO8Wvefm3JgBrSCDBWfSLcMq0sJknHmB0Uw 6E+exFClfMBmP6QE2Vxewar30+gwx0xgfAvXC+QMyf4jvFdqeeZp6eqdwdPLFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RXRqz0BDcz1H2V; Fri, 25 Aug 2023 17:33:19 +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 37PHXI4e099343; Fri, 25 Aug 2023 17:33:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37PHXIHV099340; Fri, 25 Aug 2023 17:33:18 GMT (envelope-from git) Date: Fri, 25 Aug 2023 17:33:18 GMT Message-Id: <202308251733.37PHXIHV099340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 24a81a968d21 - main - ifconfig: fix logical error in interface matching for '-l ether' 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24a81a968d21b3eef1a0a2d786859b274546bd34 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=24a81a968d21b3eef1a0a2d786859b274546bd34 commit 24a81a968d21b3eef1a0a2d786859b274546bd34 Author: Gleb Smirnoff AuthorDate: 2023-08-25 17:30:25 +0000 Commit: Gleb Smirnoff CommitDate: 2023-08-25 17:30:25 +0000 ifconfig: fix logical error in interface matching for '-l ether' This affects only ifconfig(8) compiled WITHOUT_NETLINK_SUPPORT, which is not the default. Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D41584 Fixes: d1cd0344f7b7d81beda04c3cb8cfee99351c3eb8 --- sbin/ifconfig/ifconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index b26fbaf82776..1a7e5d07e601 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -768,7 +768,7 @@ match_afp(const struct afswtch *afp, int sa_family, const struct sockaddr_dl *sd return (true); /* special case for "ether" address family */ if (!strcmp(afp->af_name, "ether")) { - if (sdl == NULL && !match_ether(sdl)) + if (sdl == NULL || !match_ether(sdl)) return (false); return (true); }