summaryrefslogtreecommitdiff
path: root/zebra/kernel_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/kernel_netlink.c')
-rw-r--r--zebra/kernel_netlink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 97b0238362..a1f7014ce9 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -1061,10 +1061,11 @@ int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
/* Issue request message to kernel via netlink socket. GET messages
* are issued through this interface.
*/
-int netlink_request(struct nlsock *nl, struct nlmsghdr *n)
+int netlink_request(struct nlsock *nl, void *req)
{
int ret;
struct sockaddr_nl snl;
+ struct nlmsghdr *n = (struct nlmsghdr *)req;
/* Check netlink socket. */
if (nl->sock < 0) {
@@ -1082,7 +1083,7 @@ int netlink_request(struct nlsock *nl, struct nlmsghdr *n)
/* Raise capabilities and send message, then lower capabilities. */
frr_with_privs(&zserv_privs) {
- ret = sendto(nl->sock, (void *)n, n->nlmsg_len, 0,
+ ret = sendto(nl->sock, req, n->nlmsg_len, 0,
(struct sockaddr *)&snl, sizeof(snl));
}