diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-28 07:12:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-28 20:11:45 +0200 |
commit | c1f9ec5776dd05eaf62cf6788ecdfc905dc8ec2b (patch) | |
tree | a57b9eabde6a05a80239467f15256f64fe184148 /net/sunrpc | |
parent | ipv4: add ip_sock_set_mtu_discover (diff) | |
download | linux-c1f9ec5776dd05eaf62cf6788ecdfc905dc8ec2b.tar.xz linux-c1f9ec5776dd05eaf62cf6788ecdfc905dc8ec2b.zip |
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>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/svcsock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 6773dacc64d8..7a805d165689 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -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; |