summaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r--net/ipv4/inet_diag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 37362cd1d07f..238999e6e871 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -847,7 +847,7 @@ static inline void inet_diag_rcv_skb(struct sk_buff *skb)
{
if (skb->len >= NLMSG_SPACE(0)) {
int err;
- struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
+ struct nlmsghdr *nlh = nlmsg_hdr(skb);
if (nlh->nlmsg_len < sizeof(*nlh) ||
skb->len < nlh->nlmsg_len)