* [PATCH iproute2] ip route: don't assume default route
@ 2014-12-02 16:45 =?UTF-8?q?Pavel=20=C5=A0imerda?=
2014-12-03 17:17 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= @ 2014-12-02 16:45 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger
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 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ip/iproute.c b/ip/iproute.c
index d77b1e3..c171f29 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;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH iproute2] ip route: don't assume default route
2014-12-02 16:45 [PATCH iproute2] ip route: don't assume default route =?UTF-8?q?Pavel=20=C5=A0imerda?=
@ 2014-12-03 17:17 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2014-12-03 17:17 UTC (permalink / raw)
To: Pavel Šimerda; +Cc: netdev
On Tue, 2 Dec 2014 17:45:10 +0100
=?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com> wrote:
> 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 | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/ip/iproute.c b/ip/iproute.c
> index d77b1e3..c171f29 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;
>
Good catch. Applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-03 17:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 16:45 [PATCH iproute2] ip route: don't assume default route =?UTF-8?q?Pavel=20=C5=A0imerda?=
2014-12-03 17:17 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).