summaryrefslogtreecommitdiff
path: root/geoip.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-03-16 18:09:04 +0100
committerDaniel Borkmann <dborkman@redhat.com>2013-03-16 18:09:04 +0100
commitf66b9f147ecf5db067e36719784a552a5909b3fc (patch)
treec68a61cb9bb84649b40977ab0e45455211905bad /geoip.c
parent4262e95c1c0a09c7f98ea6623d364bfda41e8bec (diff)
build: respect PREFIX_STRING on config file locations
When setting a prefix from the build system, also pass this through the hard coded strings for config file locations in the toolkit, so that the installed files (which use PREFIX) can be properly found. Suggested-by: Peter Stuge <peter@stuge.se> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'geoip.c')
-rw-r--r--geoip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/geoip.c b/geoip.c
index 9d2e82c..c4c6cf8 100644
--- a/geoip.c
+++ b/geoip.c
@@ -33,37 +33,37 @@ struct file {
static const struct file files[] = {
[GEOIP_CITY_EDITION_REV1] = {
.desc = "City IPv4",
- .local = "/etc/netsniff-ng/city4.dat",
+ .local = PREFIX_STRING "/etc/netsniff-ng/city4.dat",
.remote = "/GeoLiteCity.dat.gz",
.possible_prefix = PRE,
},
[GEOIP_CITY_EDITION_REV1_V6] = {
.desc = "City IPv6",
- .local = "/etc/netsniff-ng/city6.dat",
+ .local = PREFIX_STRING "/etc/netsniff-ng/city6.dat",
.remote = "/GeoLiteCityv6.dat.gz",
.possible_prefix = PRE "/GeoLiteCityv6-beta",
},
[GEOIP_COUNTRY_EDITION] = {
.desc = "Country IPv4",
- .local = "/etc/netsniff-ng/country4.dat",
+ .local = PREFIX_STRING "/etc/netsniff-ng/country4.dat",
.remote = "/GeoIP.dat.gz",
.possible_prefix = PRE "/GeoLiteCountry",
},
[GEOIP_COUNTRY_EDITION_V6] = {
.desc = "Country IPv6",
- .local = "/etc/netsniff-ng/country6.dat",
+ .local = PREFIX_STRING "/etc/netsniff-ng/country6.dat",
.remote = "/GeoIPv6.dat.gz",
.possible_prefix = PRE,
},
[GEOIP_ASNUM_EDITION] = {
.desc = "AS Numbers IPv4",
- .local = "/etc/netsniff-ng/asname4.dat",
+ .local = PREFIX_STRING "/etc/netsniff-ng/asname4.dat",
.remote = "/GeoIPASNum.dat.gz",
.possible_prefix = PRE "/asnum",
},
[GEOIP_ASNUM_EDITION_V6] = {
.desc = "AS Numbers IPv6",
- .local = "/etc/netsniff-ng/asname6.dat",
+ .local = PREFIX_STRING "/etc/netsniff-ng/asname6.dat",
.remote = "/GeoIPASNumv6.dat.gz",
.possible_prefix = PRE "/asnum",
},
@@ -520,7 +520,7 @@ static void init_mirrors(void)
FILE *fp;
char buff[256];
- fp = fopen("/etc/netsniff-ng/geoip.conf", "r");
+ fp = fopen(PREFIX_STRING "/etc/netsniff-ng/geoip.conf", "r");
if (!fp)
panic("Cannot open geoip.conf!\n");