On Fri, 12 Oct 2007 10:56:38 +0200
Andreas Henriksson <[EMAIL PROTECTED]> wrote:
> From: Alexander Wirt <[EMAIL PROTECTED]>
>
>
> Signed-off-by: Andreas Henriksson <[EMAIL PROTECTED]>
> ---
> 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 <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html