tcp_conn_t *tcp_conn;
tcp_cookie_t *cookiep;
acc_t *data;
+ tcp_cookie_t cookie;
if (!(tcp_fd->tf_flags & TFF_LISTENQ))
{
data= bf_packIffLess(data, sizeof(*cookiep));
cookiep= (tcp_cookie_t *)ptr2acc_data(data);
+ cookie= *cookiep;
- dst_nr= cookiep->tc_ref;
+ bf_afree(data); data= NULL;
+
+ dst_nr= cookie.tc_ref;
if (dst_nr < 0 || dst_nr >= TCP_FD_NR)
{
- bf_afree(data); data= NULL;
printf("tcp_acceptto: bad fd %d\n", dst_nr);
tcp_reply_ioctl(tcp_fd, EINVAL);
return NW_OK;
dst_fd->tf_conn != NULL ||
!(dst_fd->tf_flags & TFF_COOKIE))
{
- bf_afree(data); data= NULL;
printf("tcp_acceptto: bad flags 0x%x or conn %p for fd %d\n",
dst_fd->tf_flags, dst_fd->tf_conn, dst_nr);
tcp_reply_ioctl(tcp_fd, EINVAL);
return NW_OK;
}
- if (memcmp(cookiep, &dst_fd->tf_cookie, sizeof(*cookiep)) != 0)
+ if (memcmp(&cookie, &dst_fd->tf_cookie, sizeof(cookie)) != 0)
{
- bf_afree(data); data= NULL;
printf("tcp_acceptto: bad cookie\n");
return NW_OK;
}
- bf_afree(data); data= NULL;
-
/* Move connection */
tcp_fd->tf_listenq[i]= NULL;
tcp_conn->tc_fd= dst_fd;