diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 45c54fb9ad03..6bc2f78a5ebb 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -1007,6 +1007,9 @@ static inline int rtnl_vfinfo_size(const struct net_device *dev, /* IFLA_VF_STATS_TX_DROPPED */ nla_total_size_64bit(sizeof(__u64))); } + if (dev->netdev_ops->ndo_get_vf_guid) + size += num_vfs * 2 * + nla_total_size(sizeof(struct ifla_vf_guid)); return size; } else return 0;