Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Phil Sutter <phil@nwl.cc>
Cc: netdev@vger.kernel.org
Subject: Re: [iproute PATCH v2 0/3] Check user supplied interface name lengths
Date: Wed, 27 Sep 2017 08:42:49 +0100	[thread overview]
Message-ID: <20170927084249.0591ee3a@shemminger-XPS-13-9360> (raw)
In-Reply-To: <20170926163548.24347-1-phil@nwl.cc>

On Tue, 26 Sep 2017 18:35:45 +0200
Phil Sutter <phil@nwl.cc> wrote:

> This series adds explicit checks for user-supplied interface names to
> make sure their length fits Linux's requirements.
> 
> The first two patches simplify interface name parsing in some places -
> these are side-effects of working on the actual implementation provided
> in patch three.
> 
> Changes since v1:
> - Patches 1 and 2 introduced.
> - Changes to patch 3 are listed in there.
> 
> Phil Sutter (3):
>   ip{6,}tunnel: Avoid copying user-supplied interface name around
>   tc: flower: No need to cache indev arg
>   Check user supplied interface name lengths
> 
>  include/utils.h |  1 +
>  ip/ip6tunnel.c  |  9 +++++----
>  ip/ipl2tp.c     |  3 ++-
>  ip/iplink.c     | 27 ++++++++-------------------
>  ip/ipmaddr.c    |  1 +
>  ip/iprule.c     |  4 ++++
>  ip/iptunnel.c   | 27 +++++++++++++--------------
>  ip/iptuntap.c   |  4 +++-
>  lib/utils.c     | 10 ++++++++++
>  misc/arpd.c     |  1 +
>  tc/f_flower.c   |  6 ++----
>  11 files changed, 50 insertions(+), 43 deletions(-)
> 

I like the idea, and checking arguments is good.
Why not merge the check and copy and put in lib/utils.c

int get_ifname(char *name, const char *arg)
{
...

  parent reply	other threads:[~2017-09-27  7:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26 16:35 [iproute PATCH v2 0/3] Check user supplied interface name lengths Phil Sutter
2017-09-26 16:35 ` [iproute PATCH v2 1/3] ip{6,}tunnel: Avoid copying user-supplied interface name around Phil Sutter
2017-09-26 16:35 ` [iproute PATCH v2 2/3] tc: flower: No need to cache indev arg Phil Sutter
2017-09-26 16:35 ` [iproute PATCH v2 3/3] Check user supplied interface name lengths Phil Sutter
2017-09-27  7:42 ` Stephen Hemminger [this message]
2017-09-27 16:05   ` [iproute PATCH v2 0/3] " Phil Sutter
2017-09-29 17:31     ` Stephen Hemminger
2017-10-02 10:18       ` Phil Sutter

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=20170927084249.0591ee3a@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    /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