mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 20:55:25 +00:00
ospfd: Fix Zebra route add message truncation issue
The `INET_ADDRSTRLEN` is 16 and is only enough to format an IPv4 address. So when there is a prefix (`/xx`), the debug output may get truncated. Use `PREFIX2STR_BUFFER` macro instead to fix the issue. Signed-off-by: Aaron LI <aly@aaronly.me>
This commit is contained in:
parent
25ee44b522
commit
1a08238236
@ -276,7 +276,7 @@ void ospf_zebra_add(struct ospf *ospf, struct prefix_ipv4 *p,
|
||||
count++;
|
||||
|
||||
if (IS_DEBUG_OSPF(zebra, ZEBRA_REDISTRIBUTE)) {
|
||||
char buf[2][INET_ADDRSTRLEN];
|
||||
char buf[2][PREFIX2STR_BUFFER];
|
||||
struct interface *ifp;
|
||||
|
||||
ifp = if_lookup_by_index(path->ifindex, ospf->vrf_id);
|
||||
|
Loading…
Reference in New Issue
Block a user