bgpd: Use interface name instead of pointer value

Log message is borked in a manner that makes it unusable:
bgpd[52]: [VX6SM-8YE5W][EC 33554460] 2000:31:0:53::2: nexthop_set failed, resetting connection - intf 0x561eb9005a30

Let's print out the interface name instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 50e049db76)
This commit is contained in:
Donald Sharp 2023-03-16 10:24:25 -04:00 committed by Mergify
parent 9b62b5d8c2
commit 53737303c8

View File

@ -820,9 +820,12 @@ int bgp_getsockname(struct peer *peer)
if (!bgp_zebra_nexthop_set(peer->su_local, peer->su_remote,
&peer->nexthop, peer)) {
flog_err(EC_BGP_NH_UPD,
"%s: nexthop_set failed, resetting connection - intf %p",
peer->host, peer->nexthop.ifp);
flog_err(
EC_BGP_NH_UPD,
"%s: nexthop_set failed, resetting connection - intf %s",
peer->host,
peer->nexthop.ifp ? peer->nexthop.ifp->name
: "(Unknown)");
return -1;
}
return 0;