mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ipv6: add ip6_sock_set_recvpktinfo
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
18d5ad6232
commit
7d7207c2d5
2 changed files with 9 additions and 8 deletions
|
@ -1262,4 +1262,11 @@ static inline int ip6_sock_set_addr_preferences(struct sock *sk, bool val)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline void ip6_sock_set_recvpktinfo(struct sock *sk)
|
||||
{
|
||||
lock_sock(sk);
|
||||
inet6_sk(sk)->rxopt.bits.rxinfo = true;
|
||||
release_sock(sk);
|
||||
}
|
||||
|
||||
#endif /* _NET_IPV6_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue