Author: melifaro
Date: Fri Jan 16 10:09:28 2015
New Revision: 277238
URL: https://svnweb.freebsd.org/changeset/base/277238

Log:
  Eliminate SIOCGIFADDR handling in bpf.
  
  Quoting 19 years bpf.4 manual from bpf-1.2a1:
  "
  (SIOCGIFADDR is obsolete under BSD systems.  SIOCGIFCONF should be
   used to query link-level addresses.)
  "
  * SIOCGIFADDR was not imported in NetBSD (bpf.c 1.36) and OpenBSD.
  * Last bits (e.g. manpage claiming SIOCGIFADDR exists) was cleaned
    from NetBSD via kern/21513 5 years ago,
    from OpenBSD via documentation/6352 5 years ago.

Modified:
  head/share/man/man4/bpf.4
  head/sys/net/bpf.c

Modified: head/share/man/man4/bpf.4
==============================================================================
--- head/share/man/man4/bpf.4   Fri Jan 16 09:07:31 2015        (r277237)
+++ head/share/man/man4/bpf.4   Fri Jan 16 10:09:28 2015        (r277238)
@@ -290,8 +290,6 @@ and
 .Pp
 In addition to
 .Dv FIONREAD
-and
-.Dv SIOCGIFADDR ,
 the following commands may be applied to any open
 .Nm
 file.

Modified: head/sys/net/bpf.c
==============================================================================
--- head/sys/net/bpf.c  Fri Jan 16 09:07:31 2015        (r277237)
+++ head/sys/net/bpf.c  Fri Jan 16 10:09:28 2015        (r277238)
@@ -1192,7 +1192,6 @@ reset_d(struct bpf_d *d)
 
 /*
  *  FIONREAD           Check for read packet available.
- *  SIOCGIFADDR                Get interface address - convenient hook to 
driver.
  *  BIOCGBLEN          Get buffer len [for read()].
  *  BIOCSETF           Set read filter.
  *  BIOCSETFNR         Set read filter without resetting descriptor.
@@ -1322,19 +1321,6 @@ bpfioctl(struct cdev *dev, u_long cmd, c
                        break;
                }
 
-       case SIOCGIFADDR:
-               {
-                       struct ifnet *ifp;
-
-                       if (d->bd_bif == NULL)
-                               error = EINVAL;
-                       else {
-                               ifp = d->bd_bif->bif_ifp;
-                               error = (*ifp->if_ioctl)(ifp, cmd, addr);
-                       }
-                       break;
-               }
-
        /*
         * Get buffer len [for read()].
         */
_______________________________________________
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"

Reply via email to