Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bgp local route_id selection error #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/if.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,14 @@ int if_is_loopback(const struct interface *ifp)
/* XXX: Do this better, eg what if IFF_WHATEVER means X on platform M
* but Y on platform N?
*/
return (ifp->flags & (IFF_LOOPBACK | IFF_NOXMIT | IFF_VIRTUAL));
#define INSPUR_LO_STR "Loopback"
bool is_lo = false;
if (strlen(INSPUR_LO_STR) <= strlen(ifp->name)) {
if (!strncmp(INSPUR_LO_STR, ifp->name, strlen(INSPUR_LO_STR)))
is_lo = true;
}

return is_lo | (ifp->flags & (IFF_LOOPBACK | IFF_NOXMIT | IFF_VIRTUAL));
}

/* Check interface is VRF */
Expand Down