diff options
author | ticso <ticso@FreeBSD.org> | 2003-06-04 01:17:37 +0000 |
---|---|---|
committer | ticso <ticso@FreeBSD.org> | 2003-06-04 01:17:37 +0000 |
commit | bb00c59c79a3aceacb0bb3712668d1a80352481f (patch) | |
tree | 886cc6b03c4460c9eed8881a0a71205b05c17d1c /sys/netinet/ip_dummynet.c | |
parent | 16f34ab41364565ebcc08fe935fb3ed7646887aa (diff) | |
download | FreeBSD-src-bb00c59c79a3aceacb0bb3712668d1a80352481f.zip FreeBSD-src-bb00c59c79a3aceacb0bb3712668d1a80352481f.tar.gz |
Change handling to support strong alignment architectures such as alpha and
sparc64.
PR: alpha/50658
Submitted by: rizzo
Tested on: alpha
Diffstat (limited to 'sys/netinet/ip_dummynet.c')
-rw-r--r-- | sys/netinet/ip_dummynet.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index 0ea1868..78c7b4d 100644 --- a/sys/netinet/ip_dummynet.c +++ b/sys/netinet/ip_dummynet.c @@ -1027,7 +1027,11 @@ locate_flowset(int pipe_nr, struct ip_fw *rule) if (cmd->opcode == O_LOG) cmd += F_LEN(cmd); +#ifdef __i386__ fs = ((ipfw_insn_pipe *)cmd)->pipe_ptr; +#else + bcopy(& ((ipfw_insn_pipe *)cmd)->pipe_ptr, &fs, sizeof(fs)); +#endif if (fs != NULL) return fs; @@ -1049,8 +1053,12 @@ locate_flowset(int pipe_nr, struct ip_fw *rule) } /* record for the future */ #if IPFW2 +#ifdef __i386__ ((ipfw_insn_pipe *)cmd)->pipe_ptr = fs; #else + bcopy(&fs, & ((ipfw_insn_pipe *)cmd)->pipe_ptr, sizeof(fs)); +#endif +#else if (fs != NULL) rule->pipe_ptr = fs; #endif |