[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071012100743.0c1a11f8@freepuppy.rosehill>
Date: Fri, 12 Oct 2007 10:07:43 -0700
From: Stephen Hemminger <shemminger@...ux-foundation.org>
To: Andreas Henriksson <andreas@...al.se>
Cc: netdev@...r.kernel.org, Alexander Wirt <formorer@...ian.org>,
Andreas Henriksson <andreas@...al.se>
Subject: Re: [PATCH 03/12] Prevent renaming interfaces to empty string.
On Fri, 12 Oct 2007 10:56:38 +0200
Andreas Henriksson <andreas@...al.se> wrote:
> From: Alexander Wirt <formorer@...ian.org>
>
>
> Signed-off-by: Andreas Henriksson <andreas@...al.se>
> ---
> ip/iplink.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/ip/iplink.c b/ip/iplink.c
> index 4060845..da1f64e 100644
> --- a/ip/iplink.c
> +++ b/ip/iplink.c
> @@ -670,6 +670,10 @@ static int do_set(int argc, char **argv)
> }
>
> if (newname && strcmp(dev, newname)) {
> + if (strlen(newname) == 0) {
> + printf("\"\" is not valid device identifier\n");
> + return -1;
> + }
> if (do_changename(dev, newname) < 0)
> return -1;
> dev = newname;
The kernel should already be preventing this?
--
Stephen Hemminger <shemminger@...ux-foundation.org>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists