Blame SOURCES/0006-Introduce-nn-option.patch

ce5013
From d8d7143f1c0ca5a36f7d1f1092d360afbf4e71d3 Mon Sep 17 00:00:00 2001
8d0d63
From: rpm-build <rpm-build>
8d0d63
Date: Mon, 20 Oct 2014 13:26:38 +0200
ce5013
Subject: [PATCH 06/13] Introduce -nn option
8d0d63
8d0d63
This changes the semantics on -n option so only namelookups are skipped. Port
8d0d63
numbers *are* translated to their string representations. Option -nn then has
8d0d63
the same semantics as -n had originally.
8d0d63
---
8d0d63
 addrtoname.c | 4 ++--
8d0d63
 tcpdump.1.in | 6 +++++-
8d0d63
 2 files changed, 7 insertions(+), 3 deletions(-)
8d0d63
8d0d63
diff --git a/addrtoname.c b/addrtoname.c
ce5013
index a1e360d..f8e777c 100644
8d0d63
--- a/addrtoname.c
8d0d63
+++ b/addrtoname.c
ce5013
@@ -822,7 +822,7 @@ init_servarray(netdissect_options *ndo)
8d0d63
 
8d0d63
 		while (table->name)
8d0d63
 			table = table->nxt;
8d0d63
-		if (ndo->ndo_nflag) {
8d0d63
+		if (ndo->ndo_nflag > 1) {
8d0d63
 			(void)snprintf(buf, sizeof(buf), "%d", port);
8d0d63
 			table->name = strdup(buf);
8d0d63
 		} else
ce5013
@@ -1245,7 +1245,7 @@ init_addrtoname(netdissect_options *ndo, uint32_t localnet, uint32_t mask)
8d0d63
 		f_localnet = localnet;
8d0d63
 		f_netmask = mask;
8d0d63
 	}
8d0d63
-	if (ndo->ndo_nflag)
8d0d63
+	if (ndo->ndo_nflag > 1)
8d0d63
 		/*
8d0d63
 		 * Simplest way to suppress names.
8d0d63
 		 */
8d0d63
diff --git a/tcpdump.1.in b/tcpdump.1.in
ce5013
index 081e5d1..f233934 100644
8d0d63
--- a/tcpdump.1.in
8d0d63
+++ b/tcpdump.1.in
ce5013
@@ -544,7 +544,11 @@ Use \fIsecret\fP as a shared secret for validating the digests found in
8d0d63
 TCP segments with the TCP-MD5 option (RFC 2385), if present.
8d0d63
 .TP
8d0d63
 .B \-n
8d0d63
-Don't convert addresses (i.e., host addresses, port numbers, etc.) to names.
8d0d63
+Don't convert host addresses to names.  This can be used to avoid
8d0d63
+DNS lookups.
8d0d63
+.TP
8d0d63
+.B \-nn
8d0d63
+Don't convert protocol and port numbers etc. to names either.
8d0d63
 .TP
8d0d63
 .B \-N
8d0d63
 Don't print domain name qualification of host names.
8d0d63
-- 
ce5013
2.13.5
8d0d63