diff options
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index a51cab95ba64..220c56e93659 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -4948,7 +4948,7 @@ static int rtnl_valid_stats_req(const struct nlmsghdr *nlh, bool strict_check, | |||
4948 | { | 4948 | { |
4949 | struct if_stats_msg *ifsm; | 4949 | struct if_stats_msg *ifsm; |
4950 | 4950 | ||
4951 | if (nlh->nlmsg_len < sizeof(*ifsm)) { | 4951 | if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ifsm))) { |
4952 | NL_SET_ERR_MSG(extack, "Invalid header for stats dump"); | 4952 | NL_SET_ERR_MSG(extack, "Invalid header for stats dump"); |
4953 | return -EINVAL; | 4953 | return -EINVAL; |
4954 | } | 4954 | } |