netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: robertshearman@gmail.com
Cc: netdev@vger.kernel.org, Robert Shearman <rs823p@att.com>
Subject: Re: [PATCH iproute2] gre: Fix ttl inherit option
Date: Tue, 28 Nov 2017 09:49:16 -0800	[thread overview]
Message-ID: <20171128094916.4453ea1a@xeon-e3> (raw)
In-Reply-To: <1511867781-11592-1-git-send-email-robertshearman@gmail.com>

On Tue, 28 Nov 2017 11:16:21 +0000
robertshearman@gmail.com wrote:

> From: Robert Shearman <rs823p@att.com>
> 
> Specifying "... ttl inherit" currently does nothing on a GRE link
> modify since the previous ttl value is retrieved up front. Fix this by
> explicitly setting ttl to 0 when "inherit" is specified for the
> option, since 0 represents the semantics of inherit.
> 
> Signed-off-by: Robert Shearman <rs823p@att.com>
> ---
>  ip/link_gre.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/ip/link_gre.c b/ip/link_gre.c
> index 35782caaa68b..43cb1af6196a 100644
> --- a/ip/link_gre.c
> +++ b/ip/link_gre.c
> @@ -276,7 +276,8 @@ get_failed:
>  				if (uval > 255)
>  					invarg("TTL must be <= 255\n", *argv);
>  				ttl = uval;
> -			}
> +			} else
> +				ttl = 0;
>  		} else if (!matches(*argv, "tos") ||
>  			   !matches(*argv, "tclass") ||
>  			   !matches(*argv, "dsfield")) {

Applied. Thanks.

      reply	other threads:[~2017-11-28 17:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 11:16 [PATCH iproute2] gre: Fix ttl inherit option robertshearman
2017-11-28 17:49 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171128094916.4453ea1a@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.org \
    --cc=robertshearman@gmail.com \
    --cc=rs823p@att.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).