X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fnetfilter%2Fnf_sockopt.c;h=8b8ece750313b5a401741564c57c4eb3b775b552;hb=cb276805803b8e0616159d80a441ab26a931ada4;hp=c2e44e90e4374f0be18650a5e109fddb946d78a8;hpb=22a3e233ca08a2ddc949ba1ae8f6e16ec7ef1a13;p=linux-2.6 diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c index c2e44e90e4..8b8ece7503 100644 --- a/net/netfilter/nf_sockopt.c +++ b/net/netfilter/nf_sockopt.c @@ -32,13 +32,13 @@ int nf_register_sockopt(struct nf_sockopt_ops *reg) list_for_each(i, &nf_sockopts) { struct nf_sockopt_ops *ops = (struct nf_sockopt_ops *)i; if (ops->pf == reg->pf - && (overlap(ops->set_optmin, ops->set_optmax, + && (overlap(ops->set_optmin, ops->set_optmax, reg->set_optmin, reg->set_optmax) - || overlap(ops->get_optmin, ops->get_optmax, + || overlap(ops->get_optmin, ops->get_optmax, reg->get_optmin, reg->get_optmax))) { NFDEBUG("nf_sock overlap: %u-%u/%u-%u v %u-%u/%u-%u\n", - ops->set_optmin, ops->set_optmax, - ops->get_optmin, ops->get_optmax, + ops->set_optmin, ops->set_optmax, + ops->get_optmin, ops->get_optmax, reg->set_optmin, reg->set_optmax, reg->get_optmin, reg->get_optmax); ret = -EBUSY; @@ -73,7 +73,7 @@ void nf_unregister_sockopt(struct nf_sockopt_ops *reg) EXPORT_SYMBOL(nf_unregister_sockopt); /* Call get/setsockopt() */ -static int nf_sockopt(struct sock *sk, int pf, int val, +static int nf_sockopt(struct sock *sk, int pf, int val, char __user *opt, int *len, int get) { struct list_head *i; @@ -107,7 +107,7 @@ static int nf_sockopt(struct sock *sk, int pf, int val, } mutex_unlock(&nf_sockopt_mutex); return -ENOPROTOOPT; - + out: mutex_lock(&nf_sockopt_mutex); ops->use--;