From bfc39db4ab381162c4be2d7e3de8d315d0445082 Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Thu, 18 Feb 2016 14:03:47 +0100
Subject: [PATCH] gre: raising the size of the buffer holding nl messages.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1288042
Upstream Status: iproute2.git commit bde5baa5476cd
commit bde5baa5476cd8d7d33afc42170dc984f3717e14
Author: Jetchko Jekov <jetchko.jekov@nokia.com>
Date: Thu May 21 16:32:24 2015 +0200
gre: raising the size of the buffer holding nl messages.
Now it matches the size for the answer defined in rtnl_talk()
and prevents stack corruption with answer > 1024 bytes.
---
ip/link_gre.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/link_gre.c b/ip/link_gre.c
index 83653d0..ddbd6cc 100644
--- a/ip/link_gre.c
+++ b/ip/link_gre.c
@@ -50,7 +50,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];
--
1.8.3.1