]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/link_gre.c
libnetlink: add size argument to rtnl_talk
[mirror_iproute2.git] / ip / link_gre.c
index 1d78387683ad362a0572bd2ac14983138efdbb63..58f416ca9720bc7bbc0ae661329f7473189f9f3c 100644 (file)
@@ -53,7 +53,7 @@ static int gre_parse_opt(struct link_util *lu, int argc, char **argv,
        struct {
                struct nlmsghdr n;
                struct ifinfomsg i;
-               char buf[1024];
+               char buf[16384];
        } req;
        struct ifinfomsg *ifi = (struct ifinfomsg *)(n + 1);
        struct rtattr *tb[IFLA_MAX + 1];
@@ -84,7 +84,7 @@ static int gre_parse_opt(struct link_util *lu, int argc, char **argv,
                req.i.ifi_family = preferred_family;
                req.i.ifi_index = ifi->ifi_index;
 
-               if (rtnl_talk(&rth, &req.n, 0, 0, &req.n) < 0) {
+               if (rtnl_talk(&rth, &req.n, &req.n, sizeof(req)) < 0) {
 get_failed:
                        fprintf(stderr,
                                "Failed to get existing tunnel info.\n");