Browse Source

Import upstream version 3.2.3

Aaron Turner 16 years ago
parent
commit
8949dfb6a1

+ 3 - 3
configure

@@ -2079,7 +2079,7 @@ fi
 
 MAJOR_VERSION=3
 MINOR_VERSION=2
-MICRO_VERSION=1
+MICRO_VERSION=3
 TCPREPLAY_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
 
 TCPREPLAY_RELEASE=1
@@ -37215,9 +37215,9 @@ pcap_sendpacket:            ${have_pcap_sendpacket}
 
 case $host in
 	*-apple-darwin*)
-	{ echo "$as_me:$LINENO: WARNING: Apple OS X has a serious problem!
+	{ echo "$as_me:$LINENO: WARNING: Apple OS X versions prior to 10.5 (Leopard) has a serious problem!
 	Please see: http://tcpreplay.synfin.net/trac/ticket/142 for more details" >&5
-echo "$as_me: WARNING: Apple OS X has a serious problem!
+echo "$as_me: WARNING: Apple OS X versions prior to 10.5 (Leopard) has a serious problem!
 	Please see: http://tcpreplay.synfin.net/trac/ticket/142 for more details" >&2;}
 	;;
 

+ 3 - 3
configure.ac

@@ -1,5 +1,5 @@
 
-dnl $Id: configure.ac 1922 2007-10-25 18:28:47Z aturner $
+dnl $Id: configure.ac 1937 2007-11-01 18:53:05Z aturner $
 
 AC_INIT(tcpreplay)
 AC_CONFIG_SRCDIR(src/tcpreplay.c)
@@ -11,7 +11,7 @@ AM_WITH_DMALLOC
 dnl Set version info here!
 MAJOR_VERSION=3
 MINOR_VERSION=2
-MICRO_VERSION=1
+MICRO_VERSION=3
 TCPREPLAY_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
 
 dnl Release is only used for the RPM spec file
@@ -1155,7 +1155,7 @@ pcap_sendpacket:            ${have_pcap_sendpacket}
 
 case $host in
 	*-apple-darwin*)
-	AC_MSG_WARN([Apple OS X has a serious problem!
+	AC_MSG_WARN([Apple OS X versions prior to 10.5 (Leopard) has a serious problem!
 	Please see: http://tcpreplay.synfin.net/trac/ticket/142 for more details])
 	;;
 	

+ 9 - 1
docs/CHANGELOG

@@ -1,4 +1,12 @@
-$Id: CHANGELOG 1924 2007-10-25 19:20:28Z aturner $
+$Id: CHANGELOG 1936 2007-11-01 18:33:38Z aturner $
+
+11/01/2007: Version 3.2.3
+    - Fix compile issue under Linux and other OS's (#275)
+    
+10/31/2007: Version 3.2.2
+    - Enable source MAC spoofing for OS X (#142, #151)
+        * Tcpreplay now requires OS X 10.5 (Leopard)
+    - Fix crash/memory access error with tcpreplay -N (#273)
 
 10/25/2007: Version 3.2.1
     - Fix tcprewrite segfault in 'make test' under Linux (#200)

+ 5 - 4
src/common/interface.c

@@ -1,4 +1,4 @@
-/* $Id: interface.c 1897 2007-08-25 04:57:38Z aturner $ */
+/* $Id: interface.c 1928 2007-10-26 17:21:35Z aturner $ */
 
 /*
  * Copyright (c) 2007 Aaron Turner.
@@ -100,6 +100,10 @@ get_interface_list(void)
     list_ptr = list_head;
     
     while (pcap_if_ptr != NULL) {
+        if (i > 0) {
+            list_ptr->next = (interface_list_t *)safe_malloc(sizeof(interface_list_t));
+            list_ptr = list_ptr->next;
+        }
         strlcpy(list_ptr->name, pcap_if_ptr->name, sizeof(list_ptr->name));
         
         /* description is usually null under Unix */
@@ -109,10 +113,7 @@ get_interface_list(void)
         sprintf(list_ptr->alias, "%%%d", i++);
         list_ptr->flags = pcap_if_ptr->flags;
         pcap_if_ptr = pcap_if_ptr->next;
-        list_ptr->next = (interface_list_t *)safe_malloc(sizeof(interface_list_t));
-        list_ptr = list_ptr->next;
     }
-    safe_free(list_ptr); /* free the last entry which was never used */
     pcap_freealldevs(pcap_if);
     return(list_head);
 }

+ 14 - 11
src/common/sendpacket.c

@@ -1,4 +1,4 @@
-/* $Id: sendpacket.c 1897 2007-08-25 04:57:38Z aturner $ */
+/* $Id: sendpacket.c 1935 2007-11-01 16:46:28Z aturner $ */
 
 /*
  * Copyright (c) 2006 Aaron Turner.
@@ -391,10 +391,11 @@ sendpacket_open_pcap(const char *device, char *errbuf)
 {
     pcap_t *pcap;
     sendpacket_t *sp;
-/*
+#ifdef BIOCSHDRCMPLT
     u_int spoof_eth_src = 1;
     int fd;
- */
+#endif
+
     assert(device);
     assert(errbuf);
 
@@ -407,14 +408,16 @@ sendpacket_open_pcap(const char *device, char *errbuf)
     sp = (sendpacket_t *)safe_malloc(sizeof(sendpacket_t));
     strlcpy(sp->device, device, sizeof(sp->device));
     sp->handle.pcap = pcap;
-
-/*
+    
+#ifdef BIOCSHDRCMPLT
+    /* 
+     * Only systems using BPF on the backend need this... 
+     * other systems don't have ioctl and will get compile errors.
+     */
     fd = pcap_get_selectable_fd(pcap);
-    if (ioctl(fd, BIOCSHDRCMPLT, &spoof_eth_src) == -1) {
+    if (ioctl(fd, BIOCSHDRCMPLT, &spoof_eth_src) == -1)
         errx(1, "Unable to enable source MAC spoof support: %s", strerror(errno));
-    }
- */
-    
+#endif
     return sp;
 }
 
@@ -647,7 +650,7 @@ sendpacket_open_bpf(const char *device, char *errbuf)
     struct ifreq ifr;
     struct bpf_version bv;
     u_int v;
-#if defined(BIOCGHDRCMPLT) && defined(BIOCSHDRCMPLT) && !(__APPLE__)
+#if defined(BIOCGHDRCMPLT) && defined(BIOCSHDRCMPLT)
     u_int spoof_eth_src = 1;
 #endif
     
@@ -704,7 +707,7 @@ sendpacket_open_bpf(const char *device, char *errbuf)
      *  NetBSD and FreeBSD BPF have an ioctl for enabling/disabling
      *  automatic filling of the link level source address.
      */
-#if defined(BIOCGHDRCMPLT) && defined(BIOCSHDRCMPLT) && !(__APPLE__)
+#if defined(BIOCGHDRCMPLT) && defined(BIOCSHDRCMPLT)
     if (ioctl(mysocket, BIOCSHDRCMPLT, &spoof_eth_src) == -1) {
         snprintf(errbuf, SENDPACKET_ERRBUF_SIZE, 
             "Unable to enable spoofing src MAC: %s", strerror(errno));

+ 1 - 1
src/common/svn_version.c

@@ -1,4 +1,4 @@
-const char SVN_Version[] = "1925";
+const char SVN_Version[] = "1939";
 const char *svn_version(void) {
 	return SVN_Version;
 }

+ 2 - 2
src/tcpbridge.1

@@ -1,7 +1,7 @@
-.TH TCPBRIDGE 1 2007-10-25 "(tcpbridge )" "Programmer's Manual"
+.TH TCPBRIDGE 1 2007-11-01 "(tcpbridge )" "Programmer's Manual"
 .\"  DO NOT EDIT THIS FILE   (tcpbridge.1)
 .\"  
-.\"  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:13 PM PDT
+.\"  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:25 PM PDT
 .\"  From the definitions    tcpbridge_opts.def
 .\"  and the template file   agman1.tpl
 .\"

+ 1 - 1
src/tcpbridge_opts.c

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (tcpbridge_opts.c)
  *  
- *  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:12 PM PDT
+ *  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:24 PM PDT
  *  From the definitions    tcpbridge_opts.def
  *  and the template file   options
  *

+ 1 - 1
src/tcpbridge_opts.h

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (tcpbridge_opts.h)
  *  
- *  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:12 PM PDT
+ *  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:24 PM PDT
  *  From the definitions    tcpbridge_opts.def
  *  and the template file   options
  *

+ 1 - 1
src/tcpedit/tcpedit_stub.h

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (tcpedit_stub.h)
  *  
- *  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:14 PM PDT
+ *  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:26 PM PDT
  *  From the definitions    tcpedit_stub.def
  *  and the template file   options
  *

+ 2 - 2
src/tcpprep.1

@@ -1,7 +1,7 @@
-.TH TCPPREP 1 2007-10-25 "(tcpprep )" "Programmer's Manual"
+.TH TCPPREP 1 2007-11-01 "(tcpprep )" "Programmer's Manual"
 .\"  DO NOT EDIT THIS FILE   (tcpprep.1)
 .\"  
-.\"  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:12 PM PDT
+.\"  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:24 PM PDT
 .\"  From the definitions    tcpprep_opts.def
 .\"  and the template file   agman1.tpl
 .\"

+ 1 - 1
src/tcpprep_opts.c

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (tcpprep_opts.c)
  *  
- *  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:11 PM PDT
+ *  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:23 PM PDT
  *  From the definitions    tcpprep_opts.def
  *  and the template file   options
  *

+ 1 - 1
src/tcpprep_opts.h

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (tcpprep_opts.h)
  *  
- *  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:11 PM PDT
+ *  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:23 PM PDT
  *  From the definitions    tcpprep_opts.def
  *  and the template file   options
  *

+ 2 - 2
src/tcpreplay.1

@@ -1,7 +1,7 @@
-.TH TCPREPLAY 1 2007-10-25 "(tcpreplay )" "Programmer's Manual"
+.TH TCPREPLAY 1 2007-11-01 "(tcpreplay )" "Programmer's Manual"
 .\"  DO NOT EDIT THIS FILE   (tcpreplay.1)
 .\"  
-.\"  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:12 PM PDT
+.\"  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:24 PM PDT
 .\"  From the definitions    tcpreplay_opts.def
 .\"  and the template file   agman1.tpl
 .\"

+ 1 - 1
src/tcpreplay_opts.c

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (tcpreplay_opts.c)
  *  
- *  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:11 PM PDT
+ *  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:23 PM PDT
  *  From the definitions    tcpreplay_opts.def
  *  and the template file   options
  *

+ 1 - 1
src/tcpreplay_opts.h

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (tcpreplay_opts.h)
  *  
- *  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:10 PM PDT
+ *  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:22 PM PDT
  *  From the definitions    tcpreplay_opts.def
  *  and the template file   options
  *

+ 2 - 2
src/tcprewrite.1

@@ -1,7 +1,7 @@
-.TH TCPREWRITE 1 2007-10-25 "(tcprewrite )" "Programmer's Manual"
+.TH TCPREWRITE 1 2007-11-01 "(tcprewrite )" "Programmer's Manual"
 .\"  DO NOT EDIT THIS FILE   (tcprewrite.1)
 .\"  
-.\"  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:12 PM PDT
+.\"  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:25 PM PDT
 .\"  From the definitions    tcprewrite_opts.def
 .\"  and the template file   agman1.tpl
 .\"

+ 1 - 1
src/tcprewrite_opts.c

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (tcprewrite_opts.c)
  *  
- *  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:11 PM PDT
+ *  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:23 PM PDT
  *  From the definitions    tcprewrite_opts.def
  *  and the template file   options
  *

+ 1 - 1
src/tcprewrite_opts.h

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (tcprewrite_opts.h)
  *  
- *  It has been AutoGen-ed  Thursday October 25, 2007 at 12:23:11 PM PDT
+ *  It has been AutoGen-ed  Thursday November  1, 2007 at 01:50:23 PM PDT
  *  From the definitions    tcprewrite_opts.def
  *  and the template file   options
  *