]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
gre: raising the size of the buffer holding nl messages.
authorJetchko Jekov <jetchko.jekov@nokia.com>
Thu, 21 May 2015 14:32:24 +0000 (16:32 +0200)
committerStephen Hemminger <shemming@brocade.com>
Wed, 27 May 2015 19:27:31 +0000 (12:27 -0700)
Now it matches the size for the answer defined in rtnl_talk()
and prevents stack corruption with answer > 1024 bytes.

ip/link_gre.c

index 1d78387683ad362a0572bd2ac14983138efdbb63..193726109ee6b0c74cf9a112c1b1940a43fcb123 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];