]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netlink/af_netlink.c
[NETLINK]: Introduce nlmsg_hdr() helper
[net-next-2.6.git] / net / netlink / af_netlink.c
index 50dc5edb7752308f896c87976f5b64052cc9c451..04b72d3c1dea8607ff8ca8f1c957ec1ef8cd7670 100644 (file)
@@ -1471,7 +1471,7 @@ static int netlink_rcv_skb(struct sk_buff *skb, int (*cb)(struct sk_buff *,
        int err;
 
        while (skb->len >= nlmsg_total_size(0)) {
-               nlh = (struct nlmsghdr *) skb->data;
+               nlh = nlmsg_hdr(skb);
 
                if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len)
                        return 0;