if_nametoindex() sets errno on errors, so let's print the error
string using %m.
INFO_LOG("adding interface %s to bridge %s\n", iface, bridge);
if (!(idx = if_nametoindex(iface))) {
INFO_LOG("adding interface %s to bridge %s\n", iface, bridge);
if (!(idx = if_nametoindex(iface))) {
- ERROR_LOG("no index for %s\n", iface);
+ ERROR_LOG("no index for %s: %m\n", iface);
return false;
}
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
return false;
}
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {