mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-09 20:58:44 +00:00
RPKI: Fix allocation of hostname when using an IPv6 address
This commit is contained in:
parent
00284f0ed6
commit
3b62417c35
@ -97,7 +97,7 @@ rpki_cache_addr:
|
|||||||
rpki_check_unused_hostname();
|
rpki_check_unused_hostname();
|
||||||
RPKI_CFG->ip = $1;
|
RPKI_CFG->ip = $1;
|
||||||
/* Ensure hostname is filled */
|
/* Ensure hostname is filled */
|
||||||
char *hostname = cfg_allocz(sizeof(INET6_ADDRSTRLEN + 1));
|
char *hostname = cfg_allocz(INET6_ADDRSTRLEN + 1);
|
||||||
bsnprintf(hostname, INET6_ADDRSTRLEN+1, "%I", RPKI_CFG->ip);
|
bsnprintf(hostname, INET6_ADDRSTRLEN+1, "%I", RPKI_CFG->ip);
|
||||||
RPKI_CFG->hostname = hostname;
|
RPKI_CFG->hostname = hostname;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user