[tcpdump] Update to 4.6.2

Michal Sekletar msekleta at fedoraproject.org
Tue Oct 21 13:23:21 UTC 2014


commit 4ea394f9d4754135d36a64b0cee7fe8c8bb54914
Author: Michal Sekletar <msekleta at redhat.com>
Date:   Mon Oct 20 16:09:01 2014 +0200

    Update to 4.6.2
    
    Resolves #1124289

 .gitignore                                         |    1 +
 ...-Reachable-Time-and-Retransmit-Time-from-.patch |   26 +++++++++
 ...-Use-getnameinfo-instead-of-gethostbyaddr.patch |   47 +++++++++++------
 ...riviledges-before-opening-first-savefile-.patch |   38 ++++++++++----
 ...4-tcpslice-update-tcpslice-patch-to-1.2a3.patch |   29 ++++++++--
 0005-tcpslice-remove-unneeded-include.patch        |   26 +++++++++
 ...n-t-test-the-pointer-but-pointee-for-NULL.patch |   27 ++++++++++
 0007-Introduce-nn-option.patch                     |   55 ++++++++++++++++++++
 ...-out-we-dropped-root-we-are-always-droppi.patch |   39 ++++++++++++++
 sources                                            |    2 +-
 tcpdump-4.0.0-icmp6msec.patch                      |   12 ----
 tcpdump-4.0.0-portnumbers.patch                    |   37 -------------
 tcpdump-4.1.1-manpagefix.patch                     |   39 --------------
 tcpdump-4.1.1-testsuite.patch                      |   49 -----------------
 tcpdump.spec                                       |   40 +++++---------
 tcpslice-1.2a3-dateformat.patch                    |   14 -----
 tcpslice-CVS.20010207-bpf.patch                    |   12 ----
 17 files changed, 270 insertions(+), 223 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 21ab5b9..fc5ef7d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ tcpdump-4.1.1.tar.gz
 /generate-tarball.sh
 /tcpdump-4.5.0-20131108gitb07944a.tar.gz
 /tcpdump-4.5.1.tar.gz
