Re: [PATCH v2 1/2] ip6_gre: Fix MTU setting for ip6gretap

From: David Miller
Date: Tue May 24 2016 - 17:34:24 EST


From: Haishuang Yan <yanhaishuang@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 21 May 2016 18:17:34 +0800

> When creat an ip6gretap interface with an unreachable route,
> the MTU is about 14 bytes larger than what was needed.
...
> Because rt is not NULL here, so dev->mtu will subtract the ethernet
> header length later. But when rt is NULL, it just simply return, so
> dev->mtu doesn't update correctly in this situation.
>
> This patch first verify the dev->type is ARPHRD_ETHER for ip6gretap
> interface, and then decrease the mtu as early as possible.
>
> Signed-off-by: Haishuang Yan <yanhaishuang@xxxxxxxxxxxxxxxxxxxx>

Applied.