diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-16 18:00:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 18:00:38 +0200 |
commit | 5b8d8894f8ecb401acc9b3986bbb6ce95b3263e9 (patch) | |
tree | 077628692cdbae750e26d1b8f237c422bae6519d /babeld/message.c | |
parent | Merge pull request #1305 from donaldsharp/workqueue (diff) | |
parent | *: use the FOR_ALL_INTERFACES abstraction from babeld (diff) | |
download | frr-5b8d8894f8ecb401acc9b3986bbb6ce95b3263e9.tar.xz frr-5b8d8894f8ecb401acc9b3986bbb6ce95b3263e9.zip |
Merge pull request #1298 from opensourcerouting/iface-rb-tree
Use rb-trees to store interfaces instead of linked-lists
Diffstat (limited to 'babeld/message.c')
-rw-r--r-- | babeld/message.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/babeld/message.c b/babeld/message.c index 142770e86..1ff486790 100644 --- a/babeld/message.c +++ b/babeld/message.c @@ -1154,9 +1154,9 @@ flushupdates(struct interface *ifp) int i; if(ifp == NULL) { - struct interface *ifp_aux; - struct listnode *linklist_node = NULL; - FOR_ALL_INTERFACES(ifp_aux, linklist_node) + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); + struct interface *ifp_aux; + FOR_ALL_INTERFACES(vrf, ifp_aux) flushupdates(ifp_aux); return; } @@ -1326,10 +1326,10 @@ send_update(struct interface *ifp, int urgent, babel_interface_nfo *babel_ifp = NULL; if(ifp == NULL) { - struct interface *ifp_aux; - struct listnode *linklist_node = NULL; + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); + struct interface *ifp_aux; struct babel_route *route; - FOR_ALL_INTERFACES(ifp_aux, linklist_node) + FOR_ALL_INTERFACES(vrf, ifp_aux) send_update(ifp_aux, urgent, prefix, plen); if(prefix) { /* Since flushupdates only deals with non-wildcard interfaces, we @@ -1387,9 +1387,9 @@ send_wildcard_retraction(struct interface *ifp) { babel_interface_nfo *babel_ifp = NULL; if(ifp == NULL) { - struct interface *ifp_aux; - struct listnode *linklist_node = NULL; - FOR_ALL_INTERFACES(ifp_aux, linklist_node) + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); + struct interface *ifp_aux; + FOR_ALL_INTERFACES(vrf, ifp_aux) send_wildcard_retraction(ifp_aux); return; } @@ -1422,9 +1422,9 @@ send_self_update(struct interface *ifp) { struct xroute_stream *xroutes; if(ifp == NULL) { - struct interface *ifp_aux; - struct listnode *linklist_node = NULL; - FOR_ALL_INTERFACES(ifp_aux, linklist_node) { + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); + struct interface *ifp_aux; + FOR_ALL_INTERFACES(vrf, ifp_aux) { if(!if_up(ifp_aux)) continue; send_self_update(ifp_aux); @@ -1456,9 +1456,9 @@ send_ihu(struct neighbour *neigh, struct interface *ifp) int msglen; if(neigh == NULL && ifp == NULL) { + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); struct interface *ifp_aux; - struct listnode *linklist_node = NULL; - FOR_ALL_INTERFACES(ifp_aux, linklist_node) { + FOR_ALL_INTERFACES(vrf, ifp_aux) { if(if_up(ifp_aux)) continue; send_ihu(NULL, ifp_aux); @@ -1573,9 +1573,9 @@ send_request(struct interface *ifp, int v4, pb, len; if(ifp == NULL) { - struct interface *ifp_aux; - struct listnode *linklist_node = NULL; - FOR_ALL_INTERFACES(ifp_aux, linklist_node) { + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); + struct interface *ifp_aux; + FOR_ALL_INTERFACES(vrf, ifp_aux) { if(if_up(ifp_aux)) continue; send_request(ifp_aux, prefix, plen); @@ -1648,9 +1648,9 @@ send_multihop_request(struct interface *ifp, flushupdates(ifp); if(ifp == NULL) { - struct interface *ifp_aux; - struct listnode *linklist_node = NULL; - FOR_ALL_INTERFACES(ifp_aux, linklist_node) { + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); + struct interface *ifp_aux; + FOR_ALL_INTERFACES(vrf, ifp_aux) { if(!if_up(ifp_aux)) continue; send_multihop_request(ifp_aux, prefix, plen, seqno, id, hop_count); |