summaryrefslogtreecommitdiff
path: root/proto_ipv4.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-05-27 10:59:52 +0200
committerTobias Klauser <tklauser@distanz.ch>2014-05-27 10:59:52 +0200
commit5160c9212e0e55e0dc518aadca0e6a370cf1420d (patch)
treeb5fb172ab10010321fb383b2aa3b8e0c058a0da7 /proto_ipv4.c
parent2e7e42af61fea74bfbb40abdc8318366638672fb (diff)
geoip: Pass struct sockaddr_in{,6} as pointer instead of by value
Change the interface to the geoip_* functions to take a pointer to a struct sockaddr_in{,6} instead of the struct itself. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'proto_ipv4.c')
-rw-r--r--proto_ipv4.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/proto_ipv4.c b/proto_ipv4.c
index 2eb5e4f..47eca29 100644
--- a/proto_ipv4.c
+++ b/proto_ipv4.c
@@ -98,21 +98,21 @@ static void ipv4(struct pkt_buff *pkt)
if (geoip_working()) {
tprintf("\t[ Geo (");
- if ((country = geoip4_country_name(sas))) {
+ if ((country = geoip4_country_name(&sas))) {
tprintf("%s", country);
- if ((region = geoip4_region_name(sas)))
+ if ((region = geoip4_region_name(&sas)))
tprintf(" / %s", region);
- if ((city = geoip4_city_name(sas)))
+ if ((city = geoip4_city_name(&sas)))
tprintf(" / %s", city);
} else {
tprintf("local");
}
tprintf(" => ");
- if ((country = geoip4_country_name(sad))) {
+ if ((country = geoip4_country_name(&sad))) {
tprintf("%s", country);
- if ((region = geoip4_region_name(sad)))
+ if ((region = geoip4_region_name(&sad)))
tprintf(" / %s", region);
- if ((city = geoip4_city_name(sad)))
+ if ((city = geoip4_city_name(&sad)))
tprintf(" / %s", city);
} else {
tprintf("local");