Date: Tue, 22 Jan 2002 18:58:31 -0500 (EST) From: Andrew Gallatin <gallatin@cs.duke.edu> To: Bernd Walter <ticso@cicely8.cicely.de> Cc: Volker Stolz <stolz@hyperion.informatik.rwth-aachen.de>, freebsd-alpha@FreeBSD.ORG Subject: Re: alpha/33841: ifconfig causes unaligned accesses on Alpha Message-ID: <15437.64679.699916.530314@grasshopper.cs.duke.edu> In-Reply-To: <20020122145652.G71841@cicely8.cicely.de> References: <20020122141403.A11773@i2.informatik.rwth-aachen.de> <20020122145652.G71841@cicely8.cicely.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Bernd Walter writes:
>
> I will setup a testbox at the end of this week and will fix the
> ifconfig issue unless someone else did.
Cool. So far, I've only managed to paper over it w/a crude hack.
A generic solution at the kernel level would be much preferable.
I've appended my hack..
Cheers,
Drew
Index: sbin/ifconfig/ifconfig.c
===================================================================
RCS file: /home/ncvs/src/sbin/ifconfig/ifconfig.c,v
retrieving revision 1.51.2.15
diff -u -r1.51.2.15 ifconfig.c
--- sbin/ifconfig/ifconfig.c 14 Dec 2001 23:36:23 -0000 1.51.2.15
+++ sbin/ifconfig/ifconfig.c 22 Jan 2002 23:51:54 -0000
@@ -1123,17 +1123,21 @@
* specified, show it and it only; otherwise, show them all.
*/
void
-status(afp, addrcount, sdl, ifm, ifam)
+status(afp, addrcount, sdl, ifm_in, ifam)
const struct afswtch *afp;
int addrcount;
struct sockaddr_dl *sdl;
- struct if_msghdr *ifm;
+ struct if_msghdr *ifm_in;
struct ifa_msghdr *ifam;
{
const struct afswtch *p = NULL;
struct rt_addrinfo info;
int allfamilies, s;
struct ifstat ifs;
+ struct if_msghdr ifm_aligned, *ifm;
+
+ bcopy(ifm_in, &ifm_aligned, sizeof(*ifm));
+ ifm = &ifm_aligned;
if (afp == NULL) {
allfamilies = 1;
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15437.64679.699916.530314>
