summaryrefslogtreecommitdiffstats
path: root/pimd/pim_tlv.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_tlv.c')
-rw-r--r--pimd/pim_tlv.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/pimd/pim_tlv.c b/pimd/pim_tlv.c
index 80d60b8..c463fa2 100644
--- a/pimd/pim_tlv.c
+++ b/pimd/pim_tlv.c
@@ -217,18 +217,17 @@ int pim_encode_addr_group(uint8_t *buf, afi_t afi, int bidir, int scope,
uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf, const uint8_t *buf_pastend,
struct interface *ifp, int family)
{
- struct listnode *node;
uint16_t option_len = 0;
uint8_t *curr;
size_t uel;
- struct list *ifconnected = ifp->connected;
+ struct connected *ifc;
struct pim_interface *pim_ifp = ifp->info;
pim_addr addr;
- node = listhead(ifconnected);
+ ifc = if_connected_first(ifp->connected);
/* Empty address list ? */
- if (!node) {
+ if (!ifc) {
return buf;
}
@@ -239,8 +238,7 @@ uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf, const uint8_t *buf_pastend,
/* Scan secondary address list */
curr = buf + 4; /* skip T and L */
- for (; node; node = listnextnode(node)) {
- struct connected *ifc = listgetdata(node);
+ for (; ifc; ifc = if_connected_next(ifp->connected, ifc)) {
struct prefix *p = ifc->address;
int l_encode;