From 7b2c7fd0404b379d8683d898568bed79e4d2d6d7 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 29 Aug 2008 12:30:41 +0000 Subject: [PATCH] - rediff patches with fuzz - add -fno-strict-aliasing to CFLAGS --- tcpdump-3.6.1-portnumbers.patch | 37 --------------------------------- tcpdump-3.9.8-portnumbers.patch | 37 +++++++++++++++++++++++++++++++++ tcpdump.spec | 10 ++++++--- 3 files changed, 44 insertions(+), 40 deletions(-) delete mode 100644 tcpdump-3.6.1-portnumbers.patch create mode 100644 tcpdump-3.9.8-portnumbers.patch diff --git a/tcpdump-3.6.1-portnumbers.patch b/tcpdump-3.6.1-portnumbers.patch deleted file mode 100644 index 472180f..0000000 --- a/tcpdump-3.6.1-portnumbers.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -uNr tcpdump-3.6.1.orig/addrtoname.c tcpdump-3.6.1/addrtoname.c ---- tcpdump-3.6.1.orig/addrtoname.c Sat Jan 13 20:01:00 2001 -+++ tcpdump-3.6.1/addrtoname.c Sat Jan 13 19:59:23 2001 -@@ -581,7 +581,7 @@ - - while (table->name) - table = table->nxt; -- if (nflag) { -+ if (nflag > 1) { - (void)snprintf(buf, sizeof(buf), "%d", port); - table->name = strdup(buf); - } else -@@ -745,7 +745,7 @@ - f_localnet = localnet; - f_netmask = mask; - } -- if (nflag) -+ if (nflag > 1) - /* - * Simplest way to suppress names. - */ -diff -uNr tcpdump-3.6.1.orig/tcpdump.1 tcpdump-3.6.1/tcpdump.1 ---- tcpdump-3.6.1.orig/tcpdump.1 Sat Jan 13 19:51:47 2001 -+++ tcpdump-3.6.1/tcpdump.1 Sat Jan 13 19:50:19 2001 -@@ -175,7 +175,11 @@ - ``tcpdump\ \ \-l \ \ > dat\ \ &\ \ tail\ \ \-f\ \ dat''. - .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. E.g., diff --git a/tcpdump-3.9.8-portnumbers.patch b/tcpdump-3.9.8-portnumbers.patch new file mode 100644 index 0000000..66a323c --- /dev/null +++ b/tcpdump-3.9.8-portnumbers.patch @@ -0,0 +1,37 @@ +diff -up tcpdump-3.9.8/addrtoname.c.portnumbers tcpdump-3.9.8/addrtoname.c +--- tcpdump-3.9.8/addrtoname.c.portnumbers 2007-09-26 03:59:52.000000000 +0200 ++++ tcpdump-3.9.8/addrtoname.c 2008-08-29 13:53:12.000000000 +0200 +@@ -704,7 +704,7 @@ init_servarray(void) + + while (table->name) + table = table->nxt; +- if (nflag) { ++ if (nflag > 1) { + (void)snprintf(buf, sizeof(buf), "%d", port); + table->name = strdup(buf); + } else +@@ -1104,7 +1104,7 @@ init_addrtoname(u_int32_t localnet, u_in + f_localnet = localnet; + f_netmask = mask; + } +- if (nflag) ++ if (nflag > 1) + /* + * Simplest way to suppress names. + */ +diff -up tcpdump-3.9.8/tcpdump.1.portnumbers tcpdump-3.9.8/tcpdump.1 +--- tcpdump-3.9.8/tcpdump.1.portnumbers 2008-08-29 13:53:12.000000000 +0200 ++++ tcpdump-3.9.8/tcpdump.1 2008-08-29 13:53:12.000000000 +0200 +@@ -403,7 +403,11 @@ Use \fIsecret\fP as a shared secret for + 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. diff --git a/tcpdump.spec b/tcpdump.spec index 6fe5b6c..174afd0 100644 --- a/tcpdump.spec +++ b/tcpdump.spec @@ -2,7 +2,7 @@ Summary: A network traffic monitoring tool Name: tcpdump Epoch: 14 Version: 3.9.8 -Release: 5%{?dist} +Release: 6%{?dist} License: BSD with advertising URL: http://www.tcpdump.org Group: Applications/Internet @@ -14,7 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz Source1: ftp://ftp.ee.lbl.gov/tcpslice-1.2a3.tar.gz Patch1: tcpdump-3.9.7-droproot.patch -Patch2: tcpdump-3.6.1-portnumbers.patch +Patch2: tcpdump-3.9.8-portnumbers.patch Patch3: tcpdump-3.9.7-crypto.patch Patch4: tcpdump-3.9.8-ikev2.patch Patch5: tcpslice-1.2a3-time.patch @@ -50,7 +50,7 @@ popd find . -name '*.c' -o -name '*.h' | xargs chmod 644 %build -export CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS)" +export CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS) -fno-strict-aliasing" pushd %{tcpslice_dir} # update config.{guess,sub} @@ -98,6 +98,10 @@ exit 0 %{_mandir}/man8/tcpdump.8* %changelog +* Fri Aug 29 2008 Miroslav Lichvar - 14:3.9.8-6 +- rediff patches with fuzz +- add -fno-strict-aliasing to CFLAGS + * Mon Jun 02 2008 Miroslav Lichvar - 14:3.9.8-5 - update config.{guess,sub} when building tcpslice - remove -D_GNU_SOURCE from CFLAGS