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(cherry picked from commit24a81a968d)
This commit is contained in:
parent
97196b9630
commit
9186bb10c1
1 changed files with 1 additions and 1 deletions
|
|
@ -771,7 +771,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…
Add table
Reference in a new issue