[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <08e2c6b8-0910-0d0b-39a4-887a0d3e4f94@cumulusnetworks.com>
Date: Mon, 10 Apr 2017 21:43:53 -0600
From: David Ahern <dsa@...ulusnetworks.com>
To: Robert Shearman <rshearma@...cade.com>, netdev@...r.kernel.org
Cc: stephen@...workplumber.org
Subject: Re: [PATCH iproute2 net-next 1/2] iproute: Add support for
ttl-propagation attribute
On 4/10/17 8:36 AM, Robert Shearman wrote:
> @@ -1184,6 +1192,20 @@ static int iproute_modify(int cmd, unsigned int flags, int argc, char **argv)
>
> if (rta->rta_len > RTA_LENGTH(0))
> addraw_l(&req.n, 1024, RTA_DATA(rta), RTA_PAYLOAD(rta));
> + } else if (strcmp(*argv, "ttl-propagate") == 0) {
> + __u8 ttl_prop;
> +
> + NEXT_ARG();
> + if (strcmp(*argv, "enabled") == 0)
> + ttl_prop = 1;
> + else if (strcmp(*argv, "disabled") == 0)
> + ttl_prop = 0;
> + else
> + invarg("\"ttl-propagate\" value is invalid\n",
> + *argv);
> +
matches() instead of strcmp() is more user friendly. 'enabled' is a lot
to type. ;-)
Powered by blists - more mailing lists