diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2023-08-25 17:30:25 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2023-08-25 17:30:25 +0000 |
commit | 24a81a968d21b3eef1a0a2d786859b274546bd34 (patch) | |
tree | 70d5240c6f9b8b762c9e04918682c66ecb9f7153 /sbin/ifconfig | |
parent | b820820ece099a73511d7daec407d78f38185a9b (diff) | |
download | src-24a81a968d21b3eef1a0a2d786859b274546bd34.tar.gz src-24a81a968d21b3eef1a0a2d786859b274546bd34.zip |
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
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |