diff options
| author | dyoung <dyoung@NetBSD.org> | 2007-08-26 22:33:25 +0000 |
|---|---|---|
| committer | dyoung <dyoung@NetBSD.org> | 2007-08-26 22:33:25 +0000 |
| commit | e6fc91327f50cfd44c5f5840c77eb29227c175e8 (patch) | |
| tree | 23f5468c1984d62401057b73c5f465db30fb0a97 /sys/compat/linux/common/linux_socket.c | |
| parent | 6f7649313f7191cd532035f266fe6eef07fb43cc (diff) | |
Use satosdl().
Diffstat (limited to 'sys/compat/linux/common/linux_socket.c')
| -rw-r--r-- | sys/compat/linux/common/linux_socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/linux/common/linux_socket.c b/sys/compat/linux/common/linux_socket.c index 7899d119b41..53bc8022282 100644 --- a/sys/compat/linux/common/linux_socket.c +++ b/sys/compat/linux/common/linux_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.77 2007/08/15 12:07:29 ad Exp $ */ +/* $NetBSD: linux_socket.c,v 1.78 2007/08/26 22:33:25 dyoung Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.77 2007/08/15 12:07:29 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.78 2007/08/26 22:33:25 dyoung Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -1066,7 +1066,7 @@ linux_getifhwaddr(struct lwp *l, register_t *retval, u_int fd, found=1; if ((ifa = ifp->if_addrlist.tqh_first) != 0) { for (; ifa != 0; ifa = ifa->ifa_list.tqe_next) { - sadl = (struct sockaddr_dl *)ifa->ifa_addr; + sadl = satosdl(ifa->ifa_addr); /* only return ethernet addresses */ /* XXX what about FDDI, etc. ? */ if (sadl->sdl_family != AF_LINK || @@ -1105,7 +1105,7 @@ linux_getifhwaddr(struct lwp *l, register_t *retval, u_int fd, continue; else for (; ifa != 0; ifa = ifa->ifa_list.tqe_next) { - sadl = (struct sockaddr_dl *)ifa->ifa_addr; + sadl = satosdl(ifa->ifa_addr); /* only return ethernet addresses */ /* XXX what about FDDI, etc. ? */ if (sadl->sdl_family != AF_LINK || |
