diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2010-05-08 11:07:21 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2010-05-08 11:07:21 +0000 |
commit | 6057d302ab6f5ed2d0a21b32c4545f6d9bcb5c50 (patch) | |
tree | ce511dead652df4b676bea92108ed328a0ff6a65 | |
parent | e1de4271f372f688511cd5a9c17a2ee15e749d90 (diff) |
While handling SIOCSIFLLADDR, after adjusting the MAC of the interface,
call the interface-specific ioctl handler as well in case the driver
needs to do something special. E.g. if_trunk expects this in order to
update MAC addresses of its trunk ports.
If you now see "Inappropriate ioctl for device" errors after running
"ifconfig $if lladdr random" please let me know. Most likely the ioctl
handler of the driver needs fixing.
ok claudio@, "I only count half an ok for networking" tedu@
-rw-r--r-- | sys/net/if.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 2a8fe3c5268..a2551c31fa5 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.214 2010/04/25 17:38:53 mpf Exp $ */ +/* $OpenBSD: if.c,v 1.215 2010/05/08 11:07:20 stsp Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1557,6 +1557,9 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) ETHER_ADDR_LEN); bcopy((caddr_t)ifr->ifr_addr.sa_data, LLADDR(sdl), ETHER_ADDR_LEN); + error = (*ifp->if_ioctl)(ifp, cmd, data); + if (error == ENOTTY) + error = 0; break; default: return (ENODEV); |