mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Net address format: Do not print the -4 or -6 suffix in %I4 and %I6
This commit is contained in:
parent
a820ae1074
commit
9a883adf95
@ -295,11 +295,13 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args)
|
||||
ip4_addr a = va_arg(args, ip4_addr);
|
||||
ip4_ntop(a, ipbuf);
|
||||
i = IP4_MAX_TEXT_LENGTH;
|
||||
fmt++;
|
||||
} else if (fmt[1] == '6') {
|
||||
/* Explicit IPv6 address */
|
||||
ip6_addr a = va_arg(args, ip6_addr);
|
||||
ip6_ntop(a, ipbuf);
|
||||
i = IP6_MAX_TEXT_LENGTH;
|
||||
fmt++;
|
||||
} else {
|
||||
/* Just IP address */
|
||||
ip_addr a = va_arg(args, ip_addr);
|
||||
|
Loading…
Reference in New Issue
Block a user