Date: Thu, 9 Dec 1999 07:59:02 +0900 (JST) From: Atsushi Onoe <onoe@sm.sony.co.jp> To: imp@village.org Cc: joe@pavilion.net, mobile@freebsd.org Subject: Re: Recent changes to pccard, pcic, etc. Message-ID: <199912082259.HAA26803@duplo.sm.sony.co.jp> In-Reply-To: Your message of "Wed, 08 Dec 1999 11:06:23 -0700" <199912081806.LAA05338@harmony.village.org> References: <199912081806.LAA05338@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--NextPart-19991209075740-1025200 Content-Type: Text/Plain; charset=us-ascii > FYI, I jut got a panic w/o dhcp in the ip_input on my machine. I > suspect that dhcp makes it worse, but other things can trigger it as > well. Calling if_detach() for interfaces with address causes the inconsistency, and re-assigning new address for the interface, e.g. dhcp, makes it worse. Perhaps you could avoid the problem if you delete all address *before* you remove the card and *before* you suspend the PC. Or you can try my ad hoc patch attached. Though it is not the right fix, it works fine for me even with dhcp. Atsushi --NextPart-19991209075740-1025200 Content-Type: text/plain; charset=us-ascii Content-Description: Ad hoc patch for if_detach() Content-Disposition: attachment; filename="if_detach.patch" *** net/if.c.ORG Wed Dec 8 02:39:03 1999 --- net/if.c Thu Dec 9 07:54:47 1999 *************** *** 227,238 **** --- 227,258 ---- * Remove address from ifnet_addrs[] and maybe decrement if_index. * Clean up all addresses. */ + #if 1 /* ONOE */ + ifnet_addrs[ifp->if_index - 1] = 0; + while (if_index > 0 && ifnet_addrs[if_index - 1] == 0) + if_index--; + #else /* ONOE */ ifnet_addrs[ifp->if_index] = 0; while (ifnet_addrs[if_index] == 0) if_index--; + #endif /* ONOE */ for (ifa = TAILQ_FIRST(&ifp->if_addrhead); ifa; ifa = TAILQ_FIRST(&ifp->if_addrhead)) { + #if 1 /* ONOE */ + /* XXX: Ugly!! ad hoc just for INET */ + if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) { + struct ifaliasreq ifr; + + bzero(&ifr, sizeof(ifr)); + if (ifa->ifa_addr) + ifr.ifra_addr = *ifa->ifa_addr; + if (ifa->ifa_dstaddr) + ifr.ifra_broadaddr = *ifa->ifa_dstaddr; + if (in_control(NULL, SIOCDIFADDR, (caddr_t)&ifr, ifp, NULL) == 0) + continue; + } + #endif /* ONOE */ TAILQ_REMOVE(&ifp->if_addrhead, ifa, ifa_link); IFAFREE(ifa); } --NextPart-19991209075740-1025200-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912082259.HAA26803>