On Wed, Oct 18, 2017 at 01:42:57PM +0200, Martin Pieuchot wrote: > All are drivers provides it and if_attach() now asserts that it is not > NULL. > > Let's get rid of those checks, ok?
OK bluhm@ > Index: netinet/in.c > =================================================================== > RCS file: /cvs/src/sys/netinet/in.c,v > retrieving revision 1.140 > diff -u -p -r1.140 in.c > --- netinet/in.c 11 Aug 2017 19:53:02 -0000 1.140 > +++ netinet/in.c 18 Oct 2017 11:40:41 -0000 > @@ -406,8 +406,6 @@ in_ioctl(u_long cmd, caddr_t data, struc > break; > > default: > - if (ifp->if_ioctl == NULL) > - return (EOPNOTSUPP); > error = ((*ifp->if_ioctl)(ifp, cmd, data)); > return (error); > } > @@ -826,9 +824,6 @@ in_addmulti(struct in_addr *ap, struct i > */ > ++inm->inm_refcnt; > } else { > - if (ifp->if_ioctl == NULL) > - return (NULL); > - > /* > * New address; allocate a new multicast record > * and link it into the interface's multicast list. > Index: netinet6/in6.c > =================================================================== > RCS file: /cvs/src/sys/netinet6/in6.c,v > retrieving revision 1.212 > diff -u -p -r1.212 in6.c > --- netinet6/in6.c 16 Oct 2017 13:40:58 -0000 1.212 > +++ netinet6/in6.c 18 Oct 2017 11:40:03 -0000 > @@ -489,8 +489,6 @@ in6_ioctl(u_long cmd, caddr_t data, stru > break; > > default: > - if (ifp->if_ioctl == NULL) > - return (EOPNOTSUPP); > error = ((*ifp->if_ioctl)(ifp, cmd, data)); > return (error); > } > @@ -1247,11 +1245,6 @@ in6_addmulti(struct in6_addr *maddr6, st > */ > in6m->in6m_refcnt++; > } else { > - if (ifp->if_ioctl == NULL) { > - *errorp = ENXIO; /* XXX: appropriate? */ > - return (NULL); > - } > - > /* > * New address; allocate a new multicast record > * and link it into the interface's multicast list.