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: see sys/netinet/ip_input.c, ip_forward(), case
EMSGSIZE--around line 1337: destmtu = rt->rt_ifp->if_mtu;
Is that what it should be doing? It seems wrong and isn't what I
expected... if I artificially lower the MTU of a route, e.g.,
route add www.netbsd.org $my_gateway_ip -mtu 1200
Then ping -Ds 1300 www.netbsd.org from another machine that routes
through the above router, I get:
PING www.netbsd.org (149.20.53.86): 1300 data bytes
36 bytes from foxy.azeotrope.org (10.1.1.67): frag needed and DF set. Next
MTU=1500 for icmp_seq=0
Shouldn't Next MTU=1200, rather than 1500?