Skip to content

Commit

Permalink
#251 allow 65549 byte frame size (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen authored Nov 19, 2016
1 parent 7c942b7 commit c81307d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
dnl $Id$

AC_PREREQ([2.69])
AC_INIT([tcpreplay],[4.1.1],[https://github.com/appneta/tcpreplay/issues],[tcpreplay],[http://tcpreplay.sourceforge.net/])
AC_INIT([tcpreplay],[4.1.2],[https://github.com/appneta/tcpreplay/issues],[tcpreplay],[http://tcpreplay.sourceforge.net/])
AC_CONFIG_SRCDIR([src/tcpreplay.c])
AM_CONFIG_HEADER([src/config.h])
AC_CONFIG_AUX_DIR(config)
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
11/19/2016 Version 4.1.2
- Fix compilation with musl C library (#260)
- Give user CFLAGS precedence (#256)
- Increase max packet size to 65549 (#251)
- Handle IP headers with zero length (#247)

01/11/2016 Version 4.1.1
- Improve --pps accuracy and performance (#236)
- Option --unique-ip accepts --duration (#227)
Expand Down
2 changes: 1 addition & 1 deletion src/defines.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ typedef struct tcpr_speed_s {
#define DEFAULT_MTU 1500 /* Max Transmission Unit of standard ethernet
* don't forget *frames* are MTU + L2 header! */

#define MAXPACKET 65535 /* was 16436 linux loopback, but maybe something is bigger then
#define MAXPACKET 65549 /* was 16436 linux loopback, but maybe something is bigger then
linux loopback */

#define MAX_SNAPLEN 65535 /* tell libpcap to capture the entire packet */
Expand Down
2 changes: 2 additions & 0 deletions src/tcprewrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ rewrite_packets(tcpedit_t *tcpedit, pcap_t *pin, pcap_dumper_t *pout)
packetnum++;
dbgx(2, "packet " COUNTER_SPEC " caplen %d", packetnum, pkthdr.caplen);

if (pkthdr.caplen > MAXPACKET)
errx(-1, "Frame too big, caplen %d exceeds %d", pkthdr.caplen, MAXPACKET);
/*
* copy over the packet so we can pad it out if necessary and
* because pcap_next() returns a const ptr
Expand Down

0 comments on commit c81307d

Please sign in to comment.