I am trying to use tcpreplay
to send the contents of a pcap file. It is refusing to send some packets because they are too long. However, instead of continuing with the next packet, it stops:
$ tcpreplay -i p4p1 multi.pcap
Warning: May need to run as root to get access to all network interfaces.
Warning: Unable to send packet: Error with PF_PACKET send() [444]: Message too long (errno = 90)
Actual: 443 packets (63852 bytes) sent in 0.203486 seconds
Rated: 313790.6 Bps, 2.51 Mbps, 2177.05 pps
Flows: 115 flows, 565.14 fps, 405 flow packets, 39 non-flow
Statistics for network device: p4p1
Successful packets: 443
Failed packets: 1
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
I would like to skip failed packets and send the rest.
The reason you receive "Message too long" is because the MTU on your network interface is smaller than your packet size.
You can increase the MTU size of your system and than all packets on the pcap will be sent.
In Linux from user root you can use the command: ifconfig {interface} mtu {New Size}