TCP notify functions can change the pcb list.

This commit is contained in:
Jeffrey Hsu 2002-06-21 22:52:48 +00:00
parent d89286ce68
commit 2d40081d1f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98596
2 changed files with 4 additions and 4 deletions

View File

@ -1057,7 +1057,7 @@ tcp_ctlinput(cmd, sa, vip)
s = splnet();
th = (struct tcphdr *)((caddr_t)ip
+ (IP_VHL_HL(ip->ip_vhl) << 2));
INP_INFO_RLOCK(&tcbinfo);
INP_INFO_WLOCK(&tcbinfo);
inp = in_pcblookup_hash(&tcbinfo, faddr, th->th_dport,
ip->ip_src, th->th_sport, 0, NULL);
if (inp != NULL) {
@ -1083,7 +1083,7 @@ tcp_ctlinput(cmd, sa, vip)
#endif
syncache_unreach(&inc, th);
}
INP_INFO_RUNLOCK(&tcbinfo);
INP_INFO_WUNLOCK(&tcbinfo);
splx(s);
} else
in_pcbnotifyall(&tcbinfo, faddr, inetctlerrmap[cmd], notify);

View File

@ -1057,7 +1057,7 @@ tcp_ctlinput(cmd, sa, vip)
s = splnet();
th = (struct tcphdr *)((caddr_t)ip
+ (IP_VHL_HL(ip->ip_vhl) << 2));
INP_INFO_RLOCK(&tcbinfo);
INP_INFO_WLOCK(&tcbinfo);
inp = in_pcblookup_hash(&tcbinfo, faddr, th->th_dport,
ip->ip_src, th->th_sport, 0, NULL);
if (inp != NULL) {
@ -1083,7 +1083,7 @@ tcp_ctlinput(cmd, sa, vip)
#endif
syncache_unreach(&inc, th);
}
INP_INFO_RUNLOCK(&tcbinfo);
INP_INFO_WUNLOCK(&tcbinfo);
splx(s);
} else
in_pcbnotifyall(&tcbinfo, faddr, inetctlerrmap[cmd], notify);