Skip to content

Commit

Permalink
core: socket info - parse advertise ip part to get address family
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Mar 22, 2024
1 parent 919216d commit 5f901c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/socket_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ static inline struct socket_info *new_sock_info(char *name,
p = si->useinfo.name.s + 1;
si->useinfo.af = AF_INET6;
} else {
ip_addr_t *ipv = NULL;
ipv = str2ipx(&si->useinfo.name);
if(ipv != NULL) {
si->useinfo.af = ipv->af;
}
si->useinfo.address_str.len = si->useinfo.name.len;
p = si->useinfo.name.s;
}
Expand Down

0 comments on commit 5f901c3

Please sign in to comment.