Date: Sun, 25 Jan 2009 10:11:58 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r187684 - in head/sys: kern net netinet netinet6 sys Message-ID: <200901251011.n0PABwxl012942@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901251011.n0PABwxl012942>