From owner-svn-src-head@FreeBSD.ORG Sun Jan 25 10:11:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB528106564A; Sun, 25 Jan 2009 10:11:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C89B88FC14; Sun, 25 Jan 2009 10:11:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0PABw86012948; Sun, 25 Jan 2009 10:11:58 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0PABwxl012942; Sun, 25 Jan 2009 10:11:58 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901251011.n0PABwxl012942@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 25 Jan 2009 10:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187684 - in head/sys: kern net netinet netinet6 sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 10:11:59 -0000 Author: bz Date: Sun Jan 25 10:11:58 2009 New Revision: 187684 URL: http://svn.freebsd.org/changeset/base/187684 Log: For consistency with prison_{local,remote,check}_ipN rename prison_getipN to prison_get_ipN. Submitted by: jamie (as part of a larger patch) MFC after: 1 week Modified: head/sys/kern/kern_jail.c head/sys/net/rtsock.c head/sys/netinet/in_pcb.c head/sys/netinet/raw_ip.c head/sys/netinet6/raw_ip6.c head/sys/sys/jail.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Sun Jan 25 09:20:59 2009 (r187683) +++ head/sys/kern/kern_jail.c Sun Jan 25 10:11:58 2009 (r187684) @@ -812,7 +812,7 @@ prison_proc_free(struct prison *pr) * Returns 0 on success, 1 on error. Address returned in NBO. */ int -prison_getip4(struct ucred *cred, struct in_addr *ia) +prison_get_ip4(struct ucred *cred, struct in_addr *ia) { KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); @@ -958,7 +958,7 @@ prison_check_ip4(struct ucred *cred, str * Returns 0 on success, 1 on error. */ int -prison_getip6(struct ucred *cred, struct in6_addr *ia6) +prison_get_ip6(struct ucred *cred, struct in6_addr *ia6) { KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Jan 25 09:20:59 2009 (r187683) +++ head/sys/net/rtsock.c Sun Jan 25 10:11:58 2009 (r187684) @@ -376,7 +376,7 @@ rtm_get_jailed(struct rt_addrinfo *info, * 3. As a last resort return the 'default' * jail address. */ - if (prison_getip4(cred, &ia) != 0) + if (prison_get_ip4(cred, &ia) != 0) return (ESRCH); } bzero(&saun->sin, sizeof(struct sockaddr_in)); @@ -428,7 +428,7 @@ rtm_get_jailed(struct rt_addrinfo *info, * 3. As a last resort return the 'default' * jail address. */ - if (prison_getip6(cred, &ia6) != 0) + if (prison_get_ip6(cred, &ia6) != 0) return (ESRCH); } bzero(&saun->sin6, sizeof(struct sockaddr_in6)); Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Jan 25 09:20:59 2009 (r187683) +++ head/sys/netinet/in_pcb.c Sun Jan 25 10:11:58 2009 (r187684) @@ -625,7 +625,7 @@ in_pcbladdr(struct inpcb *inp, struct in } /* 3. As a last resort return the 'default' jail address. */ - if (prison_getip4(cred, laddr) != 0) + if (prison_get_ip4(cred, laddr) != 0) error = EADDRNOTAVAIL; goto done; } @@ -678,7 +678,7 @@ in_pcbladdr(struct inpcb *inp, struct in } /* 3. As a last resort return the 'default' jail address. */ - if (prison_getip4(cred, laddr) != 0) + if (prison_get_ip4(cred, laddr) != 0) error = EADDRNOTAVAIL; goto done; } @@ -741,7 +741,7 @@ in_pcbladdr(struct inpcb *inp, struct in } /* 3. As a last resort return the 'default' jail address. */ - if (prison_getip4(cred, laddr) != 0) + if (prison_get_ip4(cred, laddr) != 0) error = EADDRNOTAVAIL; goto done; } @@ -810,7 +810,7 @@ in_pcbconnect_setup(struct inpcb *inp, s */ if (faddr.s_addr == INADDR_ANY) { if (cred != NULL && jailed(cred)) { - if (prison_getip4(cred, &jailia) != 0) + if (prison_get_ip4(cred, &jailia) != 0) return (EADDRNOTAVAIL); faddr.s_addr = jailia.s_addr; } else { Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Sun Jan 25 09:20:59 2009 (r187683) +++ head/sys/netinet/raw_ip.c Sun Jan 25 10:11:58 2009 (r187684) @@ -371,7 +371,7 @@ rip_output(struct mbuf *m, struct socket ip->ip_p = inp->inp_ip_p; ip->ip_len = m->m_pkthdr.len; if (jailed(inp->inp_cred)) { - if (prison_getip4(inp->inp_cred, &ip->ip_src)) { + if (prison_get_ip4(inp->inp_cred, &ip->ip_src) != 0) { INP_RUNLOCK(inp); m_freem(m); return (EPERM); Modified: head/sys/netinet6/raw_ip6.c ============================================================================== --- head/sys/netinet6/raw_ip6.c Sun Jan 25 09:20:59 2009 (r187683) +++ head/sys/netinet6/raw_ip6.c Sun Jan 25 10:11:58 2009 (r187684) @@ -412,7 +412,7 @@ rip6_output(m, va_alist) goto bad; } if (jailed(in6p->inp_cred)) - if (prison_getip6(in6p->inp_cred, in6a) != 0) { + if (prison_get_ip6(in6p->inp_cred, in6a) != 0) { error = EPERM; goto bad; } Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Sun Jan 25 09:20:59 2009 (r187683) +++ head/sys/sys/jail.h Sun Jan 25 10:11:58 2009 (r187684) @@ -181,12 +181,12 @@ void prison_hold(struct prison *pr); void prison_hold_locked(struct prison *pr); void prison_proc_hold(struct prison *); void prison_proc_free(struct prison *); -int prison_getip4(struct ucred *cred, struct in_addr *ia); +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); #ifdef INET6 -int prison_getip6(struct ucred *, struct in6_addr *); +int prison_get_ip6(struct ucred *, struct in6_addr *); int prison_local_ip6(struct ucred *, struct in6_addr *, int); int prison_remote_ip6(struct ucred *, struct in6_addr *); int prison_check_ip6(struct ucred *, struct in6_addr *);