summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_iface.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-06-26 00:49:12 +0000
committerrwatson <rwatson@FreeBSD.org>2009-06-26 00:49:12 +0000
commitb12e6106871c9f9db8ac89ad07ec44bb1bf3e880 (patch)
tree9fdd88d9a5bebfe05d7f11647be22a2df78a755b /sys/netgraph/ng_iface.c
parent4d89029afc3eb1268a3e7e1e303889058f0d5e19 (diff)
downloadFreeBSD-src-b12e6106871c9f9db8ac89ad07ec44bb1bf3e880.zip
FreeBSD-src-b12e6106871c9f9db8ac89ad07ec44bb1bf3e880.tar.gz
Update Netgraph nodes to use if_addr_rlock()/if_addr_runlock() instead
of IF_ADDR_LOCK()/IF_ADDR_UNLOCK() when iterating ifp->if_addrhead. MFC after: 6 weeks
Diffstat (limited to 'sys/netgraph/ng_iface.c')
-rw-r--r--sys/netgraph/ng_iface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c
index d6e3d64..18c37c2 100644
--- a/sys/netgraph/ng_iface.c
+++ b/sys/netgraph/ng_iface.c
@@ -683,7 +683,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);
+ if_addr_rlock(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
struct ng_cisco_ipaddr *ips;
@@ -701,7 +701,7 @@ ng_iface_rcvmsg(node_p node, item_p item, hook_p lasthook)
ifa->ifa_netmask)->sin_addr;
break;
}
- IF_ADDR_UNLOCK(ifp);
+ if_addr_runlock(ifp);
/* No IP addresses on this interface? */
if (ifa == NULL)
OpenPOWER on IntegriCloud