From 3bbfb58bec18990a2ee93f31ea1ee2fd19c4d9b2 Mon Sep 17 00:00:00 2001
From: Christian Hornung <chhornung@googlemail.com>
Date: Wed, 3 Nov 2010 14:08:00 +0100
Subject: ip: Fix command line option parsing of "ip route get ..."

I found and fixed a bug in the command line options parsing of "ip route get":
It was impossible to get any option other than the IP address
recognized correctly, and e.g. the command "ip route get connected"
just hung up infinitely in the options parsing loop instead of
printing an error message.

Signed-off-by: Christian Hornung <chhornung@googlemail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
 networking/libiproute/iproute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index f66774afe..f6071b463 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -788,8 +788,8 @@ static int iproute_get(char **argv)
 				}
 				req.r.rtm_dst_len = addr.bitlen;
 			}
-			argv++;
 		}
+		argv++;
 	}
 
 	if (req.r.rtm_dst_len == 0) {
-- 
cgit v1.2.3