[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1192179407-22461-3-git-send-email-andreas@fatal.se>
Date: Fri, 12 Oct 2007 10:56:38 +0200
From: Andreas Henriksson <andreas@...al.se>
To: shemminger@...ux-foundation.org
Cc: netdev@...r.kernel.org, Alexander Wirt <formorer@...ian.org>,
Andreas Henriksson <andreas@...al.se>
Subject: [PATCH 03/12] Prevent renaming interfaces to empty string.
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;
--
1.5.3.4
-
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