]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/ipaddress.c
libnetlink: add size argument to rtnl_talk
[mirror_iproute2.git] / ip / ipaddress.c
index 92afa4904917928fc0d4061dc5646527d3892af8..340e1c9aca9ff96c658134b0591a994a4dd906c5 100644 (file)
@@ -1136,7 +1136,7 @@ static int restore_handler(const struct sockaddr_nl *nl, struct nlmsghdr *n, voi
 
        ll_init_map(&rth);
 
-       ret = rtnl_talk(&rth, n, 0, 0, n);
+       ret = rtnl_talk(&rth, n, n, sizeof(*n));
        if ((ret < 0) && (errno == EEXIST))
                ret = 0;
 
@@ -1800,7 +1800,7 @@ static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
                return -1;
        }
 
-       if (rtnl_talk(&rth, &req.n, 0, 0, NULL) < 0)
+       if (rtnl_talk(&rth, &req.n, NULL, 0) < 0)
                return -2;
 
        return 0;