Module Name: src Committed By: riz Date: Wed Jun 13 19:12:24 UTC 2012
Modified Files: src/sys/netinet [netbsd-6]: in.c Log Message: Pull up following revision(s) (requested by gdt in ticket #330): sys/netinet/in.c: revision 1.143 Simply use the ifa_addr pointer, rather than taking its address. Resolves failure to match addresses in SIOC[GD]LIFADDR calls. Diagnosis and fix is due to Mark Keaton of BBN. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.142.2.1 src/sys/netinet/in.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/in.c diff -u src/sys/netinet/in.c:1.142 src/sys/netinet/in.c:1.142.2.1 --- src/sys/netinet/in.c:1.142 Mon Dec 12 00:06:39 2011 +++ src/sys/netinet/in.c Wed Jun 13 19:12:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.142 2011/12/12 00:06:39 roy Exp $ */ +/* $NetBSD: in.c,v 1.142.2.1 2012/06/13 19:12:23 riz Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.142 2011/12/12 00:06:39 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.142.2.1 2012/06/13 19:12:23 riz Exp $"); #include "opt_inet.h" #include "opt_inet_conf.h" @@ -729,7 +729,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo continue; if (cmp == 0) break; - candidate.s_addr = ((struct sockaddr_in *)&ifa->ifa_addr)->sin_addr.s_addr; + candidate.s_addr = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr; candidate.s_addr &= mask.s_addr; if (candidate.s_addr == match.s_addr) break;