From owner-svn-src-all@freebsd.org Thu Aug 27 15:27:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 526429C4C74; Thu, 27 Aug 2015 15:27:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36F58DC1; Thu, 27 Aug 2015 15:27:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7RFRhMa007631; Thu, 27 Aug 2015 15:27:43 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7RFRgdK007626; Thu, 27 Aug 2015 15:27:42 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201508271527.t7RFRgdK007626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 27 Aug 2015 15:27:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287211 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2015 15:27:43 -0000 Author: bz Date: Thu Aug 27 15:27:41 2015 New Revision: 287211 URL: https://svnweb.freebsd.org/changeset/base/287211 Log: get_inpcbinfo() and get_pcblist() are UDP local functions and do not do what one would expect by name. Prefix them with "udp_" to at least obviously limit the scope. This is a non-functional change. Reviewed by: gnn, rwatson MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3505 Modified: head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Thu Aug 27 15:21:58 2015 (r287210) +++ head/sys/netinet/udp_usrreq.c Thu Aug 27 15:27:41 2015 (r287211) @@ -520,7 +520,7 @@ udp_input(struct mbuf **mp, int *offp, i } } - pcbinfo = get_inpcbinfo(proto); + pcbinfo = udp_get_inpcbinfo(proto); if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || in_broadcast(ip->ip_dst, ifp)) { struct inpcb *last; @@ -528,7 +528,7 @@ udp_input(struct mbuf **mp, int *offp, i struct ip_moptions *imo; INP_INFO_RLOCK(pcbinfo); - pcblist = get_pcblist(proto); + pcblist = udp_get_pcblist(proto); last = NULL; LIST_FOREACH(inp, pcblist, inp_list) { if (inp->inp_lport != uh->uh_dport) @@ -1243,7 +1243,7 @@ udp_output(struct inpcb *inp, struct mbu * XXXRW: Check that hash locking update here is correct. */ pr = inp->inp_socket->so_proto->pr_protocol; - pcbinfo = get_inpcbinfo(pr); + pcbinfo = udp_get_inpcbinfo(pr); sin = (struct sockaddr_in *)addr; if (sin != NULL && (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0)) { @@ -1678,7 +1678,7 @@ udp_abort(struct socket *so) struct inpcb *inp; struct inpcbinfo *pcbinfo; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_abort: inp == NULL")); INP_WLOCK(inp); @@ -1699,7 +1699,7 @@ udp_attach(struct socket *so, int proto, struct inpcbinfo *pcbinfo; int error; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp == NULL, ("udp_attach: inp != NULL")); error = soreserve(so, udp_sendspace, udp_recvspace); @@ -1760,7 +1760,7 @@ udp_bind(struct socket *so, struct socka struct inpcbinfo *pcbinfo; int error; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_bind: inp == NULL")); INP_WLOCK(inp); @@ -1777,7 +1777,7 @@ udp_close(struct socket *so) struct inpcb *inp; struct inpcbinfo *pcbinfo; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_close: inp == NULL")); INP_WLOCK(inp); @@ -1799,7 +1799,7 @@ udp_connect(struct socket *so, struct so struct sockaddr_in *sin; int error; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_connect: inp == NULL")); INP_WLOCK(inp); @@ -1829,7 +1829,7 @@ udp_detach(struct socket *so) struct inpcbinfo *pcbinfo; struct udpcb *up; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_detach: inp == NULL")); KASSERT(inp->inp_faddr.s_addr == INADDR_ANY, @@ -1851,7 +1851,7 @@ udp_disconnect(struct socket *so) struct inpcb *inp; struct inpcbinfo *pcbinfo; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_disconnect: inp == NULL")); INP_WLOCK(inp); Modified: head/sys/netinet/udp_var.h ============================================================================== --- head/sys/netinet/udp_var.h Thu Aug 27 15:21:58 2015 (r287210) +++ head/sys/netinet/udp_var.h Thu Aug 27 15:27:41 2015 (r287211) @@ -150,13 +150,13 @@ VNET_DECLARE(int, udp_blackhole); extern int udp_log_in_vain; static __inline struct inpcbinfo * -get_inpcbinfo(int protocol) +udp_get_inpcbinfo(int protocol) { return (protocol == IPPROTO_UDP) ? &V_udbinfo : &V_ulitecbinfo; } static __inline struct inpcbhead * -get_pcblist(int protocol) +udp_get_pcblist(int protocol) { return (protocol == IPPROTO_UDP) ? &V_udb : &V_ulitecb; } Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Thu Aug 27 15:21:58 2015 (r287210) +++ head/sys/netinet6/udp6_usrreq.c Thu Aug 27 15:27:41 2015 (r287211) @@ -282,7 +282,7 @@ udp6_input(struct mbuf **mp, int *offp, init_sin6(&fromsa, m); fromsa.sin6_port = uh->uh_sport; - pcbinfo = get_inpcbinfo(nxt); + pcbinfo = udp_get_inpcbinfo(nxt); if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { struct inpcb *last; struct inpcbhead *pcblist; @@ -304,7 +304,7 @@ udp6_input(struct mbuf **mp, int *offp, * here. We need udphdr for IPsec processing so we do that * later. */ - pcblist = get_pcblist(nxt); + pcblist = udp_get_pcblist(nxt); last = NULL; LIST_FOREACH(inp, pcblist, inp_list) { if ((inp->inp_vflag & INP_IPV6) == 0) @@ -908,7 +908,7 @@ udp6_abort(struct socket *so) struct inpcb *inp; struct inpcbinfo *pcbinfo; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_abort: inp == NULL")); @@ -940,7 +940,7 @@ udp6_attach(struct socket *so, int proto struct inpcbinfo *pcbinfo; int error; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp == NULL, ("udp6_attach: inp != NULL")); @@ -988,7 +988,7 @@ udp6_bind(struct socket *so, struct sock struct inpcbinfo *pcbinfo; int error; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_bind: inp == NULL")); @@ -1032,7 +1032,7 @@ udp6_close(struct socket *so) struct inpcb *inp; struct inpcbinfo *pcbinfo; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_close: inp == NULL")); @@ -1064,7 +1064,7 @@ udp6_connect(struct socket *so, struct s struct sockaddr_in6 *sin6; int error; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); sin6 = (struct sockaddr_in6 *)nam; KASSERT(inp != NULL, ("udp6_connect: inp == NULL")); @@ -1126,7 +1126,7 @@ udp6_detach(struct socket *so) struct inpcbinfo *pcbinfo; struct udpcb *up; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_detach: inp == NULL")); @@ -1147,7 +1147,7 @@ udp6_disconnect(struct socket *so) struct inpcbinfo *pcbinfo; int error; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_disconnect: inp == NULL")); @@ -1188,7 +1188,7 @@ udp6_send(struct socket *so, int flags, struct inpcbinfo *pcbinfo; int error = 0; - pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); + pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp6_send: inp == NULL"));