public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Daniel Borkmann <dborkman@redhat.com>
Cc: fw@strlen.de, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 -next] ip: route: add congestion control metric
Date: Tue, 6 Jan 2015 17:09:26 -0800	[thread overview]
Message-ID: <20150106170926.5bb2d816@urahara> (raw)
In-Reply-To: <1420588357-17665-1-git-send-email-dborkman@redhat.com>

On Wed,  7 Jan 2015 00:52:37 +0100
Daniel Borkmann <dborkman@redhat.com> wrote:

> +		} else if (matches(*argv, "congctl") == 0) {
> +			char cc[16];
> +			NEXT_ARG();
> +			memset(cc, 0, sizeof(cc));
> +			if (strcmp(*argv, "lock") == 0) {
> +				mxlock |= (1<<RTAX_CC_ALGO);

Unneeded paren

> +				NEXT_ARG();
> +			}
> +			strncpy(cc, *argv, sizeof(cc) - 1);
> +			if (strlen(cc) == 0)
> +				invarg("\"conctl\" value must be an algorithm name\n", *argv

Silently truncating the string is not odd. Can't we just let kernel impose
length restrictions.

  reply	other threads:[~2015-01-07  1:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06 23:52 [PATCH iproute2 -next] ip: route: add congestion control metric Daniel Borkmann
2015-01-07  1:09 ` Stephen Hemminger [this message]
2015-01-07 10:21   ` Daniel Borkmann
2015-01-07 10:22     ` Vadim Kochan

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=20150106170926.5bb2d816@urahara \
    --to=stephen@networkplumber.org \
    --cc=dborkman@redhat.com \
    --cc=fw@strlen.de \
    --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