Skip to content

Commit b003bba

Browse files
committed
Actually assign correct address to socket upon accept
1 parent d64e536 commit b003bba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/wolfip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,8 +1710,8 @@ int wolfIP_sock_accept(struct wolfIP *s, int sockfd, struct wolfIP_sockaddr *add
17101710
ts->if_idx = bound_match ? (uint8_t)bound_if : ts->if_idx;
17111711
ts->local_ip = ts->bound_local_ip;
17121712
} else {
1713-
ts->local_ip = IPADDR_ANY;
1714-
ts->if_idx = 0;
1713+
ts->local_ip = conn_local;
1714+
ts->if_idx = conn_if;
17151715
}
17161716
return (newts - s->tcpsockets) | MARK_TCP_SOCKET;
17171717
} else if (ts->sock.tcp.state == TCP_LISTEN) {

0 commit comments

Comments
 (0)