Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754191AbdFNF3E (ORCPT ); Wed, 14 Jun 2017 01:29:04 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34971 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750740AbdFNF3C (ORCPT ); Wed, 14 Jun 2017 01:29:02 -0400 Date: Wed, 14 Jun 2017 15:28:39 +1000 From: Peter Dawson To: =?UTF-8?B?5Lil5rW35Y+M?= Cc: "David S. Miller" , Alexey Kuznetsov , James Morris , Patrick McHardy , Daniel Borkmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ip6_tunnel: Correct tos value in collect_md mode Message-ID: <20170614152839.38406ce2@gmail.com> In-Reply-To: <9E61EADF-769B-431A-81EA-ADBAAD32ABD3@cmss.chinamobile.com> References: <1497408497-1473-1-git-send-email-yanhaishuang@cmss.chinamobile.com> <9E61EADF-769B-431A-81EA-ADBAAD32ABD3@cmss.chinamobile.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v5E5TA3s027887 Content-Length: 512 Lines: 11 On Wed, 14 Jun 2017 10:54:31 +0800 严海双 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.