]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - genl/ctrl.c
libnetlink: add size argument to rtnl_talk
[mirror_iproute2.git] / genl / ctrl.c
index 3546129087ece91332146e511bb6d16334775b9d..0bf4dc1ee0ba0f2dbf2ea9c7ca4e6772680306a2 100644 (file)
@@ -67,7 +67,7 @@ int genl_ctrl_resolve_family(const char *family)
 
        addattr_l(nlh, 128, CTRL_ATTR_FAMILY_NAME, family, strlen(family) + 1);
 
-       if (rtnl_talk(&rth, nlh, 0, 0, nlh) < 0) {
+       if (rtnl_talk(&rth, nlh, nlh, sizeof(req)) < 0) {
                fprintf(stderr, "Error talking to the kernel\n");
                goto errout;
        }
@@ -334,7 +334,7 @@ static int ctrl_list(int cmd, int argc, char **argv)
                        goto ctrl_done;
                }
 
-               if (rtnl_talk(&rth, nlh, 0, 0, nlh) < 0) {
+               if (rtnl_talk(&rth, nlh, nlh, sizeof(req)) < 0) {
                        fprintf(stderr, "Error talking to the kernel\n");
                        goto ctrl_done;
                }