diff options
Diffstat (limited to 'pimd/mtracebis_netlink.c')
| -rw-r--r-- | pimd/mtracebis_netlink.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pimd/mtracebis_netlink.c b/pimd/mtracebis_netlink.c index b4bf6bada3..47b5f7e52c 100644 --- a/pimd/mtracebis_netlink.c +++ b/pimd/mtracebis_netlink.c @@ -10,6 +10,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef __linux__ #include <stdio.h> @@ -239,7 +243,7 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth, break; /* process next filter */ } if (h->nlmsg_type == NLMSG_ERROR) { - struct nlmsgerr *err = + struct nlmsgerr *merr = (struct nlmsgerr *)NLMSG_DATA( h); if (h->nlmsg_len @@ -248,7 +252,7 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth, fprintf(stderr, "ERROR truncated\n"); } else { - errno = -err->error; + errno = -merr->error; perror("RTNETLINK answers"); } return -1; @@ -375,12 +379,12 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, } if (h->nlmsg_type == NLMSG_ERROR) { - struct nlmsgerr *err = + struct nlmsgerr *merr = (struct nlmsgerr *)NLMSG_DATA(h); if (l < (int)sizeof(struct nlmsgerr)) { fprintf(stderr, "ERROR truncated\n"); } else { - errno = -err->error; + errno = -merr->error; if (errno == 0) { if (answer) memcpy(answer, h, |
