From owner-svn-src-all@FreeBSD.ORG Tue Sep 15 01:01:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A372B106566B; Tue, 15 Sep 2009 01:01:03 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 779CE8FC1B; Tue, 15 Sep 2009 01:01:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8F113IF071314; Tue, 15 Sep 2009 01:01:03 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8F113sU071311; Tue, 15 Sep 2009 01:01:03 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200909150101.n8F113sU071311@svn.freebsd.org> From: Qing Li Date: Tue, 15 Sep 2009 01:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197210 - in head/sys: netinet nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2009 01:01:03 -0000 Author: qingli Date: Tue Sep 15 01:01:03 2009 New Revision: 197210 URL: http://svn.freebsd.org/changeset/base/197210 Log: The bootp code installs an interface address and the nfs client module tries to install the same address again. This extra code is removed, which was discovered by the removal of a call to in_ifscrub() in r196714. This call to in_ifscrub is put back here because the SIOCAIFADDR command can be used to change the prefix length of an existing alias. Reviewed by: kmacy Modified: head/sys/netinet/in.c head/sys/nfsclient/nfs_vfsops.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Tue Sep 15 00:26:23 2009 (r197209) +++ head/sys/netinet/in.c Tue Sep 15 01:01:03 2009 (r197210) @@ -536,6 +536,16 @@ in_control(struct socket *so, u_long cmd hostIsNew = 0; } if (ifra->ifra_mask.sin_len) { + /* + * QL: XXX + * Need to scrub the prefix here in case + * the issued command is SIOCAIFADDR with + * the same address, but with a different + * prefix length. And if the prefix length + * is the same as before, then the call is + * un-necessarily executed here. + */ + in_ifscrub(ifp, ia); ia->ia_sockmask = ifra->ifra_mask; ia->ia_sockmask.sin_family = AF_INET; ia->ia_subnetmask = @@ -544,6 +554,7 @@ in_control(struct socket *so, u_long cmd } if ((ifp->if_flags & IFF_POINTOPOINT) && (ifra->ifra_dstaddr.sin_family == AF_INET)) { + in_ifscrub(ifp, ia); ia->ia_dstaddr = ifra->ifra_dstaddr; maskIsNew = 1; /* We lie; but the effect's the same */ } Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Tue Sep 15 00:26:23 2009 (r197209) +++ head/sys/nfsclient/nfs_vfsops.c Tue Sep 15 01:01:03 2009 (r197210) @@ -463,9 +463,13 @@ nfs_mountroot(struct mount *mp) break; } #endif + +#if 0 /* QL: XXX */ error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, td); if (error) panic("nfs_mountroot: SIOCAIFADDR: %d", error); +#endif + if ((cp = getenv("boot.netif.mtu")) != NULL) { ir.ifr_mtu = strtol(cp, NULL, 10); bcopy(nd->myif.ifra_name, ir.ifr_name, IFNAMSIZ);