diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-04-19 22:05:39 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-04-19 22:05:39 +0000 |
commit | 80e4437a3b63e37efc7987db0e7f044546e89418 (patch) | |
tree | a103eecc6c62b70144d2637cef8d02b062fb9c6f | |
parent | 8a092572b5bd1329fb27209e9129841ed65ed859 (diff) | |
download | FreeBSD-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
-rw-r--r-- | sys/netgraph/ng_iface.c | 2 |
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) |