diff options
author | jhb <jhb@FreeBSD.org> | 2012-01-05 19:00:36 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-01-05 19:00:36 +0000 |
commit | 4ef366671a65893ccd19a3fc76c415ab0d9a25f2 (patch) | |
tree | e3a128009150d5297d5066b93f051a1a5e2375a5 /sys/netinet/ip_input.c | |
parent | 219e62f17ed5852c0d61721758ef94a0587939f4 (diff) | |
download | FreeBSD-src-4ef366671a65893ccd19a3fc76c415ab0d9a25f2.zip FreeBSD-src-4ef366671a65893ccd19a3fc76c415ab0d9a25f2.tar.gz |
Convert all users of IF_ADDR_LOCK to use new locking macros that specify
either a read lock or write lock.
Reviewed by: bz
MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 0664acc..728b50b 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -611,7 +611,7 @@ passin: * into the stack for SIMPLEX interfaces handled by ether_output(). */ if (ifp != NULL && ifp->if_flags & IFF_BROADCAST) { - IF_ADDR_LOCK(ifp); + IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != AF_INET) continue; @@ -619,18 +619,18 @@ passin: if (satosin(&ia->ia_broadaddr)->sin_addr.s_addr == ip->ip_dst.s_addr) { ifa_ref(ifa); - IF_ADDR_UNLOCK(ifp); + IF_ADDR_RUNLOCK(ifp); goto ours; } #ifdef BOOTP_COMPAT if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY) { ifa_ref(ifa); - IF_ADDR_UNLOCK(ifp); + IF_ADDR_RUNLOCK(ifp); goto ours; } #endif } - IF_ADDR_UNLOCK(ifp); + IF_ADDR_RUNLOCK(ifp); ia = NULL; } /* RFC 3927 2.7: Do not forward datagrams for 169.254.0.0/16. */ |