diff --git a/sys/net/if.c b/sys/net/if.c index 425555728ba7..6f12e132aba7 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.200 2007/09/11 19:31:22 gdt Exp $ */ +/* $NetBSD: if.c,v 1.201 2007/09/13 18:54:57 gdt Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.200 2007/09/11 19:31:22 gdt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.201 2007/09/13 18:54:57 gdt Exp $"); #include "opt_inet.h" @@ -1669,7 +1669,7 @@ ifconf(u_long cmd, void *data) if (ifrp != NULL) { - ifr.ifr_addr = *sa; + memcpy(&ifr.ifr_space, sa, sa->sa_len); if (space >= sz) { error = copyout(&ifr, ifrp, sz); if (error != 0) diff --git a/sys/net/if.h b/sys/net/if.h index 271ff5907eb5..bca3a3dacb00 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.126 2007/09/02 00:24:18 dyoung Exp $ */ +/* $NetBSD: if.h,v 1.127 2007/09/13 18:54:57 gdt Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -552,6 +552,7 @@ struct ifreq { #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ +#define ifr_space ifr_ifru.ifru_space /* sockaddr_storage */ #define ifr_flags ifr_ifru.ifru_flags /* flags */ #define ifr_metric ifr_ifru.ifru_metric /* metric */ #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */