]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip route: don't assume default route
authorPavel Simerda <psimerda@redhat.com>
Tue, 2 Dec 2014 16:45:10 +0000 (17:45 +0100)
committerStephen Hemminger <shemming@brocade.com>
Wed, 3 Dec 2014 17:16:07 +0000 (09:16 -0800)
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 <psimerda@redhat.com>
ip/iproute.c

index c9cf5d6ab20b702ec641d45d3c3a87a77d0b972a..32847c696a320345e68a87fab37467333e9c5bf8 100644 (file)
@@ -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;