ソースを参照

Import Debian version 2.99+3.0.beta11-3

Noèl Köthe 17 年 前
コミット
33613bcc47
2 ファイル変更1 行追加5 行削除
  1. 1 1
      src/tcpedit/tcpedit.c
  2. 0 4
      src/tcprewrite.c

+ 1 - 1
src/tcpedit/tcpedit.c

@@ -202,7 +202,7 @@ tcpedit_packet(tcpedit_t *tcpedit, struct pcap_pkthdr **pkthdr,
      * put back the layer 3 and above back in the pkt.data buffer 
      * put back the layer 3 and above back in the pkt.data buffer 
      * we can't edit the packet at layer 3 or above beyond this point
      * we can't edit the packet at layer 3 or above beyond this point
      */
      */
-    memcpy(&newpkt[l2len], ip_hdr, pkthdr_ptr->caplen - l2len);
+     memcpy((&(*pktdata)[l2len]), ip_hdr, (*pkthdr)->caplen - l2len);
 #endif
 #endif
 
 
     tcpedit->runtime.total_bytes += (*pkthdr)->caplen;
     tcpedit->runtime.total_bytes += (*pkthdr)->caplen;

+ 0 - 4
src/tcprewrite.c

@@ -201,10 +201,6 @@ rewrite_packets(tcpedit_t *tcpedit, pcap_t *pin, pcap_dumper_t *pout)
     const u_char *pktdata = NULL;       /* packet from libpcap */
     const u_char *pktdata = NULL;       /* packet from libpcap */
     COUNTER packetnum = 0;
     COUNTER packetnum = 0;
 
 
-#ifdef FORCE_ALIGN
-    ipbuff = (u_char *)safe_malloc(MAXPACKET);
-#endif
-
     /* MAIN LOOP 
     /* MAIN LOOP 
      * Keep sending while we have packets or until
      * Keep sending while we have packets or until
      * we've sent enough packets
      * we've sent enough packets