ipv4: add ip_sock_set_freebind

Add a helper to directly set the IP_FREEBIND 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:
Christoph Hellwig
2020-05-28 07:12:27 +02:00
committed by David S. Miller
parent 6ebf71bab9
commit c4e446bf5a
3 changed files with 12 additions and 10 deletions

View File

@@ -765,6 +765,7 @@ static inline bool inetdev_valid_mtu(unsigned int mtu)
return likely(mtu >= IPV4_MIN_MTU);
}
void ip_sock_set_freebind(struct sock *sk);
void ip_sock_set_tos(struct sock *sk, int val);
#endif /* _IP_H */