Message ID | 1430931483-28595-4-git-send-email-stephen@networkplumber.org |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
diff --git a/ip/iprule.c b/ip/iprule.c index 967969c..986a5bc 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -381,7 +381,7 @@ static int iprule_modify(int cmd, int argc, char **argv) req.r.rtm_table = RT_TABLE_MAIN; if (rtnl_talk(&rth, &req.n, 0, 0, NULL) < 0) - return 2; + return -2; return 0; }
From: Stephen Hemminger <shemming@brocade.com> If ip rule command fails talking to kernel, exit code should be 2. The sub-command is called by cmd loop and the exit code is negative of return value from the command callback. --- ip/iprule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)