summaryrefslogtreecommitdiffstats
path: root/network/hping3/patches/dontfrag_offbyone.diff
blob: d0be06e436f1aba9eaa2f76bbfca361292514de0 (plain)

Fixes Off-by-one error with --dontfrag

--- a/sendip_handler.c
+++ b/sendip_handler.c
@@ -19,7 +19,7 @@
 {
 	ip_optlen = ip_opt_build(ip_opt);
 
-	if (!opt_fragment && (size+ip_optlen+20 >= h_if_mtu))
+	if (!opt_fragment && (size+ip_optlen+20 > h_if_mtu))
 	{
 		/* auto-activate fragmentation */
 		virtual_mtu = h_if_mtu-20;