Blame SOURCES/0027-ip-fix-exit-code-for-rule-failures.patch
|
|
049c96 |
From edc209d4479b6b89aed9cb5b661002cf27031bea Mon Sep 17 00:00:00 2001
|
|
|
049c96 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
049c96 |
Date: Thu, 18 Feb 2016 14:05:58 +0100
|
|
|
049c96 |
Subject: [PATCH] ip: fix exit code for rule failures
|
|
|
049c96 |
|
|
|
049c96 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1288042
|
|
|
049c96 |
Upstream Status: iproute2.git commit 076ae7089a4b4
|
|
|
049c96 |
|
|
|
049c96 |
commit 076ae7089a4b4874a1aedd4c5f84bb889dcda34e
|
|
|
049c96 |
Author: Stephen Hemminger <shemming@brocade.com>
|
|
|
049c96 |
Date: Wed May 6 09:53:41 2015 -0700
|
|
|
049c96 |
|
|
|
049c96 |
ip: fix exit code for rule failures
|
|
|
049c96 |
|
|
|
049c96 |
If ip rule command fails talking to kernel, exit code should be 2.
|
|
|
049c96 |
The sub-command is called by cmd loop and the exit code is negative
|
|
|
049c96 |
of return value from the command callback.
|
|
|
049c96 |
---
|
|
|
049c96 |
ip/iprule.c | 2 +-
|
|
|
049c96 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/ip/iprule.c b/ip/iprule.c
|
|
|
049c96 |
index d80b125..eebcda2 100644
|
|
|
049c96 |
--- a/ip/iprule.c
|
|
|
049c96 |
+++ b/ip/iprule.c
|
|
|
049c96 |
@@ -355,7 +355,7 @@ static int iprule_modify(int cmd, int argc, char **argv)
|
|
|
049c96 |
req.r.rtm_table = RT_TABLE_MAIN;
|
|
|
049c96 |
|
|
|
049c96 |
if (rtnl_talk(&rth, &req.n, 0, 0, NULL) < 0)
|
|
|
049c96 |
- return 2;
|
|
|
049c96 |
+ return -2;
|
|
|
049c96 |
|
|
|
049c96 |
return 0;
|
|
|
049c96 |
}
|
|
|
049c96 |
--
|
|
|
049c96 |
1.8.3.1
|
|
|
049c96 |
|