summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-12-07 11:45:01 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-12-07 11:45:01 +0000
commita330124c26567659f373575e48d63852a96a18b3 (patch)
tree4e18d8baf697e9ff2dd139359f48bcdf3689d362 /tools
parent27454e3869df7f30ba170fefc17018fa07b5d194 (diff)
Use /var/lib/misc/oui.txt as default OUI file
Diffstat (limited to 'tools')
-rw-r--r--tools/oui.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/oui.c b/tools/oui.c
index 13d6c2f5..b68ae04b 100644
--- a/tools/oui.c
+++ b/tools/oui.c
@@ -38,7 +38,7 @@
/* http://standards.ieee.org/regauth/oui/oui.txt */
-#define OUIFILE "/usr/share/misc/oui.txt"
+#define OUIFILE "/var/lib/misc/oui.txt"
char *ouitocomp(const char *oui)
{
@@ -49,8 +49,11 @@ char *ouitocomp(const char *oui)
fd = open("oui.txt", O_RDONLY);
if (fd < 0) {
fd = open(OUIFILE, O_RDONLY);
- if (fd < 0)
- return NULL;
+ if (fd < 0) {
+ fd = open("/usr/share/misc/oui.txt", O_RDONLY);
+ if (fd < 0)
+ return NULL;
+ }
}
if (fstat(fd, &st) < 0) {