From 5160c9212e0e55e0dc518aadca0e6a370cf1420d Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 27 May 2014 10:59:52 +0200 Subject: 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 --- proto_ipv6.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'proto_ipv6.c') diff --git a/proto_ipv6.c b/proto_ipv6.c index 4149602..1cc93ba 100644 --- a/proto_ipv6.c +++ b/proto_ipv6.c @@ -60,21 +60,21 @@ void ipv6(struct pkt_buff *pkt) if (geoip_working()) { tprintf("\t[ Geo ("); - if ((country = geoip6_country_name(sas))) { + if ((country = geoip6_country_name(&sas))) { tprintf("%s", country); - if ((region = geoip6_region_name(sas))) + if ((region = geoip6_region_name(&sas))) tprintf(" / %s", region); - if ((city = geoip6_city_name(sas))) + if ((city = geoip6_city_name(&sas))) tprintf(" / %s", city); } else { tprintf("local"); } tprintf(" => "); - if ((country = geoip6_country_name(sad))) { + if ((country = geoip6_country_name(&sad))) { tprintf("%s", country); - if ((region = geoip6_region_name(sad))) + if ((region = geoip6_region_name(&sad))) tprintf(" / %s", region); - if ((city = geoip6_city_name(sad))) + if ((city = geoip6_city_name(&sad))) tprintf(" / %s", city); } else { tprintf("local"); -- cgit v1.2.3-54-g00ecf