|
|
049c96 |
From daba15cd1437d136cfd3f09bd42d7c79ffa3d517 Mon Sep 17 00:00:00 2001
|
|
|
049c96 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
049c96 |
Date: Thu, 18 Feb 2016 14:05:52 +0100
|
|
|
049c96 |
Subject: [PATCH] ip: return correct exit code on route failure
|
|
|
049c96 |
|
|
|
049c96 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1288042
|
|
|
049c96 |
Upstream Status: iproute2.git commit d58ba4ba2a532
|
|
|
049c96 |
|
|
|
049c96 |
commit d58ba4ba2a532f3ebfa640c42ec2622b54740cdf
|
|
|
049c96 |
Author: Stephen Hemminger <shemming@brocade.com>
|
|
|
049c96 |
Date: Wed May 6 09:48:06 2015 -0700
|
|
|
049c96 |
|
|
|
049c96 |
ip: return correct exit code on route failure
|
|
|
049c96 |
|
|
|
049c96 |
If kernel complains about ip route request, exit status should be
|
|
|
049c96 |
2 not 1.
|
|
|
049c96 |
|
|
|
049c96 |
This fixes regression introduced by:
|
|
|
049c96 |
commit 42ecedd4bae534fc688194a795eb4548c6530cda
|
|
|
049c96 |
Author: Roopa Prabhu <roopa@cumulusnetworks.com>
|
|
|
049c96 |
Date: Tue Mar 17 19:26:32 2015 -0700
|
|
|
049c96 |
|
|
|
049c96 |
fix ip -force -batch to continue on errors
|
|
|
049c96 |
---
|
|
|
049c96 |
ip/iproute.c | 2 +-
|
|
|
049c96 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/ip/iproute.c b/ip/iproute.c
|
|
|
049c96 |
index fbe5268..4f7cd9b 100644
|
|
|
049c96 |
--- a/ip/iproute.c
|
|
|
049c96 |
+++ b/ip/iproute.c
|
|
|
049c96 |
@@ -1030,7 +1030,7 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
|
|
|
049c96 |
req.r.rtm_family = AF_INET;
|
|
|
049c96 |
|
|
|
049c96 |
if (rtnl_talk(&rth, &req.n, 0, 0, NULL) < 0)
|
|
|
049c96 |
- return -1;
|
|
|
049c96 |
+ return -2;
|
|
|
049c96 |
|
|
|
049c96 |
return 0;
|
|
|
049c96 |
}
|
|
|
049c96 |
--
|
|
|
049c96 |
1.8.3.1
|
|
|
049c96 |
|