mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 17:24:26 +00:00
ripd: changes for code maintainability
these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
This commit is contained in:
parent
a10c287292
commit
99404729cf
20
ripd/ripd.c
20
ripd/ripd.c
@ -1081,10 +1081,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;
|
||||
}
|
||||
|
||||
@ -1450,9 +1449,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)) {
|
||||
@ -1771,8 +1769,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;
|
||||
}
|
||||
@ -1785,8 +1783,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user