ip route: don't assume default route
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- ip/iproute.c | 3 +++ 1 file changed, 3 insertions(+)
ip/iproute.c +3 -0
@@ -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;
Signature · 1 line
1.8.5.5
Quoted 17 lines · On Tue, 2 Dec 2014 17:45:10 +0100 =?UTF-8?q?Pavel=20=C5=A0imerda?=…
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 <[email protected]>--- ip/iproute.c | 3 +++ 1 file changed, 3 insertions(+)ip/iproute.c +0
-0
ip/iproute.c static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) · line 983
Quoted 9 lines
ip/iproute.c +3
-0@@ -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;
Good catch. Applied