diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2005-02-19 09:42:15 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2005-02-19 09:42:15 +0000 |
commit | cb38a38316d08c772133184101fb129ca56501f8 (patch) | |
tree | 1c2d8a9eb388ace74411e1f56e25ce28e1ae51a7 /sys | |
parent | 7f1c1e17e2f07f26f999bf487665bb499c4eb5a5 (diff) |
make dhclient work.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/ral.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c index 12df77831ec..508cc5d4e34 100644 --- a/sys/dev/ic/ral.c +++ b/sys/dev/ic/ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ral.c,v 1.8 2005/02/18 20:04:40 damien Exp $ */ +/* $OpenBSD: ral.c,v 1.9 2005/02/19 09:42:14 damien Exp $ */ /*- * Copyright (c) 2005 @@ -1782,11 +1782,28 @@ ral_watchdog(struct ifnet *ifp) int ral_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { + struct ral_softc *sc = ifp->if_softc; + struct ifaddr *ifa; int s, error = 0; s = splnet(); switch (cmd) { + case SIOCSIFADDR: + ifa = (struct ifaddr *)data; + ifp->if_flags |= IFF_UP; + switch (ifa->ifa_addr->sa_family) { +#ifdef INET + case AF_INET: + arp_ifinit(&sc->sc_ic.ic_ac, ifa); + ral_init(ifp); + break; +#endif + default: + ral_init(ifp); + } + break; + case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if (!(ifp->if_flags & IFF_RUNNING)) |