fix by M. Dolze for iface in FreeBSD
This commit is contained in:
@@ -546,7 +546,7 @@ get_iface_stats (IfaceInfo *interface)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* check if its interface name matches */
|
/* check if its interface name matches */
|
||||||
if (strcmp(ifmd.ifmd_name, iface_name) == 0) {
|
if (strcmp(ifmd.ifmd_name, interface->name) == 0) {
|
||||||
interface->last_online = time(NULL); /* save actual time */
|
interface->last_online = time(NULL); /* save actual time */
|
||||||
|
|
||||||
if ((ifmd.ifmd_flags & IFF_UP) == IFF_UP)
|
if ((ifmd.ifmd_flags & IFF_UP) == IFF_UP)
|
||||||
@@ -568,7 +568,7 @@ get_iface_stats (IfaceInfo *interface)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* if we are here there is no interface with the given name */
|
/* if we are here there is no interface with the given name */
|
||||||
fprintf(stderr, "There is no interface named %s\n", iface_name);
|
fprintf(stderr, "There is no interface named %s\n", interface->name);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
perror("get_iface_stats");
|
perror("get_iface_stats");
|
||||||
|
|||||||
Reference in New Issue
Block a user