From owner-p4-projects@FreeBSD.ORG Wed Nov 22 14:40:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E19E416A416; Wed, 22 Nov 2006 14:40:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B951816A412 for ; Wed, 22 Nov 2006 14:40:43 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D69343D7F for ; Wed, 22 Nov 2006 14:40:08 +0000 (GMT) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAMEebLG073423 for ; Wed, 22 Nov 2006 14:40:37 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAMEebK2073420 for perforce@freebsd.org; Wed, 22 Nov 2006 14:40:37 GMT (envelope-from csjp@freebsd.org) Date: Wed, 22 Nov 2006 14:40:37 GMT Message-Id: <200611221440.kAMEebK2073420@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 110390 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2006 14:40:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=110390 Change 110390 by csjp@csjp_xor on 2006/11/22 14:40:25 Instead of coverting the data to big endian on copy, do a straight memory copy. The user is expected to have the address data in network byte order already. This is consistent with how we read the machine portion of the regular termid. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#56 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#56 (text+ko) ==== @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#55 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#56 $ */ #include @@ -1104,12 +1104,10 @@ ADD_U_INT32(dptr, sid); ADD_U_INT32(dptr, tid->at_port); ADD_U_INT32(dptr, tid->at_type); - ADD_U_INT32(dptr, tid->at_addr[0]); - if (tid->at_type == AU_IPv6) { - ADD_U_INT32(dptr, tid->at_addr[1]); - ADD_U_INT32(dptr, tid->at_addr[2]); - ADD_U_INT32(dptr, tid->at_addr[3]); - } + if (tid->at_type == AU_IPv6) + ADD_MEM(dptr, &tid->at_addr[0], 4 * sizeof(u_int32_t)); + else + ADD_MEM(dptr, &tid->at_addr[0], sizeof(u_int32_t)); return (t); }