Message ID | 4F50C789.8050709@istac.de |
---|---|
State | Rejected, archived |
Delegated to: | David Miller |
Headers | show |
Le vendredi 02 mars 2012 à 14:13 +0100, Simeon Penev a écrit : > Hi, > > after testing the new 3.2 kernel and the new route caching code, i've > found a bug in net/ipv4/route.c. The route cache does not detect changes > to the MTU of the interface. Therefore IP fragmentation will happen with > false MTU. Please see attached the proposed patch. > Hi Did you test this patch doesnt break things like ip ro add 96.17.148.89 via 10.0.0.1 mtu 800 (and keep eth0 mtu being standard mtu) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Eric, no, i didn't. I'm new to the developer list and just wanted to post a patch proposition. I hoped that the maintainer of the code (probably Alan Cox) will decide whether to use it. Best regards, Simeon On 03/02/2012 02:43 PM, Eric Dumazet wrote: > Le vendredi 02 mars 2012 à 14:13 +0100, Simeon Penev a écrit : >> Hi, >> >> after testing the new 3.2 kernel and the new route caching code, i've >> found a bug in net/ipv4/route.c. The route cache does not detect changes >> to the MTU of the interface. Therefore IP fragmentation will happen with >> false MTU. Please see attached the proposed patch. >> > Hi > > Did you test this patch doesnt break things like > > ip ro add 96.17.148.89 via 10.0.0.1 mtu 800 > > (and keep eth0 mtu being standard mtu) > > > > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Le vendredi 02 mars 2012 à 14:49 +0100, Simeon Penev a écrit : > Hi Eric, > > no, i didn't. I'm new to the developer list and just wanted to post a > patch proposition. I hoped that the maintainer of the code (probably > Alan Cox) will decide whether to use it. > David Miller is the current network maintainer, but thats not the point :) I didnt test your patch, all I wanted to say is that you cant assume all routes share the same MTU (device MTU) And this is the assumption you coded : if (mtu && rt_is_output_route(rt) && mtu == dst->dev->mtu) return mtu; -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- linux-3.2.7/net/ipv4/route.c.orig 2012-02-28 17:26:00.214386221 +0100 +++ linux-3.2.7/net/ipv4/route.c 2012-02-28 17:25:27.826225630 +0100 @@ -1926,7 +1926,7 @@ const struct rtable *rt = (const struct rtable *) dst; unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); - if (mtu && rt_is_output_route(rt)) + if (mtu && rt_is_output_route(rt) && mtu == dst->dev->mtu) return mtu; mtu = dst->dev->mtu; @@ -1940,6 +1940,8 @@ if (mtu > IP_MAX_MTU) mtu = IP_MAX_MTU; + dst_metric_set(dst, RTAX_MTU, mtu); + return mtu; }