Skip to content

Commit

Permalink
SQUASH_ME: gnrc_tcp: fix failing static tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brummer-simon committed Jan 24, 2020
1 parent be3cf4c commit 99d6ff0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sys/include/net/gnrc/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int gnrc_tcp_open_active(gnrc_tcp_tcb_t *tcb, const gnrc_tcp_ep_t *remote,
*
* @param[in,out] tcb TCB holding the connection information.
* @param[in] local Endpoint specifying the port and address used to wait for
* incomming connections.
* incoming connections.
*
* @returns 0 on success.
* @returns -EAFNOSUPPORT if local_addr != NULL and @p address_family is not supported.
Expand Down
5 changes: 4 additions & 1 deletion sys/net/gnrc/transport_layer/tcp/gnrc_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@ static int _gnrc_tcp_open(gnrc_tcp_tcb_t *tcb, const gnrc_tcp_ep_t *remote,
}
/* Setup active connection */
else {
assert(remote != NULL);

/* Parse target address and port number into TCB */
#ifdef MODULE_GNRC_IPV6
if ((remote != NULL) && (tcb->address_family == AF_INET6)) {
if (tcb->address_family == AF_INET6) {

/* Store Address information in TCB */
if (memcpy(tcb->peer_addr, remote->addr.ipv6, sizeof(tcb->peer_addr)) == NULL) {
Expand All @@ -177,6 +179,7 @@ static int _gnrc_tcp_open(gnrc_tcp_tcb_t *tcb, const gnrc_tcp_ep_t *remote,
tcb->ll_iface = remote->netif;
}
#endif

/* Assign port numbers, verification happens in fsm */
tcb->local_port = local_port;
tcb->peer_port = remote->port;
Expand Down

0 comments on commit 99d6ff0

Please sign in to comment.