summaryrefslogtreecommitdiff
path: root/flowtop.c
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-08-04 02:13:59 +0300
committerTobias Klauser <tklauser@distanz.ch>2015-08-04 09:17:29 +0200
commitbc7a68b9230282d3d7acf65ec040f73688da920b (patch)
treedd4429e56c35d2d7c7cc23f1f645cde1f7e2c13c /flowtop.c
parent87ffedefb14f103538e98dc4983fd8fcdbe28768 (diff)
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 <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'flowtop.c')
-rw-r--r--flowtop.c6
1 files 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);