bfdd: add debug flag around log

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
This commit is contained in:
lynnemorrison 2023-07-28 11:46:30 -04:00
parent d63ccc9248
commit 59342702bf

View File

@ -1742,9 +1742,10 @@ void bfd_peer_mac_set(int sd, struct bfd_session *bfd,
strlcpy(arpreq_.arp_dev, ifp->name, sizeof(arpreq_.arp_dev)); strlcpy(arpreq_.arp_dev, ifp->name, sizeof(arpreq_.arp_dev));
if (ioctl(sd, SIOCGARP, &arpreq_) < 0) { if (ioctl(sd, SIOCGARP, &arpreq_) < 0) {
zlog_warn( if (bglobal.debug_network)
"BFD: getting peer's mac on %s failed error %s", zlog_debug(
ifp->name, strerror(errno)); "BFD: getting peer's mac on %s failed error %s",
ifp->name, strerror(errno));
UNSET_FLAG(bfd->flags, BFD_SESS_FLAG_MAC_SET); UNSET_FLAG(bfd->flags, BFD_SESS_FLAG_MAC_SET);
memset(bfd->peer_hw_addr, 0, sizeof(bfd->peer_hw_addr)); memset(bfd->peer_hw_addr, 0, sizeof(bfd->peer_hw_addr));