Commit 8b21cef1 authored by Roopa Prabhu's avatar Roopa Prabhu Committed by Stephen Hemminger

ip route get: change exit to return to support batch commands

replace exit with return -2 on rtnl_talk failure
Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
parent 4d45bf3b
......@@ -1643,7 +1643,7 @@ static int iproute_get(int argc, char **argv)
req.r.rtm_family = AF_INET;
if (rtnl_talk(&rth, &req.n, &req.n, sizeof(req)) < 0)
exit(2);
return -2;
if (connected && !from_ok) {
struct rtmsg *r = NLMSG_DATA(&req.n);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment