Date: Tue, 28 Feb 2006 01:25:41 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 92503 for review Message-ID: <200602280125.k1S1Pf7P074404@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=92503 Change 92503 by rwatson@rwatson_peppercorn on 2006/02/28 01:24:41 When constructing tokens with IPv6 addresses, copy the entire structure rather than grubbing around inside. This avoids non-portability. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#37 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#37 (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#36 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#37 $ */ #include <sys/types.h> @@ -368,10 +368,7 @@ ADD_U_CHAR(dptr, AUT_IN_ADDR_EX); ADD_U_INT32(dptr, type); - ADD_U_INT32(dptr, internet_addr->__u6_addr.__u6_addr32[0]); - ADD_U_INT32(dptr, internet_addr->__u6_addr.__u6_addr32[1]); - ADD_U_INT32(dptr, internet_addr->__u6_addr.__u6_addr32[2]); - ADD_U_INT32(dptr, internet_addr->__u6_addr.__u6_addr32[3]); + ADD_MEM(dptr, internet_addr, sizeof(*internet_addr)); return (t); } @@ -914,10 +911,7 @@ ADD_U_CHAR(dptr, so->sin6_family); ADD_U_INT16(dptr, so->sin6_port); - ADD_U_INT32(dptr, so->sin6_addr.__u6_addr.__u6_addr32[0]); - ADD_U_INT32(dptr, so->sin6_addr.__u6_addr.__u6_addr32[1]); - ADD_U_INT32(dptr, so->sin6_addr.__u6_addr.__u6_addr32[2]); - ADD_U_INT32(dptr, so->sin6_addr.__u6_addr.__u6_addr32[3]); + ADD_MEM(dptr, &so->sin6_addr, sizeof(so->sin6_addr)); return (t);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602280125.k1S1Pf7P074404>