mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
ipv4: add ip_sock_set_pktinfo
Add a helper to directly set the IP_PKTINFO 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:
committed by
David S. Miller
parent
2de569bda2
commit
c1f9ec5776
@@ -616,9 +616,8 @@ static void svc_udp_init(struct svc_sock *svsk, struct svc_serv *serv)
|
||||
/* make sure we get destination address info */
|
||||
switch (svsk->sk_sk->sk_family) {
|
||||
case AF_INET:
|
||||
level = SOL_IP;
|
||||
optname = IP_PKTINFO;
|
||||
break;
|
||||
ip_sock_set_pktinfo(svsk->sk_sock->sk);
|
||||
return;
|
||||
case AF_INET6:
|
||||
level = SOL_IPV6;
|
||||
optname = IPV6_RECVPKTINFO;
|
||||
|
Reference in New Issue
Block a user