Skip to content

Commit 1e2d1cb

Browse files
committed
Actually assign correct address to socket upon accept
1 parent 14d7e10 commit 1e2d1cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wolfip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,8 +1996,8 @@ int wolfIP_sock_accept(struct wolfIP *s, int sockfd, struct wolfIP_sockaddr *add
19961996
ts->if_idx = bound_match ? (uint8_t)bound_if : ts->if_idx;
19971997
ts->local_ip = ts->bound_local_ip;
19981998
} else {
1999-
ts->local_ip = IPADDR_ANY;
2000-
ts->if_idx = 0;
1999+
ts->local_ip = conn_local;
2000+
ts->if_idx = conn_if;
20012001
}
20022002
if (wolfIP_filter_notify_socket_event(
20032003
WOLFIP_FILT_ACCEPTING, s, newts,

0 commit comments

Comments
 (0)