From 922b4822043726dedee2b8e5c3729f7b1e856139 Mon Sep 17 00:00:00 2001 From: Pavel Simerda Date: Tue, 2 Dec 2014 17:45:10 +0100 Subject: [PATCH] ip route: don't assume default route MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just print the help when "ip route del" is called without any other arguments. Resolves: * https://bugzilla.redhat.com/show_bug.cgi?id=997965 Signed-off-by: Pavel Šimerda --- ip/iproute.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ip/iproute.c b/ip/iproute.c index c9cf5d6a..32847c69 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -975,6 +975,9 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) argc--; argv++; } + if (!dst_ok) + usage(); + if (d || nhs_ok) { int idx;