Re: [PATCH] ip6_tunnel: Correct tos value in collect_md mode

From: Peter Dawson
Date: Wed Jun 14 2017 - 01:29:07 EST


On Wed, 14 Jun 2017 10:54:31 +0800
äæå <yanhaishuang@xxxxxxxxxxxxxxxxxxxx> wrote:


> > Changes since v2:
> > * mask key->tos with RT_TOS() suggested by Daniel

Can you help me understand the rationale for this change? Is there are bug introduced by dsfield = ip6_tclass(key->label); ?

The RT_TOS masks out 4bits of the 8bit tos field in accordance with RFC1349 (obsoleted by RFC2474). IPv6 does not have a TOS field. So it dosen't make sense to apply a TOS value to the outer header of an IPv6 tunnel.