fix by M. Dolze for iface in FreeBSD

This commit is contained in:
marschap
2006-05-04 17:24:36 +00:00
parent 403b23fb4f
commit 455939ab5b
+2 -2
View File
@@ -546,7 +546,7 @@ get_iface_stats (IfaceInfo *interface)
break;
}
/* 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 */
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 */
fprintf(stderr, "There is no interface named %s\n", iface_name);
fprintf(stderr, "There is no interface named %s\n", interface->name);
return 0;
} else {
perror("get_iface_stats");