diff options
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 8cc720c535..16eea1d6df 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -314,9 +314,9 @@ static int detect_primary_address_change(struct interface *ifp, sizeof(new_prim_str)); pim_inet4_dump("<old?>", pim_ifp->primary_address, old_prim_str, sizeof(old_prim_str)); - zlog_debug("%s: old=%s new=%s on interface %s: %s", - __PRETTY_FUNCTION__, old_prim_str, new_prim_str, - ifp->name, changed ? "changed" : "unchanged"); + zlog_debug("%s: old=%s new=%s on interface %s: %s", __func__, + old_prim_str, new_prim_str, ifp->name, + changed ? "changed" : "unchanged"); } if (changed) { @@ -487,8 +487,7 @@ int pim_update_source_set(struct interface *ifp, struct in_addr source) } pim_ifp->update_source = source; - detect_address_change(ifp, 0 /* force_prim_as_any */, - __PRETTY_FUNCTION__); + detect_address_change(ifp, 0 /* force_prim_as_any */, __func__); return PIM_SUCCESS; } @@ -712,13 +711,13 @@ void pim_if_addr_del(struct connected *ifc, int force_prim_as_any) char buf[BUFSIZ]; prefix2str(ifc->address, buf, BUFSIZ); zlog_debug("%s: %s ifindex=%d disconnected IP address %s %s", - __PRETTY_FUNCTION__, ifp->name, ifp->ifindex, buf, + __func__, ifp->name, ifp->ifindex, buf, CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY) ? "secondary" : "primary"); } - detect_address_change(ifp, force_prim_as_any, __PRETTY_FUNCTION__); + detect_address_change(ifp, force_prim_as_any, __func__); pim_if_addr_del_igmp(ifc); pim_if_addr_del_pim(ifc); @@ -947,14 +946,14 @@ int pim_if_add_vif(struct interface *ifp, bool ispimreg, bool is_vxlan_term) if (pim_ifp->mroute_vif_index > 0) { zlog_warn("%s: vif_index=%d > 0 on interface %s ifindex=%d", - __PRETTY_FUNCTION__, pim_ifp->mroute_vif_index, - ifp->name, ifp->ifindex); + __func__, pim_ifp->mroute_vif_index, ifp->name, + ifp->ifindex); return -1; } if (ifp->ifindex < 0) { - zlog_warn("%s: ifindex=%d < 1 on interface %s", - __PRETTY_FUNCTION__, ifp->ifindex, ifp->name); + zlog_warn("%s: ifindex=%d < 1 on interface %s", __func__, + ifp->ifindex, ifp->name); return -2; } @@ -962,7 +961,7 @@ int pim_if_add_vif(struct interface *ifp, bool ispimreg, bool is_vxlan_term) if (!ispimreg && !is_vxlan_term && PIM_INADDR_IS_ANY(ifaddr)) { zlog_warn( "%s: could not get address for interface %s ifindex=%d", - __PRETTY_FUNCTION__, ifp->name, ifp->ifindex); + __func__, ifp->name, ifp->ifindex); return -4; } @@ -971,7 +970,7 @@ int pim_if_add_vif(struct interface *ifp, bool ispimreg, bool is_vxlan_term) if (pim_ifp->mroute_vif_index >= MAXVIFS) { zlog_warn( "%s: Attempting to configure more than MAXVIFS=%d on pim enabled interface %s", - __PRETTY_FUNCTION__, MAXVIFS, ifp->name); + __func__, MAXVIFS, ifp->name); return -3; } @@ -1001,8 +1000,8 @@ int pim_if_del_vif(struct interface *ifp) if (pim_ifp->mroute_vif_index < 1) { zlog_warn("%s: vif_index=%d < 1 on interface %s ifindex=%d", - __PRETTY_FUNCTION__, pim_ifp->mroute_vif_index, - ifp->name, ifp->ifindex); + __func__, pim_ifp->mroute_vif_index, ifp->name, + ifp->ifindex); return -1; } @@ -1223,8 +1222,8 @@ static int igmp_join_sock(const char *ifname, ifindex_t ifindex, sizeof(source_str)); zlog_warn( "%s: setsockopt(fd=%d) failure for IGMP group %s source %s ifindex %d on interface %s: errno=%d: %s", - __PRETTY_FUNCTION__, join_fd, group_str, source_str, - ifindex, ifname, errno, safe_strerror(errno)); + __func__, join_fd, group_str, source_str, ifindex, + ifname, errno, safe_strerror(errno)); close(join_fd); return -2; @@ -1256,7 +1255,7 @@ static struct igmp_join *igmp_join_new(struct interface *ifp, sizeof(source_str)); zlog_warn( "%s: igmp_join_sock() failure for IGMP group %s source %s on interface %s", - __PRETTY_FUNCTION__, group_str, source_str, ifp->name); + __func__, group_str, source_str, ifp->name); return 0; } @@ -1308,7 +1307,7 @@ ferr_r pim_if_igmp_join_add(struct interface *ifp, struct in_addr group_addr, sizeof(source_str)); zlog_debug( "%s: issued static igmp join for channel (S,G)=(%s,%s) on interface %s", - __PRETTY_FUNCTION__, source_str, group_str, ifp->name); + __func__, source_str, group_str, ifp->name); } return ferr_ok(); @@ -1323,14 +1322,14 @@ int pim_if_igmp_join_del(struct interface *ifp, struct in_addr group_addr, pim_ifp = ifp->info; if (!pim_ifp) { - zlog_warn("%s: multicast not enabled on interface %s", - __PRETTY_FUNCTION__, ifp->name); + zlog_warn("%s: multicast not enabled on interface %s", __func__, + ifp->name); return -1; } if (!pim_ifp->igmp_join_list) { - zlog_warn("%s: no IGMP join on interface %s", - __PRETTY_FUNCTION__, ifp->name); + zlog_warn("%s: no IGMP join on interface %s", __func__, + ifp->name); return -2; } @@ -1344,7 +1343,7 @@ int pim_if_igmp_join_del(struct interface *ifp, struct in_addr group_addr, sizeof(source_str)); zlog_warn( "%s: could not find IGMP group %s source %s on interface %s", - __PRETTY_FUNCTION__, group_str, source_str, ifp->name); + __func__, group_str, source_str, ifp->name); return -3; } @@ -1357,8 +1356,8 @@ int pim_if_igmp_join_del(struct interface *ifp, struct in_addr group_addr, sizeof(source_str)); zlog_warn( "%s: failure closing sock_fd=%d for IGMP group %s source %s on interface %s: errno=%d: %s", - __PRETTY_FUNCTION__, ij->sock_fd, group_str, source_str, - ifp->name, errno, safe_strerror(errno)); + __func__, ij->sock_fd, group_str, source_str, ifp->name, + errno, safe_strerror(errno)); /* warning only */ } listnode_delete(pim_ifp->igmp_join_list, ij); @@ -1546,8 +1545,8 @@ int pim_ifp_create(struct interface *ifp) if (PIM_DEBUG_ZEBRA) { zlog_debug( "%s: %s index %d(%u) flags %ld metric %d mtu %d operative %d", - __PRETTY_FUNCTION__, ifp->name, ifp->ifindex, - ifp->vrf_id, (long)ifp->flags, ifp->metric, ifp->mtu, + __func__, ifp->name, ifp->ifindex, ifp->vrf_id, + (long)ifp->flags, ifp->metric, ifp->mtu, if_is_operative(ifp)); } @@ -1599,8 +1598,8 @@ int pim_ifp_up(struct interface *ifp) if (PIM_DEBUG_ZEBRA) { zlog_debug( "%s: %s index %d(%u) flags %ld metric %d mtu %d operative %d", - __PRETTY_FUNCTION__, ifp->name, ifp->ifindex, - ifp->vrf_id, (long)ifp->flags, ifp->metric, ifp->mtu, + __func__, ifp->name, ifp->ifindex, ifp->vrf_id, + (long)ifp->flags, ifp->metric, ifp->mtu, if_is_operative(ifp)); } @@ -1636,7 +1635,7 @@ int pim_ifp_up(struct interface *ifp) if (!master) { zlog_debug( "%s: Unable to find Master interface for %s", - __PRETTY_FUNCTION__, vrf->name); + __func__, vrf->name); return 0; } pim_zebra_interface_set_master(master, ifp); @@ -1651,8 +1650,8 @@ int pim_ifp_down(struct interface *ifp) if (PIM_DEBUG_ZEBRA) { zlog_debug( "%s: %s index %d(%u) flags %ld metric %d mtu %d operative %d", - __PRETTY_FUNCTION__, ifp->name, ifp->ifindex, - ifp->vrf_id, (long)ifp->flags, ifp->metric, ifp->mtu, + __func__, ifp->name, ifp->ifindex, ifp->vrf_id, + (long)ifp->flags, ifp->metric, ifp->mtu, if_is_operative(ifp)); } @@ -1687,8 +1686,8 @@ int pim_ifp_destroy(struct interface *ifp) if (PIM_DEBUG_ZEBRA) { zlog_debug( "%s: %s index %d(%u) flags %ld metric %d mtu %d operative %d", - __PRETTY_FUNCTION__, ifp->name, ifp->ifindex, - ifp->vrf_id, (long)ifp->flags, ifp->metric, ifp->mtu, + __func__, ifp->name, ifp->ifindex, ifp->vrf_id, + (long)ifp->flags, ifp->metric, ifp->mtu, if_is_operative(ifp)); } |
