svn commit: r191284 - head/sys/netgraph
Robert Watson
rwatson at FreeBSD.org
Sun Apr 19 22:05:40 UTC 2009
Author: rwatson
Date: Sun Apr 19 22:05:39 2009
New Revision: 191284
URL: http://svn.freebsd.org/changeset/base/191284
Log:
Lock the interface address list while building replies to
NGM_CISCO_COOKIE messages in ng_iface.
MFC after: 2 weeks
Modified:
head/sys/netgraph/ng_iface.c
Modified: head/sys/netgraph/ng_iface.c
==============================================================================
--- head/sys/netgraph/ng_iface.c Sun Apr 19 22:04:29 2009 (r191283)
+++ head/sys/netgraph/ng_iface.c Sun Apr 19 22:05:39 2009 (r191284)
@@ -668,6 +668,7 @@ ng_iface_rcvmsg(node_p node, item_p item
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
ifa->ifa_netmask)->sin_addr;
break;
}
+ IF_ADDR_UNLOCK(ifp);
/* No IP addresses on this interface? */
if (ifa == NULL)
More information about the svn-src-head
mailing list