diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-05-28 08:32:42 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-05-28 08:32:42 +0000 |
commit | 34c21f7445bcf7cc87e61515e75776a02274c460 (patch) | |
tree | d0023d2fdd0d44628f8315987505061dc56a6a52 /sys/netinet | |
parent | 2d2ee666765f51936858ef4b1429bfc1c7adfb3a (diff) |
Make sure the temporary buffer used to generate tcp options is properly
aligned, otherwise we lose on strict alignment architecture. Should fix
problems with gcc4 compiled bsd.rd's that people see on sparc64.
ok millert@, beck@, jsing@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_output.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index d4da8619528..036c54176cd 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.87 2009/06/05 00:05:22 claudio Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.88 2010/05/28 08:32:41 kettenis Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -212,7 +212,8 @@ tcp_output(struct tcpcb *tp) int off, flags, error; struct mbuf *m; struct tcphdr *th; - u_char opt[MAX_TCPOPTLEN]; + u_int32_t optbuf[howmany(MAX_TCPOPTLEN, sizeof(u_int32_t))]; + u_char *opt = (u_char *)optbuf; unsigned int optlen, hdrlen, packetlen; int idle, sendalot = 0; #ifdef TCP_SACK |