summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-04-19 22:05:39 +0000
committerrwatson <rwatson@FreeBSD.org>2009-04-19 22:05:39 +0000
commit80e4437a3b63e37efc7987db0e7f044546e89418 (patch)
treea103eecc6c62b70144d2637cef8d02b062fb9c6f /sys/netgraph
parent8a092572b5bd1329fb27209e9129841ed65ed859 (diff)
downloadFreeBSD-src-80e4437a3b63e37efc7987db0e7f044546e89418.zip
FreeBSD-src-80e4437a3b63e37efc7987db0e7f044546e89418.tar.gz
Lock the interface address list while building replies to
NGM_CISCO_COOKIE messages in ng_iface. MFC after: 2 weeks
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_iface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c
index 99fd971..6ee5e89 100644
--- a/sys/netgraph/ng_iface.c
+++ b/sys/netgraph/ng_iface.c
@@ -668,6 +668,7 @@ ng_iface_rcvmsg(node_p node, item_p item, hook_p lasthook)
struct ifaddr *ifa;
/* Return the first configured IP address */
+ IF_ADDR_LOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
struct ng_cisco_ipaddr *ips;
@@ -685,6 +686,7 @@ ng_iface_rcvmsg(node_p node, item_p item, hook_p lasthook)
ifa->ifa_netmask)->sin_addr;
break;
}
+ IF_ADDR_UNLOCK(ifp);
/* No IP addresses on this interface? */
if (ifa == NULL)
OpenPOWER on IntegriCloud