iproute2/ip
Gal Pressman 39315157ab ipaddress: Make sure VF min/max rate API is supported before using it
When using the new minimum rate API and providing only one parameter
(minimum rate/maximum rate), we query the VF min and max rate regardless
of kernel support.
This resulted in segmentation fault in ipaddr_loop_each_vf, which tries
to access NULL pointer.

This patch identifies such cases by testing the VF table for NULL
pointer in IFLA_VF_RATE, and aborts the operation.
Aborting on the first VF is valid since if the kernel does not support
the new API for the first VF, it will not support it for the other VFs
as well.

Fixes: f89a2a05ff ("Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool")
Cc: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Gal Pressman <galp@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
2018-01-17 10:44:42 -08:00
..
.gitignore Another .gitignore file. 2006-08-08 12:11:23 -07:00
Makefile SPDX license identifiers 2017-11-24 12:21:35 -08:00
ifcfg ifcfg/rtpr: convert to POSIX shell 2018-01-10 08:26:09 -08:00
ila_common.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
ip.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
ip6tunnel.c ip/tunnel: Use get_addr() instead of get_prefix() for local/remote endpoints 2017-12-16 10:08:54 -08:00
ip_common.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
ipaddress.c ipaddress: Make sure VF min/max rate API is supported before using it 2018-01-17 10:44:42 -08:00
ipaddrlabel.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
ipfou.c ip fou: pass family attribute as u8 2018-01-09 07:58:37 -08:00
ipila.c ila: fix formatting of help message 2017-11-24 09:21:43 -08:00
ipl2tp.c lib/libnetlink: update rtnl_talk to support malloc buff at run time 2017-10-26 12:29:29 +02:00
iplink.c iplink: Validate minimum tx rate is less than maximum tx rate 2018-01-17 10:44:42 -08:00
iplink_bond.c ip: iplink_bond.c: add json output support 2017-08-17 18:02:40 -07: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_bridge.c ip: iplink_bridge.c: add json output support 2017-08-17 18:02:40 -07:00
iplink_bridge_slave.c iplink: bridge: support bridge port vlan_tunnel attribute 2017-10-31 18:04:30 +01:00
iplink_can.c Merge branch 'master' into net-next 2017-08-21 17:37:15 -07:00
iplink_dummy.c SPDX license identifiers 2017-11-24 12:21:35 -08: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 SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_ipoib.c ip: iplink_ipoib.c: add json output support 2017-08-17 18:02:41 -07:00
iplink_ipvlan.c ip/ipvlan: enhance ability to add mode flags to existing modes 2017-11-01 22:17:01 +01:00
iplink_macvlan.c ip: link_macvlan.c: add json output support 2017-08-17 18:02:41 -07:00
iplink_nlmon.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_team.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_vcan.c SPDX license identifiers 2017-11-24 12:21:35 -08: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 vxcan,veth: Forbid "type" for peer device 2017-12-28 09:35:27 -08:00
iplink_vxlan.c vxlan: Make id optional when modifying a link 2017-11-28 09:48:26 -08:00
iplink_xdp.c iplink: communicate ifindex for xdp offload 2017-11-26 11:57:58 -08:00
iplink_xstats.c add missing iplink_xstats.c 2017-02-20 08:53:40 -08: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 drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
ipmonitor.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
ipmroute.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
ipneigh.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
ipnetconf.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
ipnetns.c SPDX license identifiers 2017-11-24 12:21:35 -08: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.c iproute: "list/flush/save default" selected all of the routes 2017-12-19 08:23:09 -08:00
iproute_lwtunnel.c bpf: rename bpf_parse_common() to bpf_parse_and_load_common() 2017-11-26 11:57:57 -08:00
iproute_lwtunnel.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
iprule.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08: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 drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
iptunnel.c ip/tunnel: Unify setup and accept zero address for local/remote endpoints 2017-12-16 10:08:54 -08:00
iptuntap.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08: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_gre.c ip/tunnel: Document "external" parameter 2017-12-28 09:40:02 -08:00
link_gre6.c gre6/tunnel: Output flowlabel after tclass 2018-01-10 08:06:12 -08:00
link_ip6tnl.c ip6tnl/tunnel: Output hoplimit before encapsulation limit 2018-01-10 08:06:12 -08:00
link_iptnl.c link_iptnl: Open "encap" JSON object 2018-01-05 16:35:47 -08:00
link_veth.c vxcan,veth: Forbid "type" for peer device 2017-12-28 09:35:27 -08:00
link_vti.c ip/tunnel: No need to free answer after rtnl_talk() on error 2017-12-26 09:07:43 -08:00
link_vti6.c ip/tunnel: No need to free answer after rtnl_talk() on error 2017-12-26 09:07:43 -08:00
routef mark shell scripts +x 2018-01-10 08:23:49 -08:00
routel mark shell scripts +x 2018-01-10 08:23:49 -08:00
rtm_map.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
rtmon.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
rtpr ifcfg/rtpr: convert to POSIX shell 2018-01-10 08:26:09 -08:00
static-syms.c SPDX license identifiers 2017-11-24 12:21:35 -08: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 ip/tunnel: Use tnl_parse_key() to parse tunnel key 2017-12-19 08:14:01 -08:00
tunnel.h ip{,6}tunnel: have a shared stats parser/printer 2015-12-18 11:46:21 -08:00
xdp.h iplink: communicate ifindex for xdp offload 2017-11-26 11:57:58 -08:00
xfrm.h ip: Fix compilation break on old systems 2017-11-13 10:07:25 -08:00
xfrm_monitor.c netlink route attribute cleanup 2017-02-24 08:56:38 -08:00
xfrm_policy.c Merge branch 'master' into net-next 2017-11-09 09:45:17 +09:00
xfrm_state.c Merge branch 'master' into net-next 2017-11-09 09:45:17 +09:00