diff options
Diffstat (limited to 'pcap-tc.c')
-rw-r--r-- | pcap-tc.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -572,6 +572,17 @@ TcActivate(pcap_t *p) } /* + * Turn a negative snapshot value (invalid), a snapshot value of + * 0 (unspecified), or a value bigger than the normal maximum + * value, into the maximum allowed value. + * + * If some application really *needs* a bigger snapshot + * length, we should just increase MAXIMUM_SNAPLEN. + */ + if (p->snapshot <= 0 || p->snapshot > MAXIMUM_SNAPLEN) + p->snapshot = MAXIMUM_SNAPLEN; + + /* * Initialize the PPI fixed fields */ pPpiHeader = (PPPI_HEADER)pt->PpiPacket; |