summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ral.c
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2005-02-19 09:42:15 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2005-02-19 09:42:15 +0000
commitcb38a38316d08c772133184101fb129ca56501f8 (patch)
tree1c2d8a9eb388ace74411e1f56e25ce28e1ae51a7 /sys/dev/ic/ral.c
parent7f1c1e17e2f07f26f999bf487665bb499c4eb5a5 (diff)
make dhclient work.
Diffstat (limited to 'sys/dev/ic/ral.c')
-rw-r--r--sys/dev/ic/ral.c19
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))