Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Oct 2011 11:54:43 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        freebsd-net <freebsd-net@freebsd.org>
Subject:   [PATCH] Don't have ICMP Echo Replies copy fragmentation flags from Echo Request
Message-ID:  <CAFMmRNy%2BFhfhkhHzGibvdesqBW-jVXr87=NGBhSbJXKK7FDpbA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Currently when FreeBSD responds to a ICMP Echo Request, it takes the
original mbuf, rewrites a couple of fields (like the src/dst IP and
the ICMP type), and then sends that mbuf back.  As things are
currently implemented, the Don't Fragment bit is kept in the ICMP
replay.  This can cause problems for large ICMP Echo Requests if the
MTU on the return route is less than the MTU on the incoming route and
the DF bit is set(Linux's ping command sets it by default).  Is it
intended that the DF bit from the Request be copied into the Reply?
If not, this patch fixes the issue for me:

--- ip_icmp.c    2011-10-06 14:54:14.000000000 -0400
+++ ip_icmp.c   2011-10-06 15:12:27.000000000 -0400
@@ -767,6 +767,7 @@
 #endif
        ip->ip_src = t;
        ip->ip_ttl = V_ip_defttl;
+       ip->ip_off = 0;

        if (optlen > 0) {
                register u_char *cp;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNy%2BFhfhkhHzGibvdesqBW-jVXr87=NGBhSbJXKK7FDpbA>