mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 12:44:55 +00:00
ripd: Convert to using %pFX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
e0259674e3
commit
f42238f895
@ -603,8 +603,7 @@ int rip_interface_address_add(ZAPI_CALLBACK_ARGS)
|
|||||||
|
|
||||||
if (p->family == AF_INET) {
|
if (p->family == AF_INET) {
|
||||||
if (IS_RIP_DEBUG_ZEBRA)
|
if (IS_RIP_DEBUG_ZEBRA)
|
||||||
zlog_debug("connected address %s/%d is added",
|
zlog_debug("connected address %pFX is added", p);
|
||||||
inet_ntoa(p->u.prefix4), p->prefixlen);
|
|
||||||
|
|
||||||
rip_enable_apply(ifc->ifp);
|
rip_enable_apply(ifc->ifp);
|
||||||
/* Check if this prefix needs to be redistributed */
|
/* Check if this prefix needs to be redistributed */
|
||||||
@ -653,9 +652,8 @@ int rip_interface_address_delete(ZAPI_CALLBACK_ARGS)
|
|||||||
p = ifc->address;
|
p = ifc->address;
|
||||||
if (p->family == AF_INET) {
|
if (p->family == AF_INET) {
|
||||||
if (IS_RIP_DEBUG_ZEBRA)
|
if (IS_RIP_DEBUG_ZEBRA)
|
||||||
zlog_debug("connected address %s/%d is deleted",
|
zlog_debug("connected address %pFX is deleted",
|
||||||
inet_ntoa(p->u.prefix4),
|
p);
|
||||||
p->prefixlen);
|
|
||||||
|
|
||||||
hook_call(rip_ifaddr_del, ifc);
|
hook_call(rip_ifaddr_del, ifc);
|
||||||
|
|
||||||
|
39
ripd/ripd.c
39
ripd/ripd.c
@ -337,8 +337,7 @@ static int rip_filter(int rip_distribute, struct prefix_ipv4 *p,
|
|||||||
(struct prefix *)p)
|
(struct prefix *)p)
|
||||||
== FILTER_DENY) {
|
== FILTER_DENY) {
|
||||||
if (IS_RIP_DEBUG_PACKET)
|
if (IS_RIP_DEBUG_PACKET)
|
||||||
zlog_debug("%s/%d filtered by distribute %s",
|
zlog_debug("%pFX filtered by distribute %s", p,
|
||||||
inet_ntoa(p->prefix), p->prefixlen,
|
|
||||||
inout);
|
inout);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -348,8 +347,7 @@ static int rip_filter(int rip_distribute, struct prefix_ipv4 *p,
|
|||||||
(struct prefix *)p)
|
(struct prefix *)p)
|
||||||
== PREFIX_DENY) {
|
== PREFIX_DENY) {
|
||||||
if (IS_RIP_DEBUG_PACKET)
|
if (IS_RIP_DEBUG_PACKET)
|
||||||
zlog_debug("%s/%d filtered by prefix-list %s",
|
zlog_debug("%pFX filtered by prefix-list %s", p,
|
||||||
inet_ntoa(p->prefix), p->prefixlen,
|
|
||||||
inout);
|
inout);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -367,9 +365,8 @@ static int rip_filter(int rip_distribute, struct prefix_ipv4 *p,
|
|||||||
== FILTER_DENY) {
|
== FILTER_DENY) {
|
||||||
if (IS_RIP_DEBUG_PACKET)
|
if (IS_RIP_DEBUG_PACKET)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s/%d filtered by distribute %s",
|
"%pFX filtered by distribute %s",
|
||||||
inet_ntoa(p->prefix),
|
p, inout);
|
||||||
p->prefixlen, inout);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -383,9 +380,8 @@ static int rip_filter(int rip_distribute, struct prefix_ipv4 *p,
|
|||||||
== PREFIX_DENY) {
|
== PREFIX_DENY) {
|
||||||
if (IS_RIP_DEBUG_PACKET)
|
if (IS_RIP_DEBUG_PACKET)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s/%d filtered by prefix-list %s",
|
"%pFX filtered by prefix-list %s",
|
||||||
inet_ntoa(p->prefix),
|
p, inout);
|
||||||
p->prefixlen, inout);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1603,8 +1599,7 @@ void rip_redistribute_add(struct rip *rip, int type, int sub_type,
|
|||||||
(void)rip_ecmp_add(rip, &newinfo);
|
(void)rip_ecmp_add(rip, &newinfo);
|
||||||
|
|
||||||
if (IS_RIP_DEBUG_EVENT) {
|
if (IS_RIP_DEBUG_EVENT) {
|
||||||
zlog_debug("Redistribute new prefix %s/%d",
|
zlog_debug("Redistribute new prefix %pFX", p);
|
||||||
inet_ntoa(p->prefix), p->prefixlen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rip_event(rip, RIP_TRIGGERED_UPDATE, 0);
|
rip_event(rip, RIP_TRIGGERED_UPDATE, 0);
|
||||||
@ -1641,9 +1636,8 @@ void rip_redistribute_delete(struct rip *rip, int type, int sub_type,
|
|||||||
|
|
||||||
if (IS_RIP_DEBUG_EVENT)
|
if (IS_RIP_DEBUG_EVENT)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"Poison %s/%d on the interface %s with an infinity metric [delete]",
|
"Poison %pFX on the interface %s with an infinity metric [delete]",
|
||||||
inet_ntoa(p->prefix),
|
p,
|
||||||
p->prefixlen,
|
|
||||||
ifindex2ifname(
|
ifindex2ifname(
|
||||||
ifindex,
|
ifindex,
|
||||||
rip->vrf->vrf_id));
|
rip->vrf->vrf_id));
|
||||||
@ -2266,9 +2260,8 @@ void rip_output_process(struct connected *ifc, struct sockaddr_in *to,
|
|||||||
if (ret == RMAP_DENYMATCH) {
|
if (ret == RMAP_DENYMATCH) {
|
||||||
if (IS_RIP_DEBUG_PACKET)
|
if (IS_RIP_DEBUG_PACKET)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"RIP %s/%d is filtered by route-map out",
|
"RIP %pFX is filtered by route-map out",
|
||||||
inet_ntoa(p->prefix),
|
p);
|
||||||
p->prefixlen);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2283,9 +2276,8 @@ void rip_output_process(struct connected *ifc, struct sockaddr_in *to,
|
|||||||
if (ret == RMAP_DENYMATCH) {
|
if (ret == RMAP_DENYMATCH) {
|
||||||
if (IS_RIP_DEBUG_PACKET)
|
if (IS_RIP_DEBUG_PACKET)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s/%d is filtered by route-map",
|
"%pFX is filtered by route-map",
|
||||||
inet_ntoa(p->prefix),
|
p);
|
||||||
p->prefixlen);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2674,9 +2666,8 @@ void rip_redistribute_withdraw(struct rip *rip, int type)
|
|||||||
(struct prefix_ipv4 *)&rp->p;
|
(struct prefix_ipv4 *)&rp->p;
|
||||||
|
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"Poisone %s/%d on the interface %s with an infinity metric [withdraw]",
|
"Poisone %pFX on the interface %s with an infinity metric [withdraw]",
|
||||||
inet_ntoa(p->prefix),
|
p,
|
||||||
p->prefixlen,
|
|
||||||
ifindex2ifname(
|
ifindex2ifname(
|
||||||
rinfo->nh.ifindex,
|
rinfo->nh.ifindex,
|
||||||
rip->vrf->vrf_id));
|
rip->vrf->vrf_id));
|
||||||
|
Loading…
Reference in New Issue
Block a user