Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107622991
D48344.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
882 B
Referenced Files
None
Subscribers
None
D48344.diff
View Options
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -625,8 +625,6 @@
*
* When adding new socket options here, make sure to add access control
* checks here as necessary.
- *
- * XXX-BZ inp locking?
*/
int
rip_ctloutput(struct socket *so, struct sockopt *sopt)
@@ -637,7 +635,9 @@
if (sopt->sopt_level != IPPROTO_IP) {
if ((sopt->sopt_level == SOL_SOCKET) &&
(sopt->sopt_name == SO_SETFIB)) {
+ INP_WLOCK(inp);
inp->inp_inc.inc_fibnum = so->so_fibnum;
+ INP_WUNLOCK(inp);
return (0);
}
return (EINVAL);
@@ -707,10 +707,12 @@
sizeof optval);
if (error)
break;
+ INP_WLOCK(inp);
if (optval)
inp->inp_flags |= INP_HDRINCL;
else
inp->inp_flags &= ~INP_HDRINCL;
+ INP_WUNLOCK(inp);
break;
case IP_FW3: /* generic ipfw v.3 functions */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 17, 7:41 PM (19 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15717089
Default Alt Text
D48344.diff (882 B)
Attached To
Mode
D48344: rawip: Take the inpcb lock when appropriate in rip_ctloutput()
Attached
Detach File
Event Timeline
Log In to Comment