From bc7a68b9230282d3d7acf65ec040f73688da920b Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Tue, 4 Aug 2015 02:13:59 +0300 Subject: flowtop: Resolve src host if '-s' option specified Do not do reverse DNS for src hostname if '-s' option is not specified. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- flowtop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flowtop.c b/flowtop.c index e38cd8e..0a498ed 100644 --- a/flowtop.c +++ b/flowtop.c @@ -673,8 +673,10 @@ static void flow_entry_get_extended(struct flow_entry *n) if (n->flow_id == 0 || flow_entry_get_extended_is_dns(n)) return; - flow_entry_get_extended_revdns(n, flow_entry_src); - flow_entry_get_extended_geo(n, flow_entry_src); + if (show_src) { + flow_entry_get_extended_revdns(n, flow_entry_src); + flow_entry_get_extended_geo(n, flow_entry_src); + } flow_entry_get_extended_revdns(n, flow_entry_dst); flow_entry_get_extended_geo(n, flow_entry_dst); -- cgit v1.2.3-54-g00ecf