Commit 7e30942b authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Errno handling in kernel.

parent 1c152a25
......@@ -575,12 +575,14 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
if(nl_command.sock < 0) {
rc = netlink_socket(&nl_command, 0);
if(rc < 0) {
int olderrno = errno;
perror("kernel_route: netlink_socket()");
errno = olderrno;
return -1;
}
}
if(operation == ROUTE_MODIFY) {
if(operation == ROUTE_MODIFY) {
if(newmetric == metric && memcmp(newgate, gate, 16) == 0 &&
newifindex == ifindex)
return 0;
......
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