fix(network): no need to check family here
This commit is contained in:
parent
9c8e39c30c
commit
c916fe258e
|
@ -546,8 +546,7 @@ int waybar::modules::Network::getPreferredIface(int skip_idx) const {
|
||||||
ifa = ifaddr;
|
ifa = ifaddr;
|
||||||
ifid = -1;
|
ifid = -1;
|
||||||
while (ifa != nullptr) {
|
while (ifa != nullptr) {
|
||||||
if (ifa->ifa_addr->sa_family == family_ &&
|
if (wildcardMatch(config_["interface"].asString(), ifa->ifa_name)) {
|
||||||
wildcardMatch(config_["interface"].asString(), ifa->ifa_name)) {
|
|
||||||
ifid = if_nametoindex(ifa->ifa_name);
|
ifid = if_nametoindex(ifa->ifa_name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue