mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
netlink: Make nlmsg_find_attr take a const nlmsghdr*.
This will let us use it on a nlmsghdr stored inside a netlink_callback. Signed-off-by: Nelson Elhage <nelhage@ksplice.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1f1b9c9990
commit
6b8c92ba07
@ -384,7 +384,7 @@ static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen,
|
|||||||
*
|
*
|
||||||
* Returns the first attribute which matches the specified type.
|
* Returns the first attribute which matches the specified type.
|
||||||
*/
|
*/
|
||||||
static inline struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh,
|
static inline struct nlattr *nlmsg_find_attr(const struct nlmsghdr *nlh,
|
||||||
int hdrlen, int attrtype)
|
int hdrlen, int attrtype)
|
||||||
{
|
{
|
||||||
return nla_find(nlmsg_attrdata(nlh, hdrlen),
|
return nla_find(nlmsg_attrdata(nlh, hdrlen),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user