Skip to contentSkip to conversation

ip route: don't assume default route

PATCH In review =?UTF-8?q?Pavel=20=C5=A0imerda?= 2 participants 2 messages Dec 2, 2014 – Dec 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

---
 ip/iproute.c | 3 +++
 1 file changed, 3 insertions(+)
ip/iproute.c +3 -0
index d77b1e3..c171f29 100644
@@ -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
#1 lore raw
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

---
 ip/iproute.c | 3 +++
 1 file changed, 3 insertions(+)
ip/iproute.c +0 -0
index d77b1e3..c171f29 100644

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