In tcp6_ctlinput, lock tcbinfo around the call to syncache_unreach

so that the locks held are the same as the IPv4 case.

Reviewed by:	rwatson
This commit is contained in:
David Malone 2004-08-12 18:19:36 +00:00
parent 44f31f7556
commit 849112666a
2 changed files with 4 additions and 0 deletions

View File

@ -1245,7 +1245,9 @@ tcp6_ctlinput(cmd, sa, d)
inc.inc6_faddr = ((struct sockaddr_in6 *)sa)->sin6_addr;
inc.inc6_laddr = ip6cp->ip6c_src->sin6_addr;
inc.inc_isipv6 = 1;
INP_INFO_WLOCK(&tcbinfo);
syncache_unreach(&inc, &th);
INP_INFO_WUNLOCK(&tcbinfo);
} else
in6_pcbnotify(&tcbinfo, sa, 0, (const struct sockaddr *)sa6_src,
0, cmd, NULL, notify);

View File

@ -1245,7 +1245,9 @@ tcp6_ctlinput(cmd, sa, d)
inc.inc6_faddr = ((struct sockaddr_in6 *)sa)->sin6_addr;
inc.inc6_laddr = ip6cp->ip6c_src->sin6_addr;
inc.inc_isipv6 = 1;
INP_INFO_WLOCK(&tcbinfo);
syncache_unreach(&inc, &th);
INP_INFO_WUNLOCK(&tcbinfo);
} else
in6_pcbnotify(&tcbinfo, sa, 0, (const struct sockaddr *)sa6_src,
0, cmd, NULL, notify);