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: _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"