From owner-svn-src-all@FreeBSD.ORG Fri Mar 20 13:41:23 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 73BA11065675; Fri, 20 Mar 2009 13:41:23 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60DA18FC3C; Fri, 20 Mar 2009 13:41:23 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2KDfNBv003700; Fri, 20 Mar 2009 13:41:23 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2KDfN1U003699; Fri, 20 Mar 2009 13:41:23 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200903201341.n2KDfN1U003699@svn.freebsd.org> From: Jamie Gritton Date: Fri, 20 Mar 2009 13:41:23 +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: r190151 - head/sys/net 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: Fri, 20 Mar 2009 13:41:24 -0000 Author: jamie Date: Fri Mar 20 13:41:23 2009 New Revision: 190151 URL: http://svn.freebsd.org/changeset/base/190151 Log: Call the interface's if_ioctl from ifioctl(), if the protocol didn't handle the ioctl. There are other paths that already call it, but this allows for a non-interface socket (like AF_LOCAL which ifconfig now uses) to use a broader class of interface ioctls. Approved by: bz (mentor), rwatson Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Fri Mar 20 13:27:51 2009 (r190150) +++ head/sys/net/if.c Fri Mar 20 13:41:23 2009 (r190151) @@ -2025,6 +2025,8 @@ ifioctl(struct socket *so, u_long cmd, c error = ((*so->so_proto->pr_usrreqs->pru_control)(so, cmd, data, ifp, td)); + if (error == EOPNOTSUPP && ifp != NULL && ifp->if_ioctl != NULL) + error = (*ifp->if_ioctl)(ifp, cmd, data); #else { int ocmd = cmd; @@ -2066,6 +2068,9 @@ ifioctl(struct socket *so, u_long cmd, c cmd, data, ifp, td)); + if (error == EOPNOTSUPP && ifp != NULL && + ifp->if_ioctl != NULL) + error = (*ifp->if_ioctl)(ifp, cmd, data); switch (ocmd) { case OSIOCGIFADDR: