tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
(with patch!) Re: ICMP_UNREACH_NEEDFRAG returns iface MTU instead of route?
On Fri, Dec 27, 2013 at 01:39:04PM -0500, Mouse wrote:
> >> It seems that the ICMP fragmentation needed packet contains the
> >> interface MTU rather than the route MTU if the route MTU is lower
> >> than the iface's:
>
> Yes. I agree with Darren on this; see PR 44508, and my thread bringing
> it up (right here on tech-net) on 2012-06-14. Since neither of those
> apparently did much, it's unlikely this thread will do much either.
> But I didn't give patches before; this time I have them, at least for
> the versions I run (4.0.1 and 5.2).
Here is a patch to fix it the other way (use interface MTU when forwarding)
for NetBSD-current. It is untested, but it has the advantage, to me at
least, of being a 1-line change.
I suggest we fix it this way for now and count the dancing angels once
we have stopped being stuck with the pins.
Index: ip_output.c
===================================================================
RCS file: /cvsroot/src/sys/netinet/ip_output.c,v
retrieving revision 1.224
diff -c -r1.224 ip_output.c
*** ip_output.c 29 Jun 2013 21:06:58 -0000 1.224
--- ip_output.c 28 Dec 2013 20:26:43 -0000
***************
*** 283,289 ****
}
ia = ifatoia(rt->rt_ifa);
ifp = rt->rt_ifp;
! if ((mtu = rt->rt_rmx.rmx_mtu) == 0)
mtu = ifp->if_mtu;
rt->rt_use++;
if (rt->rt_flags & RTF_GATEWAY)
--- 283,290 ----
}
ia = ifatoia(rt->rt_ifa);
ifp = rt->rt_ifp;
! if ((flags & (IP_FORWARDING|IP_RAWOUTPUT) ||
! ((mtu = rt->rt_rmx.rmx_mtu) == 0))
mtu = ifp->if_mtu;
rt->rt_use++;
if (rt->rt_flags & RTF_GATEWAY)
Home |
Main Index |
Thread Index |
Old Index