mirror_iproute2/ip
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 Another .gitignore file. 2006-08-08 12:11:23 -07:00
ifcfg ifcfg: Quote left-hand side of [ ] expression 2017-08-18 09:11:00 -07:00
ip6tunnel.c Check user supplied interface name lengths 2017-10-02 08:01:21 -07:00
ip_common.h json: move json printer to common library 2017-09-22 10:06:43 -07:00
ip.c ip: add new command line argument -json (mutually exclusive with -color) 2017-08-17 18:02:40 -07:00
ipaddress.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipaddrlabel.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipfou.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipila.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipl2tp.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
iplink_bond_slave.c ip: iplink_bond_slave.c: add json output support (info_slave_data) 2017-08-17 18:02:40 -07:00
iplink_bond.c ip: iplink_bond.c: add json output support 2017-08-17 18:02:40 -07:00
iplink_bridge_slave.c ip: bridge_slave: add neigh_suppress to the type help and 2017-10-23 14:46:24 +02:00
iplink_bridge.c ip: iplink_bridge.c: add json output support 2017-08-17 18:02:40 -07:00
iplink_can.c Merge branch 'master' into net-next 2017-08-21 17:37:15 -07:00
iplink_dummy.c ip: link: Add missing link type help texts 2017-04-04 14:51:29 -07:00
iplink_geneve.c ip: iplink_geneve.c: add json output support 2017-08-17 18:02:41 -07:00
iplink_hsr.c ip: iplink_hsr.c: add json output support 2017-08-17 18:02:40 -07:00
iplink_ifb.c ip: link: Add missing link type help texts 2017-04-04 14:51:29 -07:00
iplink_ipoib.c ip: iplink_ipoib.c: add json output support 2017-08-17 18:02:41 -07:00
iplink_ipvlan.c ip: iplink_ipvlan.c: add json output support 2017-08-17 18:02:41 -07:00
iplink_macvlan.c ip: link_macvlan.c: add json output support 2017-08-17 18:02:41 -07:00
iplink_nlmon.c ip: link: Add missing link type help texts 2017-04-04 14:51:29 -07:00
iplink_team.c ip: link: Add missing link type help texts 2017-04-04 14:51:29 -07:00
iplink_vcan.c ip: link: Add missing link type help texts 2017-04-04 14:51:29 -07:00
iplink_vlan.c ip: iplink_vlan.c: add json output support 2017-08-17 18:02:41 -07:00
iplink_vrf.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
iplink_vxcan.c ip: link add vxcan support 2017-06-05 12:27:32 -07:00
iplink_vxlan.c ip: iplink_vxlan.c: add json output support 2017-08-17 18:02:41 -07:00
iplink_xdp.c bpf: properly output json for xdp 2017-09-22 10:07:15 -07:00
iplink_xstats.c add missing iplink_xstats.c 2017-02-20 08:53:40 -08:00
iplink.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipmacsec.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipmaddr.c ip maddr: fix filtering by device 2017-10-21 15:02:24 +02:00
ipmonitor.c ip: Add support for MPLS netconf 2017-02-23 08:58:40 -08:00
ipmroute.c ip: mroute: Print offload indication 2017-10-11 10:54:27 -07:00
ipneigh.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipnetconf.c ip netconf: show all families on dev request 2017-04-14 16:00:15 -07:00
ipnetns.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipntable.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipprefix.c netlink route attribute cleanup 2017-02-24 08:56:38 -08:00
iproute_lwtunnel.c Merge branch 'master' into net-next 2017-09-01 12:17:48 -07:00
iproute_lwtunnel.h lwtunnel: Add encapsulation support to ip route 2015-10-16 16:13:22 -07:00
iproute.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
iprule.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
ipseg6.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
iptoken.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
iptunnel.c Check user supplied interface name lengths 2017-10-02 08:01:21 -07:00
iptuntap.c Check user supplied interface name lengths 2017-10-02 08:01:21 -07:00
ipvrf.c Convert harmful calls to strncpy() to strlcpy() 2017-09-01 12:10:54 -07:00
ipxfrm.c ipxfrm: Replace STRBUF_CAT macro with strlcat() 2017-09-01 12:10:54 -07:00
link_gre6.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
link_gre.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
link_ip6tnl.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
link_iptnl.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
link_veth.c ip: code cleanup 2016-03-21 11:52:19 -07:00
link_vti6.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
link_vti.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
Makefile json: move json printer to common library 2017-09-22 10:06:43 -07:00
routef ip/routef lifesaver 2007-07-10 18:29:20 -07:00
routel routel: fix infinite loop in line parser 2017-04-27 16:42:29 -07:00
rtm_map.c ip, realms: also allow to pass in raw realms value 2015-10-22 23:40:51 -07:00
rtmon.c ip: code cleanup 2016-03-21 11:52:19 -07:00
rtpr (Logical change 1.3) 2004-04-15 20:56:59 +00:00
static-syms.c Fix build when shared libraries are disabled 2013-03-13 08:29:59 -07:00
tcp_metrics.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
tunnel.c iptunnel: add support for mpls/ip to sit tunnels 2017-07-05 09:04:59 -07:00
tunnel.h ip{,6}tunnel: have a shared stats parser/printer 2015-12-18 11:46:21 -08:00
xdp.h bpf: consolidate dumps to use bpf_dump_prog_info 2017-09-05 09:26:34 -07:00
xfrm_monitor.c netlink route attribute cleanup 2017-02-24 08:56:38 -08:00
xfrm_policy.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
xfrm_state.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
xfrm.h xfrm: get #define's from linux includes 2017-06-14 10:25:39 -07:00