@@ -282,7 +282,9 @@ static void do_flush_udp(int fd)
if (cfg_expected_pkt_len && ret != cfg_expected_pkt_len)
error(1, 0, "recv: bad packet len, got %d,"
" expected %d\n", ret, cfg_expected_pkt_len);
- if (cfg_expected_gso_size && cfg_expected_gso_size != gso_size)
+ /* For some network reasons, ret less than gso_size is not an error */
+ if (cfg_expected_gso_size && cfg_expected_gso_size != gso_size &&
+ ret > cfg_expected_gso_size)
error(1, 0, "recv: bad gso size, got %d, expected %d %s",
gso_size, cfg_expected_gso_size, "(-1 == no gso cmsg))\n");
if (len && cfg_verify) {