linux-uconsole/net/core
Michal Schmidt fb0d10bff9 rtnetlink: fix userspace API breakage for iproute2 < v3.9.0
[ Upstream commit e5eca6d41f ]

When running RHEL6 userspace on a current upstream kernel, "ip link"
fails to show VF information.

The reason is a kernel<->userspace API change introduced by commit
88c5b5ce5c ("rtnetlink: Call nlmsg_parse() with correct header length"),
after which the kernel does not see iproute2's IFLA_EXT_MASK attribute
in the netlink request.

iproute2 adjusted for the API change in its commit 63338dca4513
("libnetlink: Use ifinfomsg instead of rtgenmsg in rtnl_wilddump_req_filter").

The problem has been noticed before:
http://marc.info/?l=linux-netdev&m=136692296022182&w=2
(Subject: Re: getting VF link info seems to be broken in 3.9-rc8)

We can do better than tell those with old userspace to upgrade. We can
recognize the old iproute2 in the kernel by checking the netlink message
length. Even when including the IFLA_EXT_MASK attribute, its netlink
message is shorter than struct ifinfomsg.

With this patch "ip link" shows VF information in both old and new
iproute2 versions.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 15:12:38 -04:00
..
datagram.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-04-30 03:55:20 -04:00
dev.c net: force a list_del() in unregister_netdevice_many() 2014-06-26 15:12:38 -04:00
dev_addr_lists.c net/core: dev_mc_sync_multiple calls wrong helper 2013-05-31 16:56:56 -07:00
dev_ioctl.c net: fix kernel deadlock with interface rename and netdev name retrieval. 2013-06-26 13:42:54 -07:00
drop_monitor.c net: drop_monitor: fix the value of maxattr 2014-01-15 15:28:47 -08:00
dst.c net: add skb_dst_set_noref_force 2013-04-02 00:22:53 +02:00
ethtool.c vlan: restore ethtool ABI to control VLAN hardware acceleration 2013-06-17 17:09:35 -07:00
fib_rules.c net: fix 'ip rule' iif/oif device rename 2014-03-06 21:30:03 -08:00
filter.c filter: prevent nla extensions to peek beyond the end of the message 2014-05-30 21:52:15 -07:00
flow.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-04-01 13:36:50 -04:00
flow_dissector.c net: flow_dissector: fail on evil iph->ihl 2013-11-20 12:27:46 -08:00
gen_estimator.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
gen_stats.c gen_stats: Stop using NLA_PUT*(). 2012-04-02 04:33:44 -04:00
iovec.c net: rework recvmsg handler msg_name and msg_namelen logic 2013-12-08 07:29:25 -08:00
link_watch.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
Makefile net: move procfs code to net/core/net-procfs.c 2013-02-19 00:51:10 -05:00
neighbour.c neigh: recompute reachabletime before returning from neigh_periodic_work() 2014-03-23 21:38:10 -07:00
net-procfs.c net: Print functions in /proc/net/ptype without the offset. 2013-03-25 14:12:55 -04:00
net-sysfs.c rps_dev_flow_table_release(): no need to delay vfree() 2013-05-06 11:06:51 -04:00
net-sysfs.h
net-traces.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
net_namespace.c proc: Split the namespace stuff out into linux/proc_ns.h 2013-05-01 17:29:39 -04:00
netevent.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
netpoll.c netpoll: fix the skb check in pkt_is_ns 2014-04-14 06:42:17 -07:00
netprio_cgroup.c Revert "netprio_cgroup: make local table static" 2013-04-12 03:06:44 -04:00
pktgen.c {pktgen, xfrm} Update IPv4 header total len and checksum after tranformation 2013-12-08 07:29:26 -08:00
request_sock.c tcp: fix a panic on UP machines in reqsk_fastopen_remove 2013-01-14 18:10:05 -05:00
rtnetlink.c rtnetlink: fix userspace API breakage for iproute2 < v3.9.0 2014-06-26 15:12:38 -04:00
scm.c net: Check the correct namespace when spoofing pid over SCM_RIGHTS 2013-09-26 17:18:05 -07:00
secure_seq.c net: secure_seq: Fix warning when CONFIG_IPV6 and CONFIG_INET are not selected 2013-11-04 04:31:01 -08:00
skbuff.c net: core: don't account for udp header size when computing seglen 2014-05-30 21:52:14 -07:00
sock.c net: Add variants of capable for use on on sockets 2014-06-26 15:12:37 -04:00
sock_diag.c net: Move the permission check in sock_diag_put_filterinfo to packet_diag_dump 2014-06-26 15:12:37 -04:00
stream.c
sysctl_net_core.c net: check net.core.somaxconn sysctl values 2013-09-14 06:54:54 -07:00
timestamping.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
user_dma.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
utils.c net: core: let's use native isxdigit instead of custom 2013-03-27 12:48:32 -04:00