updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / netdiscover-patched / misc.diff
blob1b82dc877f341ef89c010279f50ede58ca2b8830
1 --- src/misc.c 2005-08-31 08:52:12.000000000 +0200
2 +++ src/misc.c 2011-10-30 22:53:21.132879261 +0100
3 @@ -33,19 +33,22 @@
5 char *search_vendor(unsigned char mac[6])
7 - char tmac[6];
8 + char tmac[7];
9 int i = 0;
11 sprintf(tmac, "%02x%02x%02x", mac[0], mac[1], mac[2]);
13 - /* Convert mac prefix to upper */
14 - for (i=0; i<6; i++)
15 - tmac[i] = toupper(tmac[i]);
16 + /* Convert mac prefix to upper */
17 + for (i=0; i<6; i++)
18 + tmac[i] = toupper(tmac[i]);
20 - for (i=0; i<8436; i++)
21 + i = 0;
23 + while (oui_table[i].prefix != NULL)
25 if (strcmp(oui_table[i].prefix, tmac) == 0)
26 return oui_table[i].vendor;
27 + i++;
30 return "Unknown vendor";