Message ID | 20141202164510.GA9005@mole.pavlix.net |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
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 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;
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(+)