I noticed when using geoip and json output that the country_ip_src was
displayed but not the country_ip_dst.  This patch seems to fix it:

diff --git a/src/pmacct.c b/src/pmacct.c
index d62ba44..b29c7a3 100644
--- a/src/pmacct.c
+++ b/src/pmacct.c
@@ -2996,7 +2996,7 @@ char *pmc_compose_json(u_int64_t wtc, u_int64_t
wtc_2, u_int8_t flow_type, struc
     json_decref(kv);
   }

-  if (wtc & COUNT_DST_HOST_COUNTRY) {
+  if (wtc_2 & COUNT_DST_HOST_COUNTRY) {
     if (pbase->dst_ip_country > 0)
       kv = json_pack("{ss}", "country_ip_dst",
GeoIP_code_by_id(pbase->dst_ip_country));
     else
_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to