Changeset d99c759


Ignore:
Timestamp:
03/17/10 16:50:34 (11 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
026eb88
Parents:
666b5cf
Message:
  • Increased maximum TCP segment size supported by tracereport *again*
  • Fixed tracereport to not segfault when it gets a segment larger than it supports - now it prints an error message and carries on
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracereport/tcpsegment_report.c

    r666b5cf rd99c759  
    77#include "report.h"
    88
    9 static stat_t tcpseg_stat[3][9000] = {{{0,0}}} ;
     9#define MAX_SEG_SIZE 10000
     10
     11static stat_t tcpseg_stat[3][MAX_SEG_SIZE + 1] = {{{0,0}}} ;
    1012static bool suppress[3] = {true,true,true};
    1113
     
    2628        ip_len = ntohs(ip->ip_len);
    2729        ss = ip_len - (ip->ip_hl * 4);
     30
     31        if (ss > MAX_SEG_SIZE) {
     32                fprintf(stderr, "Maximum segment size %u exceeded - size was %u\n",
     33                                MAX_SEG_SIZE, ss);
     34                return;
     35        }
     36
    2837
    2938        tcpseg_stat[dir][ss].count++;
Note: See TracChangeset for help on using the changeset viewer.