Page MenuHomeFreeBSD

D48344.diff
No OneTemporary

D48344.diff

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

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)

Event Timeline