aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index edec90f227eb..afec9f90408f 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1351,9 +1351,13 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
error = suser(td);
if (error)
return (error);
+ if (ifp->if_ioctl == NULL)
+ return (EOPNOTSUPP);
if (ifr->ifr_reqcap & ~ifp->if_capabilities)
return (EINVAL);
- (void) (*ifp->if_ioctl)(ifp, cmd, data);
+ error = (*ifp->if_ioctl)(ifp, cmd, data);
+ if (error == 0)
+ getmicrotime(&ifp->if_lastchange);
break;
#ifdef MAC