svn commit: r257498 - in head/sys: kern sys
Gleb Smirnoff
glebius at FreeBSD.org
Fri Nov 1 10:01:58 UTC 2013
Author: glebius
Date: Fri Nov 1 10:01:57 2013
New Revision: 257498
URL: http://svnweb.freebsd.org/changeset/base/257498
Log:
prison_check_ip4() can take const arguments.
Modified:
head/sys/kern/kern_jail.c
head/sys/sys/jail.h
Modified: head/sys/kern/kern_jail.c
==============================================================================
--- head/sys/kern/kern_jail.c Fri Nov 1 07:03:44 2013 (r257497)
+++ head/sys/kern/kern_jail.c Fri Nov 1 10:01:57 2013 (r257498)
@@ -135,7 +135,7 @@ static void prison_racct_modify(struct p
static void prison_racct_detach(struct prison *pr);
#endif
#ifdef INET
-static int _prison_check_ip4(struct prison *pr, struct in_addr *ia);
+static int _prison_check_ip4(const struct prison *, const struct in_addr *);
static int prison_restrict_ip4(struct prison *pr, struct in_addr *newip4);
#endif
#ifdef INET6
@@ -2930,7 +2930,7 @@ prison_remote_ip4(struct ucred *cred, st
* doesn't allow IPv4. Address passed in in NBO.
*/
static int
-_prison_check_ip4(struct prison *pr, struct in_addr *ia)
+_prison_check_ip4(const struct prison *pr, const struct in_addr *ia)
{
int i, a, z, d;
@@ -2960,7 +2960,7 @@ _prison_check_ip4(struct prison *pr, str
}
int
-prison_check_ip4(struct ucred *cred, struct in_addr *ia)
+prison_check_ip4(const struct ucred *cred, const struct in_addr *ia)
{
struct prison *pr;
int error;
Modified: head/sys/sys/jail.h
==============================================================================
--- head/sys/sys/jail.h Fri Nov 1 07:03:44 2013 (r257497)
+++ head/sys/sys/jail.h Fri Nov 1 10:01:57 2013 (r257498)
@@ -384,7 +384,7 @@ int prison_equal_ip4(struct prison *, st
int prison_get_ip4(struct ucred *cred, struct in_addr *ia);
int prison_local_ip4(struct ucred *cred, struct in_addr *ia);
int prison_remote_ip4(struct ucred *cred, struct in_addr *ia);
-int prison_check_ip4(struct ucred *cred, struct in_addr *ia);
+int prison_check_ip4(const struct ucred *, const struct in_addr *);
int prison_saddrsel_ip4(struct ucred *, struct in_addr *);
#ifdef INET6
int prison_equal_ip6(struct prison *, struct prison *);
More information about the svn-src-head
mailing list