Skip to content

Commit

Permalink
no fast open in lib_convert connect
Browse files Browse the repository at this point in the history
  • Loading branch information
matanbroner committed Mar 27, 2023
1 parent afde78b commit 8185028
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions lib_convert/convert_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,20 @@ _redirect(socket_state_t *state, struct sockaddr *dest)
if (len < 0)
return len;

// use TCP fast open to send the convert header in the SYN packet
return sendto(state->fd, buf, len, MSG_FASTOPEN, _converter_addr->ai_addr,
_converter_addr->ai_addrlen);
// // use TCP fast open to send the convert header in the SYN packet
// return sendto(state->fd, buf, len, MSG_FASTOPEN, _converter_addr->ai_addr,
// _converter_addr->ai_addrlen);

// Fast Open interferes with creating subflows
int (*lconnect)(int, const struct sockaddr *, socklen_t) = dlsym(RTLD_NEXT, "connect");
if (lconnect(state->fd, _converter_addr->ai_addr, _converter_addr->ai_addrlen) < 0)
{
printf("connect to converter failed: %s\n", strerror(errno));
return -1;
}
// send the convert header
int (*lsend)(int, const void *, size_t, int) = dlsym(RTLD_NEXT, "send");
return lsend(state->fd, buf, len, 0);
}

int socket(int domain, int type, int protocol)
Expand Down

0 comments on commit 8185028

Please sign in to comment.