Ticket #183: mtu.patch

File mtu.patch, 0.8 KB (added by noel, 18 months ago)

patch from Niko Tyni <ntyni@…>

  • tcpreplay-2.99+3.0.beta11/src/tcprewrite.c

     
    200200    struct pcap_pkthdr *pkthdr = NULL;  /* packet header */ 
    201201    const u_char *pktdata = NULL;       /* packet from libpcap */ 
    202202    COUNTER packetnum = 0; 
     203    int ret; 
    203204 
    204205    /* MAIN LOOP  
    205206     * Keep sending while we have packets or until 
     
    228229        if (cache_result == CACHE_NOSEND) 
    229230            goto WRITE_PACKET; /* still need to write it so cache stays in sync */ 
    230231 
    231         if (tcpedit_packet(tcpedit, &pkthdr, (u_char**)&pktdata, cache_result) == -1) { 
     232        if ((ret = tcpedit_packet(tcpedit, &pkthdr, (u_char**)&pktdata, cache_result)) == -1) { 
    232233            return -1; 
     234        } else if (ret == 0) { 
     235            continue; 
    233236        } 
    234237 
    235238