Skip to content
Permalink
Browse files

Merge pull request #3356 from opensourcerouting/router-id-loopbacks

zebra: improve identification of loopback interfaces in the router-id code
  • Loading branch information...
riw777 committed Nov 26, 2018
2 parents 0c9503e + 106935f commit ae4bb7ba6e3ed494c705065c31abd6053498e446
Showing with 2 additions and 4 deletions.
  1. +2 −4 zebra/router-id.c
@@ -132,8 +132,7 @@ void router_id_add_address(struct connected *ifc)

router_id_get(&before, zvrf_id(zvrf));

if (!strncmp(ifc->ifp->name, "lo", 2)
|| !strncmp(ifc->ifp->name, "dummy", 5))
if (if_is_loopback(ifc->ifp))
l = zvrf->rid_lo_sorted_list;
else
l = zvrf->rid_all_sorted_list;
@@ -165,8 +164,7 @@ void router_id_del_address(struct connected *ifc)

router_id_get(&before, zvrf_id(zvrf));

if (!strncmp(ifc->ifp->name, "lo", 2)
|| !strncmp(ifc->ifp->name, "dummy", 5))
if (if_is_loopback(ifc->ifp))
l = zvrf->rid_lo_sorted_list;
else
l = zvrf->rid_all_sorted_list;

0 comments on commit ae4bb7b

Please sign in to comment.
You can’t perform that action at this time.