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: d1cd0344f7
This commit is contained in:
parent
b820820ece
commit
24a81a968d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user