From: Pavel Simerda Date: Tue, 2 Dec 2014 16:45:10 +0000 (+0100) Subject: ip route: don't assume default route X-Git-Tag: v3.18.0~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=922b4822043726dedee2b8e5c3729f7b1e856139;p=thirdparty%2Fiproute2.git ip route: don't assume default route 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 --- diff --git a/ip/iproute.c b/ip/iproute.c index c9cf5d6ab..32847c696 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;