mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-12-26 22:38:24 +00:00
ip: fix exit code for rule failures
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.
This commit is contained in:
parent
d58ba4ba2a
commit
076ae7089a
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user