PERFORCE change 92503 for review
Robert Watson
rwatson at FreeBSD.org
Mon Feb 27 17:31:37 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=92503
Change 92503 by rwatson at 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);
More information about the trustedbsd-cvs
mailing list