For IPv6 access pointer to tcpcb only after we have checked it is valid.

Found by:	Coverity's automated analysis (via Ted Unangst)
This commit is contained in:
andre 2004-08-19 20:16:17 +00:00
parent 7a83d1fca4
commit 93c5d20c77
2 changed files with 8 additions and 2 deletions

View File

@ -1420,11 +1420,14 @@ tcp_mtudisc(inp, errno)
u_int romtu;
int mss;
#ifdef INET6
int isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) != 0;
int isipv6;
#endif /* INET6 */
bzero(&tao, sizeof(tao));
if (tp != NULL) {
#ifdef INET6
isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) != 0;
#endif
maxmtu = tcp_hc_getmtu(&inp->inp_inc); /* IPv4 and IPv6 */
romtu =
#ifdef INET6

View File

@ -1420,11 +1420,14 @@ tcp_mtudisc(inp, errno)
u_int romtu;
int mss;
#ifdef INET6
int isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) != 0;
int isipv6;
#endif /* INET6 */
bzero(&tao, sizeof(tao));
if (tp != NULL) {
#ifdef INET6
isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) != 0;
#endif
maxmtu = tcp_hc_getmtu(&inp->inp_inc); /* IPv4 and IPv6 */
romtu =
#ifdef INET6