Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Greg Greenway <ggreenway@apple.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] Add "show" subcommand to "ip fou"
Date: Wed, 1 Nov 2017 22:03:33 +0100	[thread overview]
Message-ID: <20171101220333.5f73760f@shemminger-XPS-13-9360> (raw)
In-Reply-To: <BC879902-DED4-4AFC-B2AA-8C4F4C4B4C99@apple.com>

On Tue, 31 Oct 2017 13:00:47 -0700
Greg Greenway <ggreenway@apple.com> wrote:

> +	if (tb[FOU_ATTR_AF]) {
> +		family = rta_getattr_u8(tb[FOU_ATTR_AF]);
> +		if (family == AF_INET)
> +			family_str = "AF_INET";
> +		else if (family == AF_INET6)
> +			family_str = "AF_INET6";
> +		else
> +			family_str = "unknown";
> +		fprintf(fp, "af %s ", family_str);

The unwritten rule for ip commands is that the show function
must format the output with same command syntax as the other commands set/add/delete.
Since there is no "af AF_INET" option to ip fou, this breaks that convention.
Either ignore the address family, change the add command, or output with same
syntax (-6); preferably the latter.

  reply	other threads:[~2017-11-01 21:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 20:00 [PATCH iproute2] Add "show" subcommand to "ip fou" Greg Greenway
2017-11-01 21:03 ` Stephen Hemminger [this message]
2017-11-03 17:19   ` Greg Greenway
2017-11-03 17:25     ` Tom Herbert
2017-11-16 20:59       ` Greg Greenway
2017-11-17  0:35     ` Stephen Hemminger

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=20171101220333.5f73760f@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=ggreenway@apple.com \
    --cc=netdev@vger.kernel.org \
    /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