summaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-17 08:23:20 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-20 03:16:40 +0200
commit77d4df41d53e5c2af14db26f20fe50da52e382ba (patch)
tree9766dd0cf5f7f14b96d65cb86e8138aaad104b50 /net/netfilter
parentnetfilter/ebtables: clean up compat {get, set}sockopt handling (diff)
downloadlinux-77d4df41d53e5c2af14db26f20fe50da52e382ba.tar.xz
linux-77d4df41d53e5c2af14db26f20fe50da52e382ba.zip
netfilter: remove the compat_{get,set} methods
All instances handle compat sockopts via in_compat_syscall() now, so remove the compat_{get,set} methods as well as the compat_nf_{get,set}sockopt wrappers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_sockopt.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c
index 46cb3786e0ec..02870993d335 100644
--- a/net/netfilter/nf_sockopt.c
+++ b/net/netfilter/nf_sockopt.c
@@ -122,45 +122,3 @@ int nf_getsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt,
return nf_sockopt(sk, pf, val, opt, len, 1);
}
EXPORT_SYMBOL(nf_getsockopt);
-
-#ifdef CONFIG_COMPAT
-static int compat_nf_sockopt(struct sock *sk, u_int8_t pf, int val,
- char __user *opt, int *len, int get)
-{
- struct nf_sockopt_ops *ops;
- int ret;
-
- ops = nf_sockopt_find(sk, pf, val, get);
- if (IS_ERR(ops))
- return PTR_ERR(ops);
-
- if (get) {
- if (ops->compat_get)
- ret = ops->compat_get(sk, val, opt, len);
- else
- ret = ops->get(sk, val, opt, len);
- } else {
- if (ops->compat_set)
- ret = ops->compat_set(sk, val, opt, *len);
- else
- ret = ops->set(sk, val, opt, *len);
- }
-
- module_put(ops->owner);
- return ret;
-}
-
-int compat_nf_setsockopt(struct sock *sk, u_int8_t pf,
- int val, char __user *opt, unsigned int len)
-{
- return compat_nf_sockopt(sk, pf, val, opt, &len, 0);
-}
-EXPORT_SYMBOL(compat_nf_setsockopt);
-
-int compat_nf_getsockopt(struct sock *sk, u_int8_t pf,
- int val, char __user *opt, int *len)
-{
- return compat_nf_sockopt(sk, pf, val, opt, len, 1);
-}
-EXPORT_SYMBOL(compat_nf_getsockopt);
-#endif