summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2000-07-25 11:21:01 +0000
committerume <ume@FreeBSD.org>2000-07-25 11:21:01 +0000
commit64de57e4e28f41b53af571e2f918c940e2286097 (patch)
treeb2e1654ba1e58de1ea5012474180a8cb1053ffe9
parent20d18ccbaccbc3f2dbf909e8a9556cfdd8a04db0 (diff)
downloadFreeBSD-src-64de57e4e28f41b53af571e2f918c940e2286097.zip
FreeBSD-src-64de57e4e28f41b53af571e2f918c940e2286097.tar.gz
Workaround to avoid panic during detach pccard nic.
-rw-r--r--sys/net/rtsock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index c5eac8e..d778e01 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -828,7 +828,10 @@ rt_newmaddrmsg(cmd, ifma)
bzero((caddr_t)&info, sizeof(info));
ifaaddr = ifma->ifma_addr;
- ifpaddr = ifp->if_addrhead.tqh_first->ifa_addr;
+ if (ifp && ifp->if_addrhead.tqh_first)
+ ifpaddr = ifp->if_addrhead.tqh_first->ifa_addr;
+ else
+ ifpaddr = NULL;
/*
* If a link-layer address is present, present it as a ``gateway''
* (similarly to how ARP entries, e.g., are presented).
OpenPOWER on IntegriCloud