diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-10-22 18:39:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-22 18:39:04 -0400 |
| commit | b7f49e15a2fea2cb1676c921a5e68f974f9c3f33 (patch) | |
| tree | 5ce62762bb16b2f2a6d983f860f6b4c4f63e44e8 /ospfd/ospf_network.c | |
| parent | cc1107bf59ab88f7f19bfefb540d3b5cc63df3f3 (diff) | |
| parent | d0b0a2c545c2960df768e86a0bdb2e78610efc86 (diff) | |
Merge pull request #7358 from mjstapp/fix_ntoa
ospfd, zebra: Replace use of inet_ntoa
Diffstat (limited to 'ospfd/ospf_network.c')
| -rw-r--r-- | ospfd/ospf_network.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c index 28aec41eba..00fbdc21a1 100644 --- a/ospfd/ospf_network.c +++ b/ospfd/ospf_network.c @@ -53,14 +53,14 @@ int ospf_if_add_allspfrouters(struct ospf *top, struct prefix *p, if (ret < 0) flog_err( EC_LIB_SOCKET, - "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllSPFRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?", - top->fd, inet_ntoa(p->u.prefix4), ifindex, + "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllSPFRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?", + top->fd, &p->u.prefix4, ifindex, safe_strerror(errno)); else { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "interface %s [%u] join AllSPFRouters Multicast group.", - inet_ntoa(p->u.prefix4), ifindex); + "interface %pI4 [%u] join AllSPFRouters Multicast group.", + &p->u.prefix4, ifindex); } return ret; @@ -76,14 +76,14 @@ int ospf_if_drop_allspfrouters(struct ospf *top, struct prefix *p, ifindex); if (ret < 0) flog_err(EC_LIB_SOCKET, - "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllSPFRouters): %s", - top->fd, inet_ntoa(p->u.prefix4), ifindex, + "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllSPFRouters): %s", + top->fd, &p->u.prefix4, ifindex, safe_strerror(errno)); else { if (IS_DEBUG_OSPF_EVENT) zlog_debug( - "interface %s [%u] leave AllSPFRouters Multicast group.", - inet_ntoa(p->u.prefix4), ifindex); + "interface %pI4 [%u] leave AllSPFRouters Multicast group.", + &p->u.prefix4, ifindex); } return ret; @@ -101,13 +101,13 @@ int ospf_if_add_alldrouters(struct ospf *top, struct prefix *p, if (ret < 0) flog_err( EC_LIB_SOCKET, - "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllDRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?", - top->fd, inet_ntoa(p->u.prefix4), ifindex, + "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllDRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?", + top->fd, &p->u.prefix4, ifindex, safe_strerror(errno)); else zlog_debug( - "interface %s [%u] join AllDRouters Multicast group.", - inet_ntoa(p->u.prefix4), ifindex); + "interface %pI4 [%u] join AllDRouters Multicast group.", + &p->u.prefix4, ifindex); return ret; } @@ -122,13 +122,13 @@ int ospf_if_drop_alldrouters(struct ospf *top, struct prefix *p, ifindex); if (ret < 0) flog_err(EC_LIB_SOCKET, - "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllDRouters): %s", - top->fd, inet_ntoa(p->u.prefix4), ifindex, + "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllDRouters): %s", + top->fd, &p->u.prefix4, ifindex, safe_strerror(errno)); else zlog_debug( - "interface %s [%u] leave AllDRouters Multicast group.", - inet_ntoa(p->u.prefix4), ifindex); + "interface %pI4 [%u] leave AllDRouters Multicast group.", + &p->u.prefix4, ifindex); return ret; } @@ -161,8 +161,8 @@ int ospf_if_ipmulticast(struct ospf *top, struct prefix *p, ifindex_t ifindex) ret = setsockopt_ipv4_multicast_if(top->fd, p->u.prefix4, ifindex); if (ret < 0) flog_err(EC_LIB_SOCKET, - "can't setsockopt IP_MULTICAST_IF(fd %d, addr %s, ifindex %u): %s", - top->fd, inet_ntoa(p->u.prefix4), ifindex, + "can't setsockopt IP_MULTICAST_IF(fd %d, addr %pI4, ifindex %u): %s", + top->fd, &p->u.prefix4, ifindex, safe_strerror(errno)); #endif |
