Skip to content

Commit

Permalink
right address famility on line creation
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Mar 28, 2024
1 parent f424f26 commit 2765407
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tunnels/adapters/tcp_listener/tcp_listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,6 @@ void on_inbound_connected(hevent_t *ev)
line->chains_state[self->chain_index] = cstate;
line->src_ctx.protocol = data->proto;
line->src_ctx.addr.sa = *hio_peeraddr(io);
line->dest_ctx.addr.sa.sa_family = AF_INET;

sockaddr_set_port(&(line->src_ctx.addr), data->realport == 0 ? sockaddr_port((sockaddr_u *)hio_localaddr(io)) : data->realport);
line->src_ctx.atype = line->src_ctx.addr.sa.sa_family == AF_INET ? SAT_IPV4 : SAT_IPV6;
hevent_set_userdata(io, cstate);
Expand Down
3 changes: 3 additions & 0 deletions ww/tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ inline line_t *newLine(uint16_t tid)
result->refc = 1;
result->lcid = MAX_CHAIN_LEN - 1;
result->loop = loops[tid];
result->loop = loops[tid];
result->dest_ctx.addr.sa.sa_family = AF_INET;
result->src_ctx.addr.sa.sa_family = AF_INET;
return result;
}
inline size_t reserveChainStateIndex(line_t *l){
Expand Down

0 comments on commit 2765407

Please sign in to comment.