From owner-svn-src-all@FreeBSD.ORG Sat Dec 27 19:37:47 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 466881065673; Sat, 27 Dec 2008 19:37:47 +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 36BA68FC18; Sat, 27 Dec 2008 19:37:47 +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 mBRJbluZ080198; Sat, 27 Dec 2008 19:37:47 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRJblRo080197; Sat, 27 Dec 2008 19:37:47 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812271937.mBRJblRo080197@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 19:37:47 +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: r186526 - 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 19:37:47 -0000 Author: bz Date: Sat Dec 27 19:37:46 2008 New Revision: 186526 URL: http://svn.freebsd.org/changeset/base/186526 Log: Change the in6p variable names to inp to be able to diff the v4 to the v6 implementations. MFC after: 4 weeks Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sat Dec 27 19:03:57 2008 (r186525) +++ head/sys/netipsec/ipsec.c Sat Dec 27 19:37:46 2008 (r186526) @@ -1240,8 +1240,8 @@ ipsec_delete_pcbpolicy(inp) #ifdef INET6 int -ipsec6_set_policy(in6p, optname, request, len, cred) - struct inpcb *in6p; +ipsec6_set_policy(inp, optname, request, len, cred) + struct inpcb *inp; int optname; caddr_t request; size_t len; @@ -1252,7 +1252,7 @@ ipsec6_set_policy(in6p, optname, request struct secpolicy **pcb_sp; /* sanity check. */ - if (in6p == NULL || request == NULL) + if (inp == NULL || request == NULL) return EINVAL; if (len < sizeof(*xpl)) return EINVAL; @@ -1261,10 +1261,10 @@ ipsec6_set_policy(in6p, optname, request /* select direction */ switch (xpl->sadb_x_policy_dir) { case IPSEC_DIR_INBOUND: - pcb_sp = &in6p->inp_sp->sp_in; + pcb_sp = &inp->inp_sp->sp_in; break; case IPSEC_DIR_OUTBOUND: - pcb_sp = &in6p->inp_sp->sp_out; + pcb_sp = &inp->inp_sp->sp_out; break; default: ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, @@ -1276,8 +1276,8 @@ ipsec6_set_policy(in6p, optname, request } int -ipsec6_get_policy(in6p, request, len, mp) - struct inpcb *in6p; +ipsec6_get_policy(inp, request, len, mp) + struct inpcb *inp; caddr_t request; size_t len; struct mbuf **mp; @@ -1287,9 +1287,9 @@ ipsec6_get_policy(in6p, request, len, mp struct secpolicy *pcb_sp; /* sanity check. */ - if (in6p == NULL || request == NULL || mp == NULL) + if (inp == NULL || request == NULL || mp == NULL) return EINVAL; - IPSEC_ASSERT(in6p->inp_sp != NULL, ("null inp_sp")); + IPSEC_ASSERT(inp->inp_sp != NULL, ("null inp_sp")); if (len < sizeof(*xpl)) return EINVAL; xpl = (struct sadb_x_policy *)request; @@ -1297,10 +1297,10 @@ ipsec6_get_policy(in6p, request, len, mp /* select direction */ switch (xpl->sadb_x_policy_dir) { case IPSEC_DIR_INBOUND: - pcb_sp = in6p->inp_sp->sp_in; + pcb_sp = inp->inp_sp->sp_in; break; case IPSEC_DIR_OUTBOUND: - pcb_sp = in6p->inp_sp->sp_out; + pcb_sp = inp->inp_sp->sp_out; break; default: ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, @@ -1677,10 +1677,10 @@ ipsec4_hdrsiz(m, dir, inp) * and maybe from ip6_forward.() */ size_t -ipsec6_hdrsiz(m, dir, in6p) +ipsec6_hdrsiz(m, dir, inp) struct mbuf *m; u_int dir; - struct inpcb *in6p; + struct inpcb *inp; { INIT_VNET_IPSEC(curvnet); struct secpolicy *sp; @@ -1688,15 +1688,15 @@ ipsec6_hdrsiz(m, dir, in6p) size_t size; IPSEC_ASSERT(m != NULL, ("null mbuf")); - IPSEC_ASSERT(in6p == NULL || in6p->inp_socket != NULL, + IPSEC_ASSERT(inp == NULL || inp->inp_socket != NULL, ("socket w/o inpcb")); /* get SP for this packet */ /* XXX Is it right to call with IP_FORWARDING. */ - if (in6p == NULL) + if (inp == NULL) sp = ipsec_getpolicybyaddr(m, dir, IP_FORWARDING, &error); else - sp = ipsec_getpolicybysock(m, dir, in6p, &error); + sp = ipsec_getpolicybysock(m, dir, inp, &error); if (sp == NULL) return 0;