diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-09-04 20:18:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-04 20:18:12 +0200 |
commit | 7139b1aeaef96534b3e1997eccc28a6ca79bdf43 (patch) | |
tree | 5e9e144cae32fa5db809107279dce5a07f7ce6a7 /ripd | |
parent | Merge pull request #11897 from mobash-rasool/fixes2 (diff) | |
parent | ripd: changes for code maintainability (diff) | |
download | frr-7139b1aeaef96534b3e1997eccc28a6ca79bdf43.tar.xz frr-7139b1aeaef96534b3e1997eccc28a6ca79bdf43.zip |
Merge pull request #11898 from sri-mohan1/sri-rip-dbg1
ripd: changes for code maintainability
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/ripd.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c index c3a9369a0..8a321d9a9 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -1082,10 +1082,9 @@ static void rip_auth_md5_set(struct stream *s, struct rip_interface *ri, /* Check packet length. */ if (len < (RIP_HEADER_SIZE + RIP_RTE_SIZE)) { - flog_err( - EC_RIP_PACKET, - "rip_auth_md5_set(): packet length %ld is less than minimum length.", - len); + flog_err(EC_RIP_PACKET, + "%s: packet length %ld is less than minimum length.", + __func__, len); return; } @@ -1451,9 +1450,8 @@ static int rip_send_packet(uint8_t *buf, int size, struct sockaddr_in *to, inet_ntop(AF_INET, &sin.sin_addr, dst, sizeof(dst)); } #undef ADDRESS_SIZE - zlog_debug("rip_send_packet %pI4 > %s (%s)", - &ifc->address->u.prefix4, dst, - ifc->ifp->name); + zlog_debug("%s %pI4 > %s (%s)", __func__, + &ifc->address->u.prefix4, dst, ifc->ifp->name); } if (CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY)) { @@ -1772,8 +1770,8 @@ static void rip_read(struct thread *t) /* If this packet come from unknown interface, ignore it. */ if (ifp == NULL) { zlog_info( - "rip_read: cannot find interface for packet from %pI4 port %d (VRF %s)", - &from.sin_addr, ntohs(from.sin_port), + "%s: cannot find interface for packet from %pI4 port %d (VRF %s)", + __func__, &from.sin_addr, ntohs(from.sin_port), rip->vrf_name); return; } @@ -1786,8 +1784,8 @@ static void rip_read(struct thread *t) if (ifc == NULL) { zlog_info( - "rip_read: cannot find connected address for packet from %pI4 port %d on interface %s (VRF %s)", - &from.sin_addr, ntohs(from.sin_port), + "%s: cannot find connected address for packet from %pI4 port %d on interface %s (VRF %s)", + __func__, &from.sin_addr, ntohs(from.sin_port), ifp->name, rip->vrf_name); return; } |