extern int netlink_transaction(struct nl_handler *handler,
struct nlmsg *request, struct nlmsg *answer)
{
-
int ret;
ret = netlink_send(handler, request);
if (answer->nlmsghdr.nlmsg_type == NLMSG_ERROR) {
struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(answer);
- errno = -err->error;
- if (errno)
- perror("Error configuring kernel");
- return -errno;
+ return err->error;
}
return 0;