From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCHv2 iproute2-next] ip/geneve: fix ttl inherit behavior Date: Sun, 21 Oct 2018 09:55:52 -0600 Message-ID: <4d9f9f90-7c36-67d8-980a-0bc947d46e7b@gmail.com> References: <1538033257-32244-1-git-send-email-liuhangbin@gmail.com> <1539846110-11607-1-git-send-email-liuhangbin@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Stephen Hemminger , Phil Sutter , Michal Kubecek To: Hangbin Liu , netdev@vger.kernel.org Return-path: Received: from mail-pl1-f170.google.com ([209.85.214.170]:40128 "EHLO mail-pl1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727705AbeJVAKk (ORCPT ); Sun, 21 Oct 2018 20:10:40 -0400 Received: by mail-pl1-f170.google.com with SMTP id 1-v6so17934632plv.7 for ; Sun, 21 Oct 2018 08:55:55 -0700 (PDT) In-Reply-To: <1539846110-11607-1-git-send-email-liuhangbin@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/18/18 1:01 AM, Hangbin Liu wrote: > Currently when we add geneve with "ttl inherit", we only set ttl to 0, which > is actually use whatever default value instead of inherit the inner protocol's > ttl value. > > To make a difference with ttl inherit and ttl == 0, we add an attribute > IFLA_GENEVE_TTL_INHERIT in kernel commit 52d0d404d39dd ("geneve: add ttl > inherit support"). Now let's use "ttl inherit" to inherit the inner > protocol's ttl, and use "ttl auto" to means "use whatever default value", > the same behavior with ttl == 0. > > v2: > 1) remove IFLA_GENEVE_TTL_INHERIT defination in if_link.h as it's already > updated. > 2) Still use addattr8() so we can enable/disable ttl inherit, as Michal > suggested. > > Reported-by: Jianlin Shi > Signed-off-by: Hangbin Liu > --- > ip/iplink_geneve.c | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) > please update the man page as well.