+/tcpdump-4.6.2.tar.gz
diff --git a/0001-icmp6-print-Reachable-Time-and-Retransmit-Time-from-.patch b/0001-icmp6-print-Reachable-Time-and-Retransmit-Time-from-.patch
new file mode 100644
index 0000000..29d6a4f
--- /dev/null
+++ b/0001-icmp6-print-Reachable-Time-and-Retransmit-Time-from-.patch
@@ -0,0 +1,26 @@
+From 854d1a18df48e793b627b638c6df7fd6fdf57554 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Mon, 20 Oct 2014 13:34:24 +0200
+Subject: [PATCH 1/7] icmp6: print Reachable Time and Retransmit Time from
+ ICMPv6 as milliseconds
+
+---
+ print-icmp6.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/print-icmp6.c b/print-icmp6.c
+index 553bb46..e288630 100644
+--- a/print-icmp6.c
++++ b/print-icmp6.c
+@@ -1053,7 +1053,7 @@ icmp6_print(netdissect_options *ndo,
+ 			p = (struct nd_router_advert *)dp;
+ 			ND_TCHECK(p->nd_ra_retransmit);
+ 			ND_PRINT((ndo,"\n\thop limit %u, Flags [%s]" \
+-                                  ", pref %s, router lifetime %us, reachable time %us, retrans time %us",
++                                  ", pref %s, router lifetime %us, reachable time %ums, retrans time %ums",
+                                   (u_int)p->nd_ra_curhoplimit,
+                                   bittok2str(icmp6_opt_ra_flag_values,"none",(p->nd_ra_flags_reserved)),
+                                   get_rtpref(p->nd_ra_flags_reserved),
+-- 
+1.8.3.1
+
diff --git a/tcpdump-4.5.0-gethostby.patch b/0002-Use-getnameinfo-instead-of-gethostbyaddr.patch
similarity index 59%
rename from tcpdump-4.5.0-gethostby.patch
rename to 0002-Use-getnameinfo-instead-of-gethostbyaddr.patch
index f1cf324..514cb90 100644
--- a/tcpdump-4.5.0-gethostby.patch
+++ b/0002-Use-getnameinfo-instead-of-gethostbyaddr.patch
@@ -1,17 +1,27 @@
-diff -up tcpdump-4.5.0/addrtoname.c.gethostby tcpdump-4.5.0/addrtoname.c
---- tcpdump-4.5.0/addrtoname.c.gethostby	2013-11-08 09:03:52.166752012 +0100
-+++ tcpdump-4.5.0/addrtoname.c	2013-11-08 09:04:57.792747210 +0100
-@@ -224,7 +224,6 @@ static u_int32_t f_localnet;
+From e003824412501b060b1c4301c5cef7138c51d630 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Mon, 20 Oct 2014 14:12:46 +0200
+Subject: [PATCH 2/7] Use getnameinfo instead of gethostbyaddr
+
+---
+ addrtoname.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 46 insertions(+), 2 deletions(-)
+
+diff --git a/addrtoname.c b/addrtoname.c
+index eb0b2ae..277751d 100644
+--- a/addrtoname.c
++++ b/addrtoname.c
+@@ -221,7 +221,6 @@ static uint32_t f_localnet;
  const char *
- getname(const u_char *ap)
+ getname(netdissect_options *ndo, const u_char *ap)
  {
 -	register struct hostent *hp;
- 	u_int32_t addr;
+ 	uint32_t addr;
  	static struct hnamemem *p;		/* static for longjmp() */
  
-@@ -246,6 +245,28 @@ getname(const u_char *ap)
+@@ -243,6 +242,28 @@ getname(netdissect_options *ndo, const u_char *ap)
  	 */
- 	if (!nflag &&
+ 	if (!ndo->ndo_nflag &&
  	    (addr & f_netmask) == f_localnet) {
 +#ifdef HAVE_GETNAMEINFO
 +		struct sockaddr_in sa;
@@ -22,7 +32,7 @@ diff -up tcpdump-4.5.0/addrtoname.c.gethostby tcpdump-4.5.0/addrtoname.c
 +		sa.sin_addr.s_addr = addr;
 +		if (!getnameinfo((struct sockaddr *)&sa, sizeof (sa),
 +					hbuf, sizeof (hbuf), NULL, 0, 0)) {
-+			if (Nflag) {
++			if (ndo->ndo_Nflag) {
 +				char *dotp;
 +
 +				/* Remove domain qualifications */
@@ -38,7 +48,7 @@ diff -up tcpdump-4.5.0/addrtoname.c.gethostby tcpdump-4.5.0/addrtoname.c
  		hp = gethostbyaddr((char *)&addr, 4, AF_INET);
  		if (hp) {
  			char *dotp;
-@@ -259,6 +280,7 @@ getname(const u_char *ap)
+@@ -256,6 +277,7 @@ getname(netdissect_options *ndo, const u_char *ap)
  			}
  			return (p->name);
  		}
@@ -46,18 +56,18 @@ diff -up tcpdump-4.5.0/addrtoname.c.gethostby tcpdump-4.5.0/addrtoname.c
  	}
  	p->name = strdup(intoa(addr));
  	return (p->name);
-@@ -272,7 +294,6 @@ getname(const u_char *ap)
+@@ -269,7 +291,6 @@ getname(netdissect_options *ndo, const u_char *ap)
  const char *
- getname6(const u_char *ap)
+ getname6(netdissect_options *ndo, const u_char *ap)
  {
 -	register struct hostent *hp;
  	union {
  		struct in6_addr addr;
  		struct for_hash_addr {
-@@ -297,6 +318,28 @@ getname6(const u_char *ap)
+@@ -294,6 +315,28 @@ getname6(netdissect_options *ndo, const u_char *ap)
  	 * Do not print names if -n was given.
  	 */
- 	if (!nflag) {
+ 	if (!ndo->ndo_nflag) {
 +#ifdef HAVE_GETNAMEINFO
 +		struct sockaddr_in6 sa;
 +		char hbuf[NI_MAXHOST];
@@ -67,7 +77,7 @@ diff -up tcpdump-4.5.0/addrtoname.c.gethostby tcpdump-4.5.0/addrtoname.c
 +		sa.sin6_addr = addr.addr;
 +		if (!getnameinfo((struct sockaddr *)&sa, sizeof (sa),
 +					hbuf, sizeof (hbuf), NULL, 0, 0)) {
-+			if (Nflag) {
++			if (ndo->ndo_Nflag) {
 +				char *dotp;
 +
 +				/* Remove domain qualifications */
@@ -79,11 +89,11 @@ diff -up tcpdump-4.5.0/addrtoname.c.gethostby tcpdump-4.5.0/addrtoname.c
 +			return p->name;
 +		}
 +#else
-+		register struct hostent *hp;
++                register struct hostent *hp;
  		hp = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET6);
  		if (hp) {
  			char *dotp;
-@@ -310,6 +353,7 @@ getname6(const u_char *ap)
+@@ -307,6 +350,7 @@ getname6(netdissect_options *ndo, const u_char *ap)
  			}
  			return (p->name);
  		}
@@ -91,3 +101,6 @@ diff -up tcpdump-4.5.0/addrtoname.c.gethostby tcpdump-4.5.0/addrtoname.c
  	}
  	cp = inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf));
  	p->name = strdup(cp);
+-- 
+1.8.3.1
+
diff --git a/tcpdump-4.4.0-eperm.patch b/0003-Drop-root-priviledges-before-opening-first-savefile-.patch
similarity index 71%
rename from tcpdump-4.4.0-eperm.patch
rename to 0003-Drop-root-priviledges-before-opening-first-savefile-.patch
index 5750a8a..074854b 100644
--- a/tcpdump-4.4.0-eperm.patch
+++ b/0003-Drop-root-priviledges-before-opening-first-savefile-.patch
@@ -1,7 +1,19 @@
-diff -up tcpdump-4.4.0/tcpdump.1.in.eperm tcpdump-4.4.0/tcpdump.1.in
---- tcpdump-4.4.0/tcpdump.1.in.eperm	2013-10-07 15:21:26.795602764 +0200
-+++ tcpdump-4.4.0/tcpdump.1.in	2013-10-07 15:21:26.800602762 +0200
-@@ -221,6 +221,9 @@ have the name specified with the
+From 964bd27d3544cf952db1820c0badb79a71227b12 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Mon, 20 Oct 2014 14:32:43 +0200
+Subject: [PATCH 3/7] Drop root priviledges before opening first savefile if
+ running with -Z root
+
+---
+ tcpdump.1.in |  7 ++++++-
+ tcpdump.c    | 34 +++++++++++++++++++++++++++++++---
+ 2 files changed, 37 insertions(+), 4 deletions(-)
+
+diff --git a/tcpdump.1.in b/tcpdump.1.in
+index a966469..e3a6ef4 100644
+--- a/tcpdump.1.in
++++ b/tcpdump.1.in
+@@ -241,6 +241,9 @@ have the name specified with the
  flag, with a number after it, starting at 1 and continuing upward.
  The units of \fIfile_size\fP are millions of bytes (1,000,000 bytes,
  not 1,048,576 bytes).
@@ -11,7 +23,7 @@ diff -up tcpdump-4.4.0/tcpdump.1.in.eperm tcpdump-4.4.0/tcpdump.1.in
  .TP
  .B \-d
  Dump the compiled packet-matching code in a human readable form to
-@@ -720,7 +723,9 @@ but before opening any savefiles for out
+@@ -848,7 +851,9 @@ but before opening any savefiles for output, change the user ID to
  and the group ID to the primary group of
  .IR user .
  .IP
@@ -22,10 +34,11 @@ diff -up tcpdump-4.4.0/tcpdump.1.in.eperm tcpdump-4.4.0/tcpdump.1.in
  .IP "\fI expression\fP"
  .RS
  selects which packets will be dumped.
-diff -up tcpdump-4.4.0/tcpdump.c.eperm tcpdump-4.4.0/tcpdump.c
---- tcpdump-4.4.0/tcpdump.c.eperm	2013-03-24 22:49:18.000000000 +0100
-+++ tcpdump-4.4.0/tcpdump.c	2013-10-07 15:22:26.360590143 +0200
-@@ -1426,11 +1426,24 @@ main(int argc, char **argv)
+diff --git a/tcpdump.c b/tcpdump.c
+index 8d615d7..9110ccf 100644
+--- a/tcpdump.c
++++ b/tcpdump.c
+@@ -1699,11 +1699,24 @@ main(int argc, char **argv)
  	}
  #endif /* HAVE_CAP_NG_H */
  
@@ -43,7 +56,7 @@ diff -up tcpdump-4.4.0/tcpdump.c.eperm tcpdump-4.4.0/tcpdump.c
 +	if (WFileName && (getuid() == 0 || geteuid() == 0))
 +		if (Cflag && (username || chroot_dir))
 +			droproot(username, chroot_dir);
-+                else 
++                else
 +			chown_flag = 1;
 +	else
 +		if ((getuid() == 0 || geteuid() == 0) && (username || chroot_dir))
@@ -53,7 +66,7 @@ diff -up tcpdump-4.4.0/tcpdump.c.eperm tcpdump-4.4.0/tcpdump.c
  #endif /* WIN32 */
  
  	if (pcap_setfilter(pd, &fcode) < 0)
-@@ -1450,6 +1463,21 @@ main(int argc, char **argv)
+@@ -1738,6 +1751,21 @@ main(int argc, char **argv)
  		  MakeFilename(dumpinfo.CurrentFileName, WFileName, 0, 0);
  
  		p = pcap_dump_open(pd, dumpinfo.CurrentFileName);
@@ -75,3 +88,6 @@ diff -up tcpdump-4.4.0/tcpdump.c.eperm tcpdump-4.4.0/tcpdump.c
  #ifdef HAVE_CAP_NG_H
          /* Give up capabilities, clear Effective set */
          capng_clear(CAPNG_EFFECTIVE);
+-- 
+1.8.3.1
+
diff --git a/tcpslice-1.2a3-time.patch b/0004-tcpslice-update-tcpslice-patch-to-1.2a3.patch
similarity index 68%
rename from tcpslice-1.2a3-time.patch
rename to 0004-tcpslice-update-tcpslice-patch-to-1.2a3.patch
index c59448d..1482a9f 100644
--- a/tcpslice-1.2a3-time.patch
+++ b/0004-tcpslice-update-tcpslice-patch-to-1.2a3.patch
@@ -1,6 +1,18 @@
---- tcpslice-1.2a3.orig/search.c	2000-09-10 10:52:40.000000000 +0200
-+++ tcpslice-1.2a3/search.c	2006-07-28 14:56:55.000000000 +0200
-@@ -53,7 +53,7 @@
+From e029973991cf404936e67bafb4b5f94efd3a06cc Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Mon, 20 Oct 2014 14:43:04 +0200
+Subject: [PATCH 4/7] tcpslice: update tcpslice patch to 1.2a3
+
+---
+ tcpslice-1.2a3/search.c   | 22 +++++++++++++++-------
+ tcpslice-1.2a3/tcpslice.h | 20 ++++++++++++++++++++
+ 2 files changed, 35 insertions(+), 7 deletions(-)
+
+diff --git a/tcpslice-1.2a3/search.c b/tcpslice-1.2a3/search.c
+index 1e2d051..23aa105 100644
+--- a/tcpslice-1.2a3/search.c
++++ b/tcpslice-1.2a3/search.c
+@@ -53,7 +53,7 @@ static const char rcsid[] =
  /* Size of a packet header in bytes; easier than typing the sizeof() all
   * the time ...
   */
@@ -9,7 +21,7 @@
  
  extern int snaplen;
  
-@@ -111,16 +111,24 @@
+@@ -111,16 +111,24 @@ reasonable_header( struct pcap_pkthdr *hdr, time_t first_time, time_t last_time
  static void
  extract_header( pcap_t *p, u_char *buf, struct pcap_pkthdr *hdr )
  	{
@@ -40,8 +52,10 @@
  	/*
  	 * From bpf/libpcap/savefile.c:
  	 *
---- tcpslice-1.2a3.orig/tcpslice.h	1995-11-02 00:40:53.000000000 +0100
-+++ tcpslice-1.2a3/tcpslice.h	2006-07-28 14:56:55.000000000 +0200
+diff --git a/tcpslice-1.2a3/tcpslice.h b/tcpslice-1.2a3/tcpslice.h
+index de4a01c..9b220de 100644
+--- a/tcpslice-1.2a3/tcpslice.h
++++ b/tcpslice-1.2a3/tcpslice.h
 @@ -20,6 +20,26 @@
   */
  
@@ -69,3 +83,6 @@
  time_t	gwtm2secs( struct tm *tm );
  
  int	sf_find_end( struct pcap *p, struct timeval *first_timestamp,
+-- 
+1.8.3.1
+
diff --git a/0005-tcpslice-remove-unneeded-include.patch b/0005-tcpslice-remove-unneeded-include.patch
new file mode 100644
index 0000000..cb2b542
--- /dev/null
+++ b/0005-tcpslice-remove-unneeded-include.patch
@@ -0,0 +1,26 @@
+From c919edf76b8bd2360e50a6155588abdf03481244 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Mon, 20 Oct 2014 15:06:54 +0200
+Subject: [PATCH 5/7] tcpslice: remove unneeded include
+
+net/bpf.h doesn't exist on Linux.
+---
+ tcpslice-1.2a3/tcpslice.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tcpslice-1.2a3/tcpslice.c b/tcpslice-1.2a3/tcpslice.c
+index e73d76f..895e54f 100644
+--- a/tcpslice-1.2a3/tcpslice.c
++++ b/tcpslice-1.2a3/tcpslice.c
+@@ -35,8 +35,6 @@ static const char rcsid[] =
+ #include <sys/file.h>
+ #include <sys/stat.h>
+ 
+-#include <net/bpf.h>
+-
+ #include <ctype.h>
+ #ifdef HAVE_FCNTL_H
+ #include <fcntl.h>
+-- 
+1.8.3.1
+
diff --git a/0006-tcpslice-don-t-test-the-pointer-but-pointee-for-NULL.patch b/0006-tcpslice-don-t-test-the-pointer-but-pointee-for-NULL.patch
new file mode 100644
index 0000000..4438157
--- /dev/null
+++ b/0006-tcpslice-don-t-test-the-pointer-but-pointee-for-NULL.patch
@@ -0,0 +1,27 @@
+From a6a4b6fdb966ca408411d9002082f3a112b1c365 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Mon, 20 Oct 2014 15:19:44 +0200
+Subject: [PATCH 6/7] tcpslice: don't test the pointer but pointee for NULL
+
+---
+ tcpslice-1.2a3/tcpslice.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tcpslice-1.2a3/tcpslice.c b/tcpslice-1.2a3/tcpslice.c
+index 895e54f..a91439b 100644
+--- a/tcpslice-1.2a3/tcpslice.c
++++ b/tcpslice-1.2a3/tcpslice.c
+@@ -402,7 +402,9 @@ fill_tm(char *time_string, int is_delta, struct tm *t, time_t *usecs_addr)
+ 
+ 		while (isdigit(*t_stop))
+ 			++t_stop;
+-		if (! t_stop)
++
++                if (!(*t_stop))
++                        /* we've reached end of string -> bad date format */
+ 			error("bad date format %s, problem starting at %s",
+ 			      time_string, t_start);
+ 
+-- 
+1.8.3.1
+
diff --git a/0007-Introduce-nn-option.patch b/0007-Introduce-nn-option.patch
new file mode 100644
index 0000000..b7682b6
--- /dev/null
+++ b/0007-Introduce-nn-option.patch
@@ -0,0 +1,55 @@
+From c653dd118fce60a16f0d17e983fc4693bf1287bd Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Mon, 20 Oct 2014 13:26:38 +0200
+Subject: [PATCH 7/7] Introduce -nn option
+
+This changes the semantics on -n option so only namelookups are skipped. Port
+numbers *are* translated to their string representations. Option -nn then has
+the same semantics as -n had originally.
+---
+ addrtoname.c | 4 ++--
+ tcpdump.1.in | 6 +++++-
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/addrtoname.c b/addrtoname.c
+index 277751d..ed8376b 100644
+--- a/addrtoname.c
++++ b/addrtoname.c
+@@ -787,7 +787,7 @@ init_servarray(netdissect_options *ndo)
+ 
+ 		while (table->name)
+ 			table = table->nxt;
+-		if (ndo->ndo_nflag) {
++		if (ndo->ndo_nflag > 1) {
+ 			(void)snprintf(buf, sizeof(buf), "%d", port);
+ 			table->name = strdup(buf);
+ 		} else
+@@ -1187,7 +1187,7 @@ init_addrtoname(netdissect_options *ndo, uint32_t localnet, uint32_t mask)
+ 		f_localnet = localnet;
+ 		f_netmask = mask;
+ 	}
+-	if (ndo->ndo_nflag)
++	if (ndo->ndo_nflag > 1)
+ 		/*
+ 		 * Simplest way to suppress names.
+ 		 */
+diff --git a/tcpdump.1.in b/tcpdump.1.in
+index e3a6ef4..a8e65c2 100644
+--- a/tcpdump.1.in
++++ b/tcpdump.1.in
+@@ -532,7 +532,11 @@ Use \fIsecret\fP as a shared secret for validating the digests found in
+ TCP segments with the TCP-MD5 option (RFC 2385), if present.
+ .TP
+ .B \-n
+-Don't convert addresses (i.e., host addresses, port numbers, etc.) to names.
++Don't convert host addresses to names.  This can be used to avoid
++DNS lookups.
++.TP
++.B \-nn
++Don't convert protocol and port numbers etc. to names either.
+ .TP
+ .B \-N
+ Don't print domain name qualification of host names.
+-- 
+1.8.3.1
+
diff --git a/0008-Don-t-print-out-we-dropped-root-we-are-always-droppi.patch b/0008-Don-t-print-out-we-dropped-root-we-are-always-droppi.patch
new file mode 100644
index 0000000..371e4e3
--- /dev/null
+++ b/0008-Don-t-print-out-we-dropped-root-we-are-always-droppi.patch
@@ -0,0 +1,39 @@
+From 780db0477c304196a700894bdfd9a3096b5857fd Mon Sep 17 00:00:00 2001
+From: Michal Sekletar <msekleta at redhat.com>
+Date: Tue, 21 Oct 2014 13:37:24 +0200
+Subject: [PATCH 8/8] Don't print out we dropped root, we are always dropping
+ it.
+
+---
+ tcpdump.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/tcpdump.c b/tcpdump.c
+index 9110ccf..8ce9102 100644
+--- a/tcpdump.c
++++ b/tcpdump.c
+@@ -726,9 +726,7 @@ droproot(const char *username, const char *chroot_dir)
+ 		if (ret < 0) {
+ 			fprintf(stderr, "error : ret %d\n", ret);
+ 		}
+-		else {
+-			printf("dropped privs to %s\n", username);
+-		}
++
+ 		/* We don't need CAP_SETUID and CAP_SETGID */
+ 		capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, CAP_SETUID);
+ 		capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, CAP_SETUID);
+@@ -746,9 +744,7 @@ droproot(const char *username, const char *chroot_dir)
+ 			    pcap_strerror(errno));
+ 			exit(1);
+ 		}
+-		else {
+-			printf("dropped privs to %s\n", username);
+-		}
++
+ #endif /* HAVE_CAP_NG_H */
+ 	}
+ 	else {
+-- 
+1.8.3.1
+
diff --git a/sources b/sources
index d5d4ea8..c965793 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-973a2513d0076e34aa9da7e15ed98e1b  tcpdump-4.5.1.tar.gz
+74d0d3728b3cdc60db872d842e7f1598  tcpdump-4.6.2.tar.gz
 e329cbeb7e589f132d92c3447c477190  tcpslice-1.2a3.tar.gz
diff --git a/tcpdump.spec b/tcpdump.spec
index 44e6e58..ce06d3b 100644
--- a/tcpdump.spec
+++ b/tcpdump.spec
@@ -1,25 +1,25 @@
 Summary: A network traffic monitoring tool
 Name: tcpdump
 Epoch: 14
-Version: 4.5.1
-Release: 3%{?dist}
+Version: 4.6.2
+Release: 1%{?dist}
 License: BSD with advertising
 URL: http://www.tcpdump.org
 Group: Applications/Internet
 Requires(pre): shadow-utils
-BuildRequires: openssl-devel libpcap-devel
-BuildRequires: automake sharutils
+BuildRequires: automake sharutils openssl-devel libpcap-devel git
 
 Source0: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz
 Source1: ftp://ftp.ee.lbl.gov/tcpslice-1.2a3.tar.gz
 
-Patch1: tcpdump-4.0.0-portnumbers.patch
-Patch2: tcpdump-4.0.0-icmp6msec.patch
-Patch3: tcpdump-4.5.0-gethostby.patch
-Patch4: tcpdump-4.4.0-eperm.patch
-Patch5: tcpslice-1.2a3-time.patch
-Patch6: tcpslice-CVS.20010207-bpf.patch
-Patch7: tcpslice-1.2a3-dateformat.patch
+Patch0001:      0001-icmp6-print-Reachable-Time-and-Retransmit-Time-from-.patch
+Patch0002:      0002-Use-getnameinfo-instead-of-gethostbyaddr.patch
+Patch0003:      0003-Drop-root-priviledges-before-opening-first-savefile-.patch
+Patch0004:      0004-tcpslice-update-tcpslice-patch-to-1.2a3.patch
+Patch0005:      0005-tcpslice-remove-unneeded-include.patch
+Patch0006:      0006-tcpslice-don-t-test-the-pointer-but-pointee-for-NULL.patch
+Patch0007:      0007-Introduce-nn-option.patch
+Patch0008:      0008-Don-t-print-out-we-dropped-root-we-are-always-droppi.patch
 
 %define tcpslice_dir tcpslice-1.2a3
 
@@ -32,20 +32,7 @@ the packet headers, or just the ones that match particular criteria.
 Install tcpdump if you need a program to monitor network traffic.
 
 %prep
-%setup -q -a 1
-
-%patch1 -p1 -b .portnumbers
-%patch2 -p1 -b .icmp6msec
-%patch3 -p1 -b .gethostby
-%patch4 -p1 -b .eperm
-
-pushd %{tcpslice_dir}
-%patch5 -p1 -b .time
-%patch6 -p1 -b .bpf
-%patch7 -p1 -b .dateformat
-popd
-
-find . -name '*.c' -o -name '*.h' | xargs chmod 644
+%autosetup -a 1 -S git
 
 %build
 export CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS) -fno-strict-aliasing"
@@ -95,6 +82,9 @@ exit 0
 %{_mandir}/man8/tcpdump.8*
 
 %changelog
+* Mon Oct 20 2014 Michal Sekletar <msekleta at redhat.com> - 14:4.6.2-1
+- update to 4.6.2 (#1124289)
+
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 14:4.5.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list