Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151296888
D7227.id18603.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7227.id18603.diff
View Options
Index: sys/netinet/in.c
===================================================================
--- sys/netinet/in.c
+++ sys/netinet/in.c
@@ -936,6 +936,7 @@
{
register struct ifaddr *ifa;
u_long t;
+ int found;
if (in.s_addr == INADDR_BROADCAST ||
in.s_addr == INADDR_ANY)
@@ -943,11 +944,13 @@
if ((ifp->if_flags & IFF_BROADCAST) == 0)
return (0);
t = ntohl(in.s_addr);
+ found = 0;
/*
* Look through the list of addresses for a match
* with a broadcast address.
*/
#define ia ((struct in_ifaddr *)ifa)
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
if (ifa->ifa_addr->sa_family == AF_INET &&
(in.s_addr == ia->ia_broadaddr.sin_addr.s_addr ||
@@ -962,9 +965,12 @@
* only exist when an interface gets a secondary
* address.
*/
- ia->ia_subnetmask != (u_long)0xffffffff)
- return (1);
- return (0);
+ ia->ia_subnetmask != (u_long)0xffffffff) {
+ found = 1;
+ break;
+ }
+ IF_ADDR_RUNLOCK(ifp);
+ return (found);
#undef ia
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 9:58 AM (6 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31093235
Default Alt Text
D7227.id18603.diff (1 KB)
Attached To
Mode
D7227: Fix unlocked access to ifnet address list
Attached
Detach File
Event Timeline
Log In to Comment