summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-12-20 22:13:28 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-12-20 22:13:28 +0000
commit5a28a8a5d99135ccab3c3ac492f24f8f7b9d1d38 (patch)
treed0eb085efc7419223c37c93b138c4ac4f75a344f
parentbcb3842c08cb7f2ac47b47e086b68768aa1cd88b (diff)
replace struct assignment w/ bcopy w/ help and testing of millert@; henning@ ok; fixes unaligned trap on alpha from pr3037
-rw-r--r--sys/net/if_pfsync.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index cd5242571ec..dd761e56497 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.2 2002/12/03 15:52:34 mickey Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.3 2002/12/20 22:13:27 mickey Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -270,14 +270,14 @@ pfsync_pack_state(action, st)
h->count++;
bzero(sp, sizeof(*sp));
- sp->lan = st->lan; HTONS(sp->lan.port);
- sp->gwy = st->gwy; HTONS(sp->gwy.port);
- sp->ext = st->ext; HTONS(sp->ext.port);
+ bcopy(&st->lan, &sp->lan, sizeof(sp->lan)); HTONS(sp->lan.port);
+ bcopy(&st->gwy, &sp->gwy, sizeof(sp->gwy)); HTONS(sp->gwy.port);
+ bcopy(&st->ext, &sp->ext, sizeof(sp->ext)); HTONS(sp->ext.port);
pf_state_peer_hton(&st->src, &sp->src);
pf_state_peer_hton(&st->dst, &sp->dst);
- sp->rt_addr = st->rt_addr;
+ bcopy(&st->rt_addr, &sp->rt_addr, sizeof(sp->rt_addr));
secs = time.tv_sec;
sp->creation = htonl(secs - st->creation);
if (st->expire <= secs)