mirror_iproute2/genl
Hangbin Liu 86bf43c7c2 lib/libnetlink: update rtnl_talk to support malloc buff at run time
This is an update for 460c03f3f3 ("iplink: double the buffer size also in
iplink_get()"). After update, we will not need to double the buffer size
every time when VFs number increased.

With call like rtnl_talk(&rth, &req.n, NULL, 0), we can simply remove the
length parameter.

With call like rtnl_talk(&rth, nlh, nlh, sizeof(req), I add a new variable
answer to avoid overwrite data in nlh, because it may has more info after
nlh. also this will avoid nlh buffer not enough issue.

We need to free answer after using.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-10-26 12:29:29 +02:00
..
.gitignore Add ignore file for new genl 2006-08-08 12:14:09 -07:00
ctrl.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
genl_utils.h make muticast group to bitmask conversion generic 2006-12-13 17:04:26 -08:00
genl.c Replace malloc && memset by calloc 2016-07-20 12:05:24 -07:00
Makefile config: put CFLAGS/LDLIBS in config.mk 2017-08-23 10:03:09 -07:00
static-syms.c Fix build when shared libraries are disabled 2013-03-13 08:29:59 -07:00