aboutsummaryrefslogtreecommitdiffstats
path: root/ip/link_ip6tnl.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemming@brocade.com>2015-05-27 12:26:14 -0700
committerStephen Hemminger <shemming@brocade.com>2015-05-27 13:00:21 -0700
commitc079e121a73af5eb49e003b13607e8a690331df6 (patch)
tree2815b765d9f112cb473218680559315603781525 /ip/link_ip6tnl.c
parentbde5baa5476cd8d7d33afc42170dc984f3717e14 (diff)
downloadplatform_external_iproute2-c079e121a73af5eb49e003b13607e8a690331df6.tar.gz
platform_external_iproute2-c079e121a73af5eb49e003b13607e8a690331df6.tar.bz2
platform_external_iproute2-c079e121a73af5eb49e003b13607e8a690331df6.zip
libnetlink: add size argument to rtnl_talk
There have been several instances where response from kernel has overrun the stack buffer from the caller. Avoid future problems by passing a size argument. Also drop the unused peer and group arguments to rtnl_talk.
Diffstat (limited to 'ip/link_ip6tnl.c')
-rw-r--r--ip/link_ip6tnl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
index cf59a933..f771c75d 100644
--- a/ip/link_ip6tnl.c
+++ b/ip/link_ip6tnl.c
@@ -89,7 +89,7 @@ static int ip6tunnel_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");