From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 23:24:59 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 977581065673; Sat, 27 Dec 2008 23:24:59 +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 882C08FC16; Sat, 27 Dec 2008 23:24:59 +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 mBRNOx1x086609; Sat, 27 Dec 2008 23:24:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRNOx4A086608; Sat, 27 Dec 2008 23:24:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812272324.mBRNOx4A086608@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 23:24:59 +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: r186532 - head/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 27 Dec 2008 23:24:59 -0000 Author: bz Date: Sat Dec 27 23:24:59 2008 New Revision: 186532 URL: http://svn.freebsd.org/changeset/base/186532 Log: Like in the rest of the file and the network stack use inp as variable name for the inpcb. For consistency with the other *_hdrsiz functions use 'size' instead of 'siz' as variable name. No functional change. MFC after: 4 weeks Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sat Dec 27 22:58:16 2008 (r186531) +++ head/sys/netipsec/ipsec.c Sat Dec 27 23:24:59 2008 (r186532) @@ -228,9 +228,9 @@ SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_ "IPsec IPv6 statistics."); #endif /* INET6 */ -static int ipsec4_setspidx_inpcb __P((struct mbuf *, struct inpcb *pcb)); +static int ipsec4_setspidx_inpcb __P((struct mbuf *, struct inpcb *)); #ifdef INET6 -static int ipsec6_setspidx_inpcb __P((struct mbuf *, struct inpcb *pcb)); +static int ipsec6_setspidx_inpcb __P((struct mbuf *, struct inpcb *)); #endif static int ipsec_setspidx __P((struct mbuf *, struct secpolicyindex *, int)); static void ipsec4_get_ulp __P((struct mbuf *m, struct secpolicyindex *, int)); @@ -538,50 +538,50 @@ ipsec4_checkpolicy(struct mbuf *m, u_int } static int -ipsec4_setspidx_inpcb(struct mbuf *m, struct inpcb *pcb) +ipsec4_setspidx_inpcb(struct mbuf *m, struct inpcb *inp) { int error; - IPSEC_ASSERT(pcb != NULL, ("null pcb")); - IPSEC_ASSERT(pcb->inp_sp != NULL, ("null inp_sp")); - IPSEC_ASSERT(pcb->inp_sp->sp_out != NULL && pcb->inp_sp->sp_in != NULL, + IPSEC_ASSERT(inp != NULL, ("null inp")); + IPSEC_ASSERT(inp->inp_sp != NULL, ("null inp_sp")); + IPSEC_ASSERT(inp->inp_sp->sp_out != NULL && inp->inp_sp->sp_in != NULL, ("null sp_in || sp_out")); - error = ipsec_setspidx(m, &pcb->inp_sp->sp_in->spidx, 1); + error = ipsec_setspidx(m, &inp->inp_sp->sp_in->spidx, 1); if (error == 0) { - pcb->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; - pcb->inp_sp->sp_out->spidx = pcb->inp_sp->sp_in->spidx; - pcb->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; + inp->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; + inp->inp_sp->sp_out->spidx = inp->inp_sp->sp_in->spidx; + inp->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; } else { - bzero(&pcb->inp_sp->sp_in->spidx, - sizeof (pcb->inp_sp->sp_in->spidx)); - bzero(&pcb->inp_sp->sp_out->spidx, - sizeof (pcb->inp_sp->sp_in->spidx)); + bzero(&inp->inp_sp->sp_in->spidx, + sizeof (inp->inp_sp->sp_in->spidx)); + bzero(&inp->inp_sp->sp_out->spidx, + sizeof (inp->inp_sp->sp_in->spidx)); } return (error); } #ifdef INET6 static int -ipsec6_setspidx_inpcb(struct mbuf *m, struct inpcb *pcb) +ipsec6_setspidx_inpcb(struct mbuf *m, struct inpcb *inp) { int error; - IPSEC_ASSERT(pcb != NULL, ("null pcb")); - IPSEC_ASSERT(pcb->inp_sp != NULL, ("null inp_sp")); - IPSEC_ASSERT(pcb->inp_sp->sp_out != NULL && pcb->inp_sp->sp_in != NULL, + IPSEC_ASSERT(inp != NULL, ("null inp")); + IPSEC_ASSERT(inp->inp_sp != NULL, ("null inp_sp")); + IPSEC_ASSERT(inp->inp_sp->sp_out != NULL && inp->inp_sp->sp_in != NULL, ("null sp_in || sp_out")); - error = ipsec_setspidx(m, &pcb->inp_sp->sp_in->spidx, 1); + error = ipsec_setspidx(m, &inp->inp_sp->sp_in->spidx, 1); if (error == 0) { - pcb->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; - pcb->inp_sp->sp_out->spidx = pcb->inp_sp->sp_in->spidx; - pcb->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; + inp->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; + inp->inp_sp->sp_out->spidx = inp->inp_sp->sp_in->spidx; + inp->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; } else { - bzero(&pcb->inp_sp->sp_in->spidx, - sizeof(pcb->inp_sp->sp_in->spidx)); - bzero(&pcb->inp_sp->sp_out->spidx, - sizeof(pcb->inp_sp->sp_in->spidx)); + bzero(&inp->inp_sp->sp_in->spidx, + sizeof(inp->inp_sp->sp_in->spidx)); + bzero(&inp->inp_sp->sp_out->spidx, + sizeof(inp->inp_sp->sp_in->spidx)); } return (error); @@ -1523,7 +1523,7 @@ ipsec_hdrsiz(struct secpolicy *sp) { INIT_VNET_IPSEC(curvnet); struct ipsecrequest *isr; - size_t siz; + size_t size; KEYDEBUG(KEYDEBUG_IPSEC_DATA, printf("%s: using SP\n", __func__); kdebug_secpolicy(sp)); @@ -1538,7 +1538,7 @@ ipsec_hdrsiz(struct secpolicy *sp) IPSEC_ASSERT(sp->policy == IPSEC_POLICY_IPSEC, ("invalid policy %u", sp->policy)); - siz = 0; + size = 0; for (isr = sp->req; isr != NULL; isr = isr->next) { size_t clen = 0; @@ -1571,10 +1571,10 @@ ipsec_hdrsiz(struct secpolicy *sp) break; } } - siz += clen; + size += clen; } - return (siz); + return (size); } /* This function is called from ip_forward() and ipsec4_hdrsize_tcp(). */