Opened 6 years ago

Last modified 6 years ago

#527 assigned defect

Unable to read pcap file for playback

Reported by: cruvolo@… Owned by: aturner
Priority: medium Milestone:
Component: tcpreplay Version:
Keywords: Cc:
Operating System: Linux Add to FAQ?: no
Hardware: All
Output of tcpreplay -V: svn trunk revision 2648.

Description

tcpreplay doesn't load a pcap file for playback. please apply the following patch to the trunk.

Index: src/tcpreplay_api.c
===================================================================
--- src/tcpreplay_api.c (revision 2648)
+++ src/tcpreplay_api.c (working copy)
@@ -624,6 +624,7 @@
 
     if (ctx->options->source_cnt < MAX_FILES) {
         ctx->options->sources[ctx->options->source_cnt].filename = safe_strdup(pcap_file);
+        ctx->options->sources[ctx->options->source_cnt].type = source_filename;
 
         /*
          * prepare the cache info data struct.  This doesn't actually enable
Index: src/tcpreplay.c
===================================================================
--- src/tcpreplay.c     (revision 2648)
+++ src/tcpreplay.c     (working copy)
@@ -122,7 +122,7 @@
     }
 
     for (i = 0; i < argc; i++) {
-        ctx->options->sources[i].filename = safe_strdup(argv[i]);
+       tcpreplay_add_pcapfile(ctx, argv[i]);
 
         /* preload our pcap file? */
         if (ctx->options->preload_pcap) {

Change History (1)

comment:1 Changed 6 years ago by aturner

  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